This module creates a simple admin form in 'admin/build/search_page_submit_button_text' allowing the admin to change the text of the default submit button on the search page as well as changing the submit text on the search block
Sandbox Page
http://drupal.org/sandbox/sarsena/1321448
Git Repo
git clone http://drupalcode.org/sandbox/sarsena/1321448.git
This module currently is for Drupal 6
| Comment | File | Size | Author |
|---|---|---|---|
| Screen shot 2012-06-12 at 4.11.25 PM.png | 30.34 KB | Sjarsena |
Comments
Comment #0.0
Sjarsena commentedplease hold on reviews while i double check my coding standards
Comment #1
olmeta.david commentedHi,
I think your module is too short.
Don't specify the "version" information in the ".info", the drupal.org system will specify it.
You don't declare the hook_perm() which must indicate your administer search_page_submit_button_text permission.
You have to indent too your code into all blocks (for example, on your if() instructions).
Don't forget the
t()function on the line 13 of your search_page_submit_button_text_form.inc arround the Search page's text : l('Search page\'s','search/node')You can use the ventral tool too in this URL : http://ventral.org/pareview and specify your git URL.
This tool is a very good way to know what's wrong in your module.
Regards,
Comment #2
Sjarsena commentedAlright changes have been made and ran through the ventral tool and fixed any issues it gave. Thanks for that tool!
Comment #3
iptechlabs commentedHi,
The project work correctly but the problem that is too short.
This url how much code do we need to approve a user? propose simple rules that can be used to deny the "create full projects" permission (everything with less than 120 lines of code or less than 5 functions cannot be seriously reviewed).
Comment #4
lva commentedHi,
When defining permissions in hook_perm is is not necessary and even nicer to not use underscores in the permission name. I'm not sure whether this are any Drupal guidelines about this, but I would recommend to change your implementation of hook_perm to the following (and of course update the permission references in your implementation of hook_menu):
Furthermore, in order to make the code a bit more performant I would recommend to replace the 2 "if"-statements in function search_page_submit_button_text_form_alter with either an "if-elseif"-structure of with a switch structure. For example:
And last but not least, I would recommend changing line 17 in file search_page_submit_button_text_admin_form.inc: you should use the t-function only once and use placeholders. So change line 17 to something like
t('Enter in the value for the !url submit button', array('!url' => l(t("Search page's"), 'search/node')));That would be more meaningful to potential translators.
Comment #5
Sjarsena commentedThanks for the input I will edit this and add those suggestions
Comment #6
charlietoleary commentedHi Sjarsena,
I'm not sure that this module's use case is warranted to become a full fledged drupal project.
In my opinion, string manipulation should be handled by existing modules (e.g String Overrides), or handled on a site by site basis.
Cheers, Charlie.
Comment #7
joelrosen commentedChanging this to closed as all reviewers seem to agree it is too short to warrant full project status.
Comment #8
klausiIt is perfectly fine to have short projects as full projects. It just means that we can't give the git vetted user role away, but we can of course promote the project manually.
We are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)
Comment #9
Ignigena commentedThere is still a master branch. Make sure to set a version specific branch and remove the "master" branch. See here for some instructions: http://drupal.org/node/1127732
Comment #10
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.
If you reopen this please keep in mind that we are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)
Comment #10.0
klausiUpdate and fixed any issues with coding and the repo