CVS edit link for khurramfraz

I want to develop maptimize module for drupal which will be basically integration with maptimize.com. This module will synchronize google maps to maptimize.com and display as cluster map.

Currently there is no such module in drupal to integrate with maptimize.com

http://www.maptimize.com/

Comments

yesct’s picture

I think you need to attach an archive of the actual code for your finished module...

You might want to read http://drupal.org/node/539608
Especially the bit about "Here is a list of common motivation messages that, more often than not, get declined/rejected. If your motivation message resembles one of these then please, think before applying.

[....]
* I am planning to create modules / themes. Who applies for a CVS account should have already a module / theme. The purpose of a CVS application is to review code, and verify the degree of understanding about how a Drupal module is written; without a module there would not be a review, and there is not CVS application. For the same motivation reported in the previous point, future CVS applications reporting only this motivation will be declined. "

avpaderno’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

There have not been replies in the last week. I am marking this application as won't fix.

khoomy’s picture

Title: khurramfraz [khurramfraz] » taxonomy_node_filter
Assigned: Unassigned » khoomy
StatusFileSize
new34.04 KB

The Taxonomy Node Filter module is designed to present an easy-to-use block interface for narrowing down taxonomy listings to find topics that are tagged by multiple terms. There are upto ten blocks can be created initially. In each block settings form administrator can attached one or more vocabularies. Taxonomy Filter Block display a form with drop down taxonomies. Upon submit page is redirected to drupal default taxonomy page as /taxonomy/term/x,y,z

khoomy’s picture

Hi kiamlaluno

I have postponed my project "Maptimize" and i will work on this later. Currently i have developed new project "Taxonomy Node Filter" and want to add in drupal. How can i apply for new project. you can see my new project in last comment.

Thanks

avpaderno’s picture

Title: taxonomy_node_filter » khurramfraz [khurramfraz]
Assigned: khoomy » Unassigned
Status: Closed (won't fix) » Needs review
Issue tags: +Module review
khoomy’s picture

StatusFileSize
new2.23 KB
khoomy’s picture

can you please review my project taxonomy_node_filter

avpaderno’s picture

Status: Needs review » Needs work
  1. See http://drupal.org/coding-standards to understand how a module should be written; in particular, see how the code should be formatted.
  2. Submission functions don't use drupal_goto(), in Drupal 6.
  3. The first argument of t() must be a literal string; differently, the script that extracts the string to translate to create the translation template will not be able to extract the string, which would not be translatable (if not in the case another module uses the same exact string, but it's rather difficult it happens, when the string is dynamically changed).
  4. Strings used in the user interface should be in sentence case.
khoomy’s picture

StatusFileSize
new2.24 KB

I have removed drupal_goto and used $form_values['redirect']. t() is used properly. and used sentence case for user interface strings.

Please review latest updated code attached herewith.

avpaderno’s picture

Status: Needs work » Needs review

Remember to change status, when you upload new code, or nobody will notice you updated the code.

khoomy’s picture

Assigned: Unassigned » khoomy
avpaderno’s picture

Assigned: khoomy » Unassigned

The field assigned is used to mark who will review the code for this application; who is applying for a CVS account cannot review is own code, for obvious reasons. :-)

khoomy’s picture

so what status should i use for latest code?

avpaderno’s picture

Status: Needs review » Needs work
  • 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.
  1. The version line needs to be removed from the .info file.
  2. See http://drupal.org/coding-standards to understand how a module should be written. In particular, see how the code should be formatted.
  3. The module doesn't implement hook_uninstall().
khoomy’s picture

Status: Needs work » Needs review
StatusFileSize
new3.1 KB

Drupal coding-standards applied on all files of modules and verified by http://drupal.org/project/coder

hook_uninstall is implemented.

khoomy’s picture

StatusFileSize
new3.1 KB
drupalshrek’s picture

Hi khoomy,

I'm not an expert, but I'm having a look to see if I can help this application along...

Good:
1) A README.txt hooray! You'd be surprised how many people submit modules without even that. Although it's not required, you wonder why people create modules without explaining to people how to use them. And named README.txt, hooray!
2) Coder finds 0 errors :-)
3) Install does variable_del()
4) t() used for translations
5) Every function commented
6) No SQL, so no problems there

Not so good:
1) README.txt tells me how to install, but many users (such as me!) will use this file as a primary source of information about what the module does and how to use it. I can see that you can write good docs when you want, so go for it! Though README.txt is not obligatory (for reasons I don't understand), so that's not blocking.

Nothing I see wrong with this application. For me it's RTBC.

lorinpda’s picture

Hi,
First, this is a really great utility :) I haven't done a survey of all the taxonomy related contributed modules, however just reviewing functionality this module provides, seems really useful.

