capabilities to Drupal. We worked together as a team to initiate six modules which implement
Google Map, Earth and Visualization APIs.
1. Timeline Map
2. Tagmap
3. GVS module
4. ct_gearth
5. importer
The Jefferson Institute team is building these modules under a Knight Foundation News
Challenge grant. The main idea was to visualize data from database tables imported with
TableWizard or other importers. We also made a CSV, excel2003 and files importer to import
data in a database and to link the data with files. After that we, used the TableWizard module to
make a view.
6. vidi
vidi is latest module, it serves as a guide to choose adequate visualizations from Timeline, Tagmap and GVS modules for specific data, and helps in process of preparing data and visualizations. It provides easy to use wizard for Timeline, Tagmap and GVS modules with visualizations preview.
Comments
Comment #1
obojan commentedComment #2
avpadernoHello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review the code, pointing out what it needs to be changed.
We review just a module / theme per applicant, which must be attached in a comment here. Without any code to review, the application cannot proceed.
Comment #3
obojan commentedHello, thank you for answering, and I'm sorry I was not able to reply earlier to your post. To clarify my previous post, I'm applying with only one module "vidi" which is an add-on (wizard) for previously listed. I'm uploading module code again in attachment. Thank you for your time.
Comment #4
avpadernoThank you for your reply.
Comment #5
obojan commentedHello, I just wanted to know how review is going? I much appreciate your time and effort, and if you need any additional information regarding "vidi" module, I'll be happy to reply. Thank you.
Comment #6
avpadernoWhat is the purpose of a menu callback that just returns a string about an access denied? What is the purpose of using access arguments for such menu callback?
Form submission handlers don't use
drupal_goto().For such cases, there is
db_query_range().If the content of
$tablenameis plain text, then it should be passed throughcheck_plain(); that means the placeholder is not the correct one.Avoid to escape a string delimiter inside a string, especially if the string is passed to
t().Comment #7
obojan commentedThank you for your time and review. I'm working on resolving all points you reported, and I'll upload fixed code as soon as I finish.
Comment #8
obojan commentedI have fixed issues you reported:
See http://drupal.org/coding-standards to understand how a module should be written. In particular, see how the code should be formatted.
Fixed indenting and whitespace, converted files to Unix line nedings, and cleaned up commented out code
Hook implementation comments should be like the following one
Fixed.
What is the purpose of a menu callback that just returns a string about an access denied? What is the purpose of using access arguments for such menu callback?
Fixed. Removed callback, rewrote code that used it.
Strings used in the user interface should be translated.
Fixed. I have left some strings that explain usage in HTML tags in order to avoid text being to fragmented and hard to translate. If that is not recommend, I'll put only strings i t() function
Form submission handlers don't use drupal_goto().
Fixed. Rewrote code.
For such cases, there is db_query_range().
Fixed.
If the content of $tablename is plain text, then it should be passed through check_plain(); that means the placeholder is not the correct one.
Fixed.
t("No entries in table @$tablename", array('@$tablename' => $tablename))Avoid to escape a string delimiter inside a string, especially if the string is passed to t().
Fixed. Used alternative character
Thank you for review.
Comment #9
avpadernohook_uninstall(), or doesn't implement it to remove the Drupal variables it defines.or is not translated.
The correct is not
A form submission handler is still using
drupal_goto().That query is not understood from all the database engines supported by Drupal (AFAIK).
Reserved SQL keywords are written in uppercase.
The coding standards describe how to write a control structure.
The strings used as headers are not translated.
The correct code is not
(Except for the curly parentheses, which are required by the coding standards.)
What is wrong, here?
If the module doesn't support all the database engines supported by Drupal, then it should implement
hook_requirements()to avoid it is installed on a Drupal-powered site that is not using MySQL, or PostgreSQL. So far, those are the only supported database engines; checking for a third type is probably not necessary (at least for Drupal versions before Drupal 7).The message strings should end with a period.
Use placeholders, instead of injecting values into an SQL query.
All that JavaScript code should go in a separated file.
There is a theme function for images.
The code should verify if those images are really present in the directory of the currently set theme.
The description should say something more that the input must be a number.
Form fields are generated using the form API.
Comment #10
obojan commentedFixed. Changed isStacked to is_stacked and
returning_gvs to vidi_returning_gvs
There is vidi_uninstall() which removes dbtable “vidi_visualization_tables”. Other than that, module does not define any variables to dbtable “variable”. Is there something additional I should clean up on uninstall?
or is not translated.
The correct is not
Fixed.
A form submission handler is still using drupal_goto().
Fixed. I’m sorry I missed it.
That query is not understood from all the database engines supported by Drupal (AFAIK).
Reserved SQL keywords are written in uppercase.
Fixed.
The coding standards describe how to write a control structure.
The strings used as headers are not translated.
The correct code is not
(Except for the curly parentheses, which are required by the coding standards.)
Fixed.
What is wrong, here?
Fixed. I added curly braces as coding standard for control structures describes. Line
$output .= '<div class="vidi-preview-wrapper"></div>';adds div where ajax callback later inserts data for display.If the module doesnt support all the database engines supported by Drupal, then it should implement hook_requirements() to avoid it is installed on a Drupal-powered site that is not using MySQL, or PostgreSQL. So far, those are the only supported database engines; checking for a third type is probably not necessary (at least for Drupal versions before Drupal 7).
Fixed. Erased checking for a third type.
The message strings should end with a period.
Fixed.
Use placeholders, instead of injecting values into an SQL query.
Fixed.
All that JavaScript code should go in a separated file.
Fixed. This code is needed inside head tags in order to function properly with Google maps API.
There is a theme function for images.
The code should verify if those images are really present in the directory of the currently set theme.
Fixed.
The description should say something more that the input must be a number.
Fixed.
Form fields are generated using the form API.
Fixed.
Thank you for review.
Comment #11
obojan commentedI have fixed several code formatting warnings I got reported from coder module, and I have attached module again. Thank you for reviewing my application.
Comment #12
Scyther commented1.
the way you have write it means
should be
2.
Missing end } around the table name. Don't know if you use this function more, but else I would do like this:
Replace, line 52, 53 in vidi_tagmap_form.inc
with this
(think that '%s' will work there) and remove the function _vidi_tagmap_simple_sql($...)
3.
Still missing { } round if
and at alot more places.
4. More comments on functions and what they do would be handy.
Comment #13
avpadernoPlaceholders are not thought for table names; the code should be written as
Comment #14
obojan commentedFixed.
Fixed. Removed function _vidi_tagmap_simple_sql() and rewrote as
Fixed.
Thank you for review and all comments.
Comment #15
avpadernoStrings used in the user interface should be translated.
Why isn't the code using a CSS file, instead of calling
drupal_set_html_head()?The code is outputting a lot of HTML without using a theme function.
Where is the function
tw_add_tables()defined?Comment #16
obojan commentedFixed. Fixed here and in all link functions.
I fixed this and also reorganized .css files better.
Fixed all that coder module reported.
Fixed. Moved to theme function.
It is in table wizard (tw) module. Vidi module is depends on tw module, vidi.info:
Thank you for reviewing and for all comments.
Comment #17
avpadernol()should not be used together witht(). See the documentation for t(), where this code is reported to be wrong:The correct code to use is the following:
There should be a space before and after a binary operator.
The coding standards report that a function name should use lowercase characters.
The curly parentheses in the control statement are not optional as per Drupal coding standards; the last statement should be written
Comment #18
avpadernoComment #21
avpaderno