CVS edit link for chrislynch42

I've gotten quite a bit over the last several years from Drupal and want to give a little back. Contributing to an open source project is one of my life goals.

I created a module to track my personal book collection. It has a fairly nice Web 2.0 interface which helps to reduce the number of clicks needed for data entry. Additionally I have integrated Google Books with it so that you can just enter the ISBN and it will automatically populate the local database with the books data from Google. You may very well ask why wouldn't I just use Google Books? Control, privacy and I started the module before Google Books existed.

CommentFileSizeAuthor
#1 csl_milan.zip34.07 KBchrislynch42

Comments

chrislynch42’s picture

StatusFileSize
new34.07 KB
chrislynch42’s picture

Status: Postponed (maintainer needs more info) » Active
avpaderno’s picture

Status: Active » Needs work
Issue tags: +Module review

Hello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review your code, pointing out what needs to be changed.

As per http://drupal.org/cvs-application/requirements, the motivation message should be expanded to contain more details about the features of the proposed module/theme; for modules it should include also a comparison with the existing solutions, while for themes a screenshot is also required.

chrislynch42’s picture

Status: Active » Needs work

The main difference between the Milan module (the one under review) and the ones that currently exist is that mine is focused on tracking a personal collection. It stores information locally so as to provide more privacy from government and commercial tracking. This isn't additional security but rather privacy through anonymity and poor accessibility. Your information would be readily available stored on sites such as Google books. This module allows for local storage information such as its under my bed or in the attic. It allows for tracking of the books using little information. It provides a structured method for classifying books by genre, series, worlds, authors and publishers. It utilizes Google books to locally save book data via ISBN. Below is a table with my description on the focus of the other similar modules. Each description focuses on the difference from the Milan module.

Module Description
Book Post Doesn't store book data locally and isn't to track books. Is targeted more towards including book data
in other blog like posts so they can be talked about.
MARC & Millennium OPAC Integration These are targeted towards bulk importing library. They aren't targeted to an average user
to just track their book collection with a minimum of effort.
Open Library API These are modules that could provide additional functionality in future versions but do not
provide functionality in and of themselves.
chrislynch42’s picture

Status: Needs work » Active

I set the issue back to active once I provided the information you required.

avpaderno’s picture

Status: Needs work » Needs review

Thanks for the reply.

meba’s picture

Status: Needs review » Needs work

Please look at Drupal Coding standards, there are issues with indenting, etc. Drupal Coding Standards are really important for other developers so they can help you with the module.

avpaderno’s picture

  • The points reported in this review are not in order or importance / relevance.
  • Most of the times I report the code that present an issue. In such cases, the same error can be present in other parts of the code; the fact I don't report the same issue more than once doesn't mean the same issue is not present in different places.
  • Not all the reported points are application blockers; some of the points I report are simple suggestions to who applies for a CVS account. For a list of what is considered a blocker for the application approval, see CVS applications review, what to expect. Keep in mind the list is still under construction, and can be changed to adapt it to what has been found out during code review, or to make the list clearer to who applies for a CVS account.
  •     db_query("delete from {csl_bt_author} WHERE nid = %d ", $node->nid);
        db_query("delete from {csl_bt_author_book} WHERE nid = %d ", $node->nid);
        db_query("delete from {node} where nid=%d ",$node->nid);
        db_query("delete from {node_revisions} where nid=%d ",$node->nid);
    
    

    Reserved SQL words are written in upper case.

  • See http://drupal.org/coding-standards to understand how a module should be written. In particular, see how the code should be formatted; how Drupal variables, global variables, constants, and functions defined from the module should be named; how constants should be written.
  •   $form['#redirect'] = $thepath;
      $form_state['redirect'] = $thepath;
    
    

    A submission handler should just use the last code line.

  • Remove any debug code.
    Remove also any not necessary files, like the ones used from the IDE you are using, and the screenshots.
  • package = Seafarer
    version = VERSION
    

    The version line needs to be removed from the .info file.
    What does Seafarer mean?

  1. Menu descriptions and titles, schema descriptions are not passed to t().
  2. Submodules that are part of the same project should have the name prefixed by the project name.
  3. function milan_perm() {
      return array('create milan entries',
                            'delete own milan entries',
                            'delete any milan entry',
                            'edit own milan entries',
                            'edit any milan entry',
                            'view any milan entry',
                            'administer milan series',
                            'administer milan genre',
                            'administer milan world',
                            'administer milan');
      
    }
    

    The first 6 permissions are already defined from the node module.
    What is the meaning of milan, in these cases?

  4. //////////////////publisher select box ajax render
    

    Function comments don't follow our standards.

  5. Remove any debug code.
  6. package = Core - optional
    version = VERSION
    core = 6.x
    

    The module is not part of Drupal core.

  7.          $thepath .= "/" . strtoupper(substr($form_state['values']["title"],0,1));
    
    

    Why isn't the code using drupal_ucfirst()?
    As per coding standards, the code should use the Drupal Unicode functions.

  8.     //Create list of letters across top
      $result = db_query("SELECT DISTINCT substr(replace(upper(n.title),'THE',''),1,1) theLetter FROM {node} n WHERE n.type = 'publisher' AND n.status = 1 ORDER BY theLetter");
      $output .= l('[ALL]','milan/publisher');
    
    

    Strings used in the user interface should be translated.

avpaderno’s picture

Status: Needs work » Closed (won't fix)

I am closing this issue due to lack of replies.

chrislynch42’s picture

Status: Closed (won't fix) » Active

Its been a while but I have time now to make the changes. I will be addressing the issues in two posts.

3. I did not want the module sharing the same permission sets as the node core. Allowing someone to edit all story's/pages does not mean that you want them to be able to edit all books. You may want to split up the work load or compartmentalize your security.

7. drupal_ucfirst returns the entire string with the first letter capitalized. That line of code is only returning the first letter capitalized.

avpaderno’s picture

Status: Active » Closed (won't fix)

Please re-apply for a CVS account; this application has been left without replies, and it it has been already declined. Changing the status of this report doesn't change the status of the CVS application.

avpaderno’s picture

Component: Miscellaneous » new project application
Issue summary: View changes
Status: Closed (won't fix) » Closed (duplicate)
Related issues: +#988260: chrislynch42 [chrislynch42]