You module provides a form that allows the user to select nodes based on multiple taxonomy terms. First a couple design comments:

  • I would expand the narrative in your hook_help implementation. Currently users are restricted to constructing a logical "AND" query (when selecting from multiple vocabularies). Therefore, it would help folks if you explicitly explained the query they are building is an "AND". For example, "select all nodes that have a value of cat in vocabulary animal AND a value of women in vocabulary gender."

    At first, I thought the module was returning incorrect results. However, that's because there is no indication whether the query is a logical "AND" , or logical "OR".

    To summarize, it works fine as a logical "AND", however your documentation should spell that out to users.

  • I would consider adding additional form controls that allow the user to select "AND" or "OR". That would allow the use to build a query like : "select all nodes that have a value of cat in vocabulary animal OR a value of women in vocabulary gender." . Just a thought.

Next a technical suggestion:

  • In your form submit handler (taxonomy_node_filter_form_submi() ) you are using the $form['#post'] array to process user input. Please consider using the $form_state['values'] array instead, Using $form_state is the Drupal standard. For example, an alternative construct would something like:
    $terms_selected = NULL;
    for ($index = 1; $index < count($form_state['values']); $index++) {
        if (isset($form_state['values']['vocab_' . $index])) {
          if (!empty($form_state['values']['vocab_' . $index])) {
            if (is_null($terms_selected)) {
              $terms_selected .= $form_state['values']['vocab_' . $index];
            } else {
              $terms_selected .= ',' . $form_state['values']['vocab_' . $index];
            }
          }
        } 
        else {
          break;
        }
    }
    
  • Also at the end of the form submit handler taxonomy_node_filter_form_submit() you should add a verification that at least one taxonomy terms has been selected before redirecting. You might consider rendering a message if no taxonomy term is selected. For example, something like :
    if (!empty($terms) ) {  
     drupal_set_mesage(......);
    } 
    else {
     $form_state['redirect'] =......
    }
    

Hope that helps.

avpaderno’s picture

Status: Needs review » Needs work

I am changing status as per previous comment.

khoomy’s picture

StatusFileSize
new3.35 KB

Thanks lorinpda

Now from block configuration page user can set logical operator for multiple terms as 'OR' or 'AND'.
$form['#post'] is replaced with $form['#values']

Please review the code (comment #21)

khoomy’s picture

Status: Needs work » Needs review
StatusFileSize
new3.39 KB

Updated

khoomy’s picture

Component: Miscellaneous » miscellaneous

Please review the code

yasir farooqui’s picture

Status: Needs review » Reviewed & tested by the community
avpaderno’s picture

Component: miscellaneous » new project application
Status: Reviewed & tested by the community » Needs review
lorinpda’s picture

Hi,
I installed the version of your module posted in comment #21. I installed and tested on a Drupal 6.20 installation.

Nice job! Really close.

Here are my issues:

  1. You've extended the functionality to allow folks to add multiple instances (blocks) and custom configurations per instance (block). Really nice. I would just add a small corresponding elaboration in both your hook_help() and your README.txt file.
  2. In your hook_uninstall() implementation, I would explicitly perform a variable_del for each entry in the variable table (that you module set). Currently you are looping through each of values stored in the global conf variable array instance. Then deleting whatever array element contains the pattern ''taxonomy_node_filter_'. This is analogous to folks deleting from the 'variables' database table, selecting records to delete based on a pattern. From reading other reviews in this queue, that's not a preferred method. You introduce the chance that you are deleting someone else's variables.
  3. In general, the variable table should be used sparingly. I don't know if there is a specific guide, but if every module makes heavy use of the variable table, not only will the table, but the global conf variable size become a performance issue.


    In your case, really nice feature to allow folks to set 1 to 10 blocks. However you are now close or at the point to where your settings should be persisted in a separate database table.


    It looks like you are storing up to 21 entries in the variable table. Is that correct?


    I'll leave it at that. Maybe other reviewers have a better grasp of what the threshold is for use of the variables table.
  4. I noticed you now have a call to drupal_add_css(). However, you are calling it in a hook_form() implementation. I believe for performance reasons, drupal_add_css() should be called from within hook_init().


    If you wanted to style the form you would implement hook_theme() first. That tells the theme engine that your module is going to style (theme) some components. Next you would set a #theme element in your form which points to a new method like theme_taxonomy_node_filter_form().
  5. In your method taxonomy_node_filter_block() please consider replacing the multiple elseif constructs performed on $op (operation). Please use a switch/case construct instead.
  6. That brings me to my final point. Again really nice utility!! I would consider providing a theme, theme preprocess, and a taxonomy_node_filter_block.tpl.php. Together, all three of those components would allow themers to custom the style of the great blocks your module provides. Something to consider. I'm actually not sure whether this is a requirement or not. I've done it for the modules I write.

Hope that helps.
Lorin

khoomy’s picture

StatusFileSize
new4.33 KB

Hi Lorin

Many thanks for appreciation and useful suggestions.

There is only one variable now. I have created separate database table for storing block specific settings and implemented hook_schema for new table.

I did not added drupal_add_css() in hook_init() because this hook is called on each request even the form is not being displayed. CSS should only be displayed when there taxonomy node filter form is being displayed. Now I added drupal_add_css() in theme_taxonomy_node_filter_form().

hook_theme and theme_taxonomy_node_filter_form are implemented now for themer. Template file for block is implemented.

Multiple elseif are converted to switch/case construct in hook_block.

Again thanks for the help

lorinpda’s picture

Hi,
I reviewed the version of your module posted in comment #26. I installed you module on a Drupal 6.20 installation. Nice job, real close, just a few issues:

  • Coder is still reporting some formatting issues. Please make sure you run you source code through Coder. Set Coder's options to "minor" and "Internationalization". For example, here is the output from Coder:
    Line 204: table names should be enclosed in {curly_brackets}
    
       db_query("DELETE FROM taxonomy_node_filter  WHERE delta = %d",$delta);
    

    So all you need to do is change that line to:
    db_query("DELETE FROM {taxonomy_node_filter} WHERE delta = %d", $delta);

  • On my installation, the following raised an exception: function theme_taxonomy_node_filter_form(&$form) {, the parameter is supposed be passed by value rather than reference. Thus please consider changing to: function theme_taxonomy_node_filter_form($form).
  • In your method function taxonomy_node_filter_uninstall() { you a statement global $conf;. Sorry, I couldn't figure out what purpose that line serves. I comment it out and tested you uninstall routine. Worked without the global $conf;, there I would consider removing that line.

Again, great job, really close.
Hope that helps.
Lorin

arianek’s picture

Status: Needs review » Postponed

Hi. Please read all the following and the links provided as this is very important information about your CVS Application:

Drupal.org has moved from CVS to Git! This is a very significant change for the Drupal community and for your application. Please read the following documentation on how this affects and benefits you and the application process:
Migrating from CVS Applications to (Git) Full Project Applications

  • The status of this application will be put to "postponed" and by following the instructions in the above link, you will be able to reopen it.
  • Or if your application has been "needs work" for more than 5 weeks, your application will be marked as "closed (won't fix)". You can still reopen it, by reading the instructions above.
khoomy’s picture

Status: Postponed » Needs review
StatusFileSize
new4.3 KB

Hi,

Please find updated module. Module is now passed by coder.

zzolo’s picture

Status: Needs review » Postponed

Hi. Please read all the following and the links provided as this is very important information about your CVS Application:

Drupal.org has moved from CVS to Git! This is a very significant change for the Drupal community and for your application. Please read the following documentation on how this affects and benefits you and the application process:
Migrating from CVS Applications to (Git) Full Project Applications

  • The status of this application will be put to "postponed" and by following the instructions in the above link, you will be able to reopen it.
  • Or if your application has been "needs work" for more than 5 weeks, your application will be marked as "closed (won't fix)". You can still reopen it, by reading the instructions above.
khoomy’s picture

Project: Drupal.org CVS applications » Drupal.org security advisory coverage applications
Status: Postponed » Needs review
khoomy’s picture

Trailing spaces removed
CVS tags are removed
Passed by coder module

Sandbox project link: http://drupal.org/sandbox/khoomy/1075606

meba’s picture

Status: Needs review » Reviewed & tested by the community

IMHO good to go

mlncn’s picture

Status: Reviewed & tested by the community » Fixed

Congratulations, you know can promote sandbox projects to full status ones!

Nice work and when you would like further review for any module please do ask for one at http://groups.drupal.org/peer-review/requests

A little bit of cleanup/checking called for-- you call your implementation of hook_menu() "Implementation of hook_block()." ;-)

benjamin, agaric

Status: Fixed » Closed (fixed)
Issue tags: -Module review

Automatically closed -- issue fixed for 2 weeks with no activity.

avpaderno’s picture

Title: khurramfraz [khurramfraz] » [D6] Taxonomy Node Filter
Component: new project application » module
Issue summary: View changes
Issue tags: -Module review