About:
Module Instructions module shows the content of README.txt and INSTALL.txt files for contrib modules.
If you were missing a README or INSTALL info about a Drupal module, this module will come in handy. No need to search for README and INSTALL files any more - open those files in Drupal adminstration.
How to use:
Install Module Instructions module and you will find the links to README and INSTALL files in module list (admin/module) page in Operations column.
Project page: http://drupal.org/sandbox/alesr/1526218
Git repo: git clone --branch 7.x-1.x alesr@git.drupal.org:sandbox/alesr/1526218.git
Git url: http://git.drupal.org/sandbox/alesr/1526218.git
For: Drupal 7 only
Reviews of other projects:
- http://drupal.org/node/1364772#comment-5721680
- http://drupal.org/node/1481794#comment-5853816
- http://drupal.org/node/1485182#comment-5853880
| Comment | File | Size | Author |
|---|---|---|---|
| #26 | module_instructions-1526246-26.patch | 6.66 KB | tim.plunkett |
| module_instructions.png | 21.15 KB | alesr |
Comments
Comment #1
patrickd commentedWelcome!
Please take a moment to make your README.txt follow the guidelines for in-project documentation. Also it's really only necessary to put the installation documentation into an extra file if it's multiple site long.
Have a look at the tips for a great project page.
t($module . ' (' . $file . ')');- have a look at the t() functions documentation and use placeholders instead.Also, as this is not really a translatable string you should use the similiar but non-translating format_string() function here.
Be aware of module_filter module, it'll change the whole form and do it the none-#tree style, you should handle that case.
We do really need more hands in the application queue and highly recommend to get a review bonus so we can come back to your application sooner.
regards
Comment #2
luxpaparazzi commentedIt would be better to put the link http://git.drupal.org/sandbox/alesr/1526218.git as your GIT URL.
1. Why do you set the same menu-entry twice?
2. In Drupal you don't need the wildcards % at the end of a menu entry, they will be appended automatically, check the documentation, you may also check the project "Directory based organisational layer." @ http://drupal.org/sandbox/luxpaparazzi/1301730 for having a working example:
An empty array is passed to 'page arguments', any arguments will then automatically be past to the callbackfunction odir_filelist ...
3. "_" represents a hidden function, Page callbacks and menu callbacks should not be hidden
return t($module . ' (' . $file . ')')4. You should never put variables into the t() function, they should be used as placemarks, please consult the api documenation.
5. _module_instructions_system_modules_fieldset: It is recommanded putting all HTML into theme functions, or even better into theme files, please consult the theme documentation.
Comment #3
alesr commentedThanks for a good review patrickd.
- README.txt is in sun's README style now
- INSTALL.txt is removed
- t() with placeholders and moved to format_string() function
- I rewrited the module to live in synergy with Module Filter (you were right about the breaking)
Comment #4
alesr commentedThanks for review luxpaparazzi.
- I added Git url in project info.
- I removed the doubled menu entry.
- Without wildcards it is not working so I left them in.
- Callback functions are not prefixed with "_" (hidden) any more.
- Placemarks are added in format_string()
- _module_instructions_system_modules_fieldset is hooked and I kept it as it is (just added two elements in foreach)
Comment #5
luxpaparazzi commentedTyp:
should point to the comment directly, not the project, so add the part #......
Comment #6
luxpaparazzi commentedwould be better using t() which uses the same syntax, see http://api.drupal.org/api/drupal/includes!bootstrap.inc/function/t/7
Comment #6.0
luxpaparazzi commentedAdded git url: http://git.drupal.org/sandbox/alesr/1526218.git
Comment #7
patrickd commentedwhy? this "( )" is not really translatable, IMHO this would just create unnecessary workload for translators.
Comment #8
alesr commented@luxpaparazzi:
- added direct links to project comments.
- as @patrickd wrote in comment #1 - it is better to use format_string() as this string does not need to be translated.
Comment #9
luxpaparazzi commented@alesr, ok @patrickd was write, I did not correctly read his review, nor did I check the contents correctly, sorry for bothering you with that one ;)
Comment #10
alesr commentedComment #11
luxpaparazzi commentedYou may consider getting a review bonus and one will come back to your application sooner, but in fact I suppose your reviews should be little more complete.
If you wish you may check my project @ http://drupal.org/node/1302786
Comment #11.0
luxpaparazzi commentedLinks of reviewed projects.
Comment #11.1
alesr commentedReviewed links.
Comment #11.2
alesr commentedReview links.
Comment #12
alesr commentedComment #13
gaëlgAutomatic review is OK.
Well-documented.
You could make your code smaller and clearer, which prevents coding errors:
Why don't you use
$iteminstead of$form['modules'][$module]? It's the same for your other foreach loops, you could have a smaller and clearer code by using directly the value provided by the foreach loop, instead of the key. Sometimes you may even not need the key:Same for install link. And you also have redundant code in your theme functions.
I'm not sure your theme functions are properly named. I would start them with
theme_. But I might be wrong, as these are core replacements.I tested it with and without Module Filter, and it works like a charm.
I think this is good enough to be changed to RTBC, but I'm a newbie in reviewing. So I don't change status and don't remove PAReview bonus tag. I guess a more experienced reviewer will know what to do.
Comment #14
dman commentedRE this module -
You know that http://drupal.org/project/advanced_help already does auto-detect README files and make them available through the admin UI in the same way you advertise here?
Have you compared that one with this?
advanced_help *prefers* that you provide full, structured HTML documentation, but also, as a Freebie, throws in this feature because it's a good start.
Comment #15
alesr commented@dman, thanks for the link. I compared Module Instructions and Advanced Help.
The differences are:
@GaëlG, thanks for the review.
Comment #15.0
alesr commentedlinks
Comment #15.1
alesr commentedlinks
Comment #16
dark-o commentedComment #17
dark-o commentedI instaled the module but I can not see how to use it. Nothing has changed on the modules list, or am I missing somthing. Are they suposed to be links to README and INSTALL files on the modules page?
----------------------------
in the README.txt you can add section how to use once is installed, For example. Once installed simply go to modules page ...
-----------------------
It looks as useful module, saves you going to file system.
Comment #18
alesr commented@Darko Kantic: yes, you get the links to README and INSTALL files on module pages. No configuration needed. Just enable the module and you will see the links in the module list on the right side.

Like on the picture.
I guess you only have Core modules inside, which does not have README or INSTALL files in folders!
Try downloading any contrib module and check.
Yes, this is the main purpose, thanks ;)
Comment #19
dark-o commentedOk, I can see links now, sorry I was looking at core modules
Comment #20
dark-o commentedIt looks all good to me.
Comment #21
klausiReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.
manual review:
'<pre>' . file_get_contents($fullpath) . '</pre>'? Also it would be really helpful if links would be made clickable, so that I don't have to copy&paste URLs in Readmes.<script>alert('XSS');</script>this will be executed. Not really a security issue, as I don't consider text from a Readme as user provided input, but you should sanitize it to plain text anyway.Otherwise I think this is nearly ready. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #22
alesr commented@klausi: thanks for a detailed review. The best part of it is that the README and INSTALL files are now sanitized and URLs are clickable.
0. PAReview.sh: ✓
1. "How to use" mentioned in project page and README.txt: ✓
2. t($type) -> t('@type', array('@type' => $type)); ✓
3. README and INSTALL files in
Comment #22.0
alesr commentedlinks
Comment #22.1
alesr commented3 links for new bonus
Comment #22.2
alesr commentedul fix
Comment #23
alesr commentedUsing the second bonus.
Comment #24
klausiGood job!
manual review:
'<pre>' . _filter_url(check_plain(file_get_contents($fullpath)), $filter) . '</pre>'.Otherwise this looks RTBC to me. Assigning to tim.plunkett as he might have time to finally approve this. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #25
alesr commented@klausi: I need the non translated 'readme' for a part of link's class name in _module_instructions_create_link_array(). That's why I t() it later.
Comment #26
tim.plunkettI have a couple nitpicks, which I've attached as a patch. Note, it adds a couple @todo's, fill those in.
That said, welcome to the community of project contributors on drupal.org.
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.
Comment #27.0
(not verified) commentedproject info fix