
Description:
The thundersearch module provides access to an existing Thunderstone search engine (server). No other Drupal module is integrated with a Thunderstone search engine. If you are not using one, you do not need this module.
The module makes calls to the search engine using a URL with the appropriate options string. One option is the name of the search index, which can be a meta-search. This name is case sensitive.
The format of the returned search results is set by an XSLT stylesheet uploaded to the search engine, or by one of the default Thunderstone stylesheets. These are determined by settings on the search engine for the specified search index.
You can provide a list of suggested searches next to the search bar by creating terms in the Thundersearch taxonomy (which the module creates).
It also has a world map that allows you search by nation.
Project page:
https://drupal.org/sandbox/imgio/2164731
Sandbox git:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/imgio/2164731.git thundersearch
Manual reviews of other projects:
https://drupal.org/node/2203417#comment-8516149
https://www.drupal.org/node/2313617#comment-9030171
| Comment | File | Size | Author |
|---|---|---|---|
| #36 | Screen Shot 2014-12-19 at 12.31.36 pm.png | 21.71 KB | ajits |
| #32 | after_submit.png | 12.97 KB | pushpinderchauhan |
| #32 | before_submit.png | 8.08 KB | pushpinderchauhan |
Comments
Comment #1
imgio commentedComment #2
merdekiti commentedHi,
Check and fix this errors http://pareview.sh/pareview/httpgitdrupalorgsandboximgio2164731git
Comment #3
feyisayo commentedHello imgio,
Thanks for the work on the module. Such work adds to the making the Drupal ecosystem more robust and a compelling option as a platform.
I would like to suggest something: your .module file is quite large (238 KB) and it is because all your functions are in it. This large size could have a performance cost as the entire .module file is loaded whenever a page is requested.
I think it would be a good idea to have only your hook functions in the .module all other functions can be placed in an .inc file.
This same idea is also applicable to your menu hook: instead of placing the menu callback functions in the .module file you can place them in the .inc and reference them via the 'file' element.
For example, instead of
You can have:
In this example, the function thundersearch_form() will not be in thundersearch.module instead it will be in thundersearch.inc
You may consult https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_menu/7 for further details
All the best,
Feyisayo
Comment #4
imgio commentedDear merdekiti, I'll do my best to correct the errors from pareview.sh
Dear feyisayo,
Thanks for your detailed suggestions and examples of how a .inc file
would useful for this module. I will work on creating it.
Regards,
imgio
Comment #5
imgio commentedComment #6
imgio commentedFixed all errors suggested by preview.sh.
Working on the .inc file now.
Comment #7
fernly commentedReview:
Comment #8
imgio commentedDear lennartvv,
thanks for taking your time to review my module.
Here is what I did for each of your input points:
1. Fixed.
2. Fixed the spelling of countries. It's amazing that you noticed!
3. Deleted "Implements" from all non-hook functions.
4. Fixed.
Additionally,
I created a thundersearch.inc file to house all non-hook function code and a thundersearch.map.inc file to house the map code.
This fixed the issue suggested by feyisayo.
The module is ready for further review.
Comment #9
imgio commentedComment #10
PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #11
imgio commentedComment #12
imgio commentedComment #13
imgio commentedComment #14
imgio commentedComment #15
imgio commentedComment #16
imgio commentedComment #17
imgio commentedComment #18
imgio commentedComment #19
imgio commentedReally appreciate everybody's help and comments.
Comment #20
jkswoods commentedHi imigio,
I notice in the 'thundersearch.module' file where you implement hook_menu you define a new page past /admin/config/.
Whenever creating a admin config page it is best to include the config page in your .info file; so for example, in this case i recommend adding this to your .info file:
configure = admin/config/search/thundersearchWhen a config page is defined in the .info file it allows that config page to be accessed straight from the modules list in the admin drupal interface.
It is also recommended to put anything with hook_admin_* in a
module_name.admin.incfile. So to fix this all you would need to do is:Then move all the hook_admin_* functions into this file and as long as it is first being referenced in the .module file all your code will still be accessible.
Comment #21
imgio commentedThanks for commenting, jkswoods.
I implemented all your suggestions.
Needs review and approval.
Comment #22
imgio commentedComment #23
shyam kumar kunkala commentedHi,
It is recommended to place all images under images folder. In your module images (us.png etc ) are under root folder.
Comment #24
imgio commentedFixed that.
Thanks.
Comment #25
szubkov commentedBest regards
Comment #26
imgio commentedDear FeintEars,
Thanks greatly for your input.
I addressed all of you points in the following manner:
1. The error reporting was used while developing. I removed it. Thanks.
2. I integrated Module_load_include.
3. DRUPAL_NO_CACHE has be used because there is no need for unnecessary search data to be stored.
4. I experimented with using a block.tpl.php for the two maps and found that this is not necessary in this case. The purpose of the functions in solely to define the image map of US and the world to be searched using those images. Enough css ids and classes are used in the creation of the blocks for a user to freely manipulate their look and positioning. There is no other functionality that they require to override the theme hook declarations.
Additionally, I created a new 'includes' folder to house all the .inc file.
Regards,
imgio
Comment #27
klausiRemoving review bonus tag, you have not done all manual reviews, you just repeated the output of an automated review tool. Make sure to read through the source code of the other projects, as requested on the review bonus page.
Comment #28
rachit_gupta commentedSome small issues reported in coder , please fix them. Rest all looks fine.
thundersearch.inc
severity: normalreview: style_string_spacingLine 166: String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms [style_string_spacing]
$img_path = $url . '/' . drupal_get_path('module', 'thundersearch');Line 276: String concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms [style_string_spacing]
$pagign_tbl .= '<TD WIDTH="100" ALIGN="RIGHT" style="text-align:right;"><a href="' . thundersearch_parseURL($tdata['table']['tr']['td'][2]['a']['href']) . '"><IMG SRC="' . $urls['img_path'] . '/next.gif" HSPACE="0" VSPACE="0" BORDER="0"></a></TD>';Line 289: Remove PHP debugging function calls. [production_php]
echo "<pre>";print_r($arr);echo "</pre>";Comment #29
imgio commentedThanks rachit_gupta.
I fixed the errors.
Comment #30
subhojit777I am going to the module's admin setting and I get PHP error message
Looks like you need to update
hook_menu()Comment #31
imgio commentedFixed every error. I need someone to change the status to RTBC.
Comment #32
pushpinderchauhan commented@imgio, first of all thankyou for your contribution.
IMHO, you should review some module and get review bonus tag.
Manual Review:
I did not reviewed your whole module code, just check configuration form and its code (
thundersearch.admin.inc).1. As per Drupal naming convention, you are missing
$form_statevariableIt should be:
2. It looks silly, you are using
system_settings_form()and also defining submit function with this.I think it should be like this if you are managing something different in your submit function that
system_settings_form()don't do.3. From your validation function, it seems you are just validating whether field value is empty or not. Even that is also not correct, if you just enter space in field, it get saved because no trim function is used in following code.
Then why are you not adding just
'#required' => TRUE,to get it done.4. Your submit function looks wired, not sure what you are trying to do with this extra code:
You yourself make this form complicated, it can be easily achieved using system_settings_form() and there is no need to define validation and submit function. Due to some bug in your submit function, if you try to save some dummy value in
URL of Thunderstone serverfield, it reverted with default value (http://thundersearch.eafoundation.com) after save every time.Before Submit:


After Submit:
Instead of writing this whole code, I would simply create this configuration form in following way:
Also all reviewers are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
@imgio, thanks again for your hard work!
Comment #33
pushpinderchauhan commentedOhh, forget to change this to Need Work.
Comment #34
imgio commentedDear er.pushpinderrana,
I greatly appreciate your detailed input.
As a side note, I did not personally write this code, I'm simply trying to fix it.
Thanks for your help.
Comment #35
imgio commentedComment #36
ajitsAutomated Review
No issues reported by PAReview. Good job!
Manual Review
thundersearch_form(), consider adding JS using the#attachedattribute of the FAPI. Just a recommendation.It is recommended to write small description of what the function actually does, unless it is a hook implementation.
thundersearch_getKeyword,thundersearch_getJump,thundersearch_getOrderBy, etc. I think for consistency you should use the function name separated with underscores for the function name in Drupal 7, unless it belongs to a class. Not sure if this is a blocker though.The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.
This review uses the Project Application Review Template.
This application has been in review for a long time in "Needs Review" state. All the reviews that you get are from the free time and effort put in by volunteers. I'd recommend you to participate in Review Bonus program, so that the GIT admins could have a look at it right away!
Comment #37
PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.