This module provides the ability to put some help text for each content type.
ex. if you have a specific content type say: "Ride" then it can be configured to display the ride steps i.e how to create a ride to end users.
Normally sometimes we need to put some Text for each node to help end users, this module provides the ability to do that.
Administrator can configure the text in the backend (HTML too) easily, then that block can be configured easily like a normal block

Project page (sandbox)

To clone if for first time is:

code: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/ashish.verma85/2525754.git node_help_text

manual reviews are :
https://www.drupal.org/node/2482205#comment-10141634
https://www.drupal.org/node/2536388#comment-10137208
https://www.drupal.org/node/2536668#comment-10137190

Few other reviews are:
https://www.drupal.org/node/2537434#comment-10141680
https://www.drupal.org/node/2310391#comment-10141700
https://www.drupal.org/node/2511228#comment-10141728
https://www.drupal.org/node/2535442#comment-10141746

CommentFileSizeAuthor
#17 menu name need to change.png11.82 KBbabusaheb.vikas

Comments

PA robot’s picture

Status: Active » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxashishverma852525754git

We 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.

ashish.verma85’s picture

yes i have already tested it, everything is fine.
Review of the 7.x-1.x branch (commit 575c760):

No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

ashish.verma85’s picture

Status: Needs work » Needs review
mojiferous’s picture

Status: Needs review » Needs work

1. Add the drupal version to your issue name ("[D7] Node Help Text")
2. Add the git clone command to the issue summary

Manual Review

general: Prefix your variable name with the module name to avoid duplication issues with other modules (in all your variable_set and variable_get function calls)
general: It appears that any user with 'access content' permission can add or save help text for node types, which is then displayed to every user. Consider implementing a custom permission or letting module users know that this is the case.
node_help_text.module: fix the documentation block for node_help_text_form_submit(), it currently states that it implements hook_permission()
node_help_text.module: fix the documentation block for node_help_text_viewb()
node_help_text.module: Consider renaming node_help_text_viewb() to something more descriptive related to its function

ashish.verma85’s picture

Title: Node Help Text » [D7] Node Help Text
Status: Needs work » Needs review
ashish.verma85’s picture

Issue summary: View changes
ashish.verma85’s picture

hi Mojiferous
thanks for checking it up

I have corrected all the points and fixed the documentations.
#1 corrected, i have changed the variable names and added the corrected documentations
#2 for permission now only admin can add the help text, for end users its only a block so there permission can be easily set from the block, later on i will introduce the hook_permission() when i will add more features to this module.
#3,#4,#5 fixed, documentation corrected, function name changed.

Thanks

ajalan065’s picture

Status: Needs review » Needs work

Hi ashish.verma85,
Please correct your git link, as this requires your password for cloning.

ashish.verma85’s picture

Issue summary: View changes
Status: Needs work » Needs review
ashish.verma85’s picture

corrected

ajalan065’s picture

Hi ashish.verma85,
Now the git command is correct.
I would like to point out few things,
1. In your .info file, remove the last line. Its not required.
2. In your .install file, the function should be hook_uninstall() rather than hook_install().

Please correct them.

Manual Review:
Individual User Accounts
Yes: Follows the guidelines for individual user accounts.

Licensing
Yes: Follows the licensing requirements.

3rd party asset/code
Yes: Follows the guidelines for 3rd party assets/code.

Secure code
Yes: Meets the security requirements.

ashish.verma85’s picture

hi ajalan065

All corrected.....was typos :)
please check and see if there is any more blockage to make it a regular project.

Thanks

AshwiniPatil’s picture

Hi ashish.verma85,

1) In README.txt add the config details.

2) On config page, after saving help text it is not getting pre-populated in text box.It shows empty.
I guess $value_field = variable_get('FIELD_VALUES'); must be 'NODE_HELP_TEXT_FIELD_VALUES'

AshwiniPatil’s picture

Status: Needs review » Needs work
ashish.verma85’s picture

hi Ashwini

Configuration step added.
Yes i missed to change the variable name at that place.

thanks

ashish.verma85’s picture

Status: Needs work » Needs review
babusaheb.vikas’s picture

Status: Needs review » Needs work
StatusFileSize
new11.82 KB

Hi ashish.verma85,

1) No need to use quote in info file
It should be
description = Provides Interface to add help text for each Content type.

2) There is already a menu name 'help' available in Drupal.
You need to change menu name.
menu name need to change

3) configure link is missing in your .info file.

4) In line no. 90 (*.module),
You have written <?php $ntype = $node->type; ?>

I have assigned help block on a page which have no any content type like as view page. it's showing below error, reducing the reliability of the module.

Notice: Trying to get property of non-object in node_help_text_view_content() (line 90 of D:\xampp\htdocs\sitename\sites\all\modules\node_help_text\node_help_text.module).
    Notice: Undefined index: in node_help_text_view_content() (line 92 of D:\xampp\htdocs\sitename\sites\all\modules\node_help_text\node_help_text.module).

5) You should provide the hook_help to allow site builders to find information about your module using Drupal UI.

ashish.verma85’s picture

Status: Needs work » Needs review

hi 1-4 fixed/changed
Hook_help Implemented.
Please check

babusaheb.vikas’s picture

Above point 3.
configure = admin/content/help
is still missing in your *.info file.

ashish.verma85’s picture

Please check now, and see if we can make it a full release now or do we have any other blockage

jelenakrmar’s picture

Module works well and code is well written. I have only a few suggestions for improvement:

1) At the end of README.txt, you mention setting permissions. Which permissions? This module does not define any, so I would just rephrase that. Blocks are by default visible for all users, even anonymous, but that can be configured in block settings, per block. So I really think there is no need for other permissions.

2) Block name is help, but there is already block system-help...consider changing it to Content help, or something like that.

3) It is recommended to always implement hook_install(). Here you can find an example.

4) Coder module reported issues in .module file on lines 32 and 35:

Line 32: Potential problem: FAPI elements '#title' and '#description' only accept filtered text, be sure to use check_plain(), filter_xss() or similar to ensure your $variable is fully sanitized.
      '#title' => t('Help text for:') . ' ' . $nname,
Line 35: Potential problem: FAPI elements '#title' and '#description' only accept filtered text, be sure to use check_plain(), filter_xss() or similar to ensure your $variable is fully sanitized.
      '#description' => t('Add help text here for') . ' ' . $nname,

Here you can find an example for better (the right) way of writing t() functions and passing parameters.

5) Improve documetation for form-generating functions
There is no hook_form_submit() in Drupal 7, that is just your submission handler.

6) In .module file on line 109, sentence is a bit confusing; maybe change to "all the content type help texts"?

ashish.verma85’s picture

hi jelenakrmar

Thanks for the suggestions.
1-6 all done. please check.

Thanks

ashish.verma85’s picture

Issue summary: View changes
viswanathan6’s picture

Hi,
1.it is recommended to add PHP version and package name in your .info file.

ashish.verma85’s picture

Hi,
Thanks for pointing it. added :) .

pushpinderchauhan’s picture

Issue summary: View changes
Issue tags: -PAreview: review bonus

Your first review is not a manual review, you just posted git URL correction. I'm going to remove the bonus tag, as well as links on reviews from the issue summary. Make sure to read through the source code of the other projects, as requested on the review bonus page. You can add it again if you have done 1 more review of other projects.

ashish.verma85’s picture

Issue summary: View changes
ashish.verma85’s picture

Issue tags: +PAreview: review bonus

hi er.pushpinderrana
Thanks for checking it out.
Thats done :). please check i have done few more and will keep doing even after module get published.

Thansk

ashish.verma85’s picture

Issue summary: View changes
ajalan065’s picture

Status: Needs review » Needs work

Hi ashish.verma85,
I think you have not taken into consideration this comment https://www.drupal.org/node/2525758#comment-10101418 . Please make sure, you have gone through all the comments and recommendations of the reviewers as they help you to improve your module.

An advice from git administrators.
The project might prove useful, but doesnot satisfy the code length requirements. So should it be given Single project promotion?
This is only a problem according to me, else it can be approved to RTBC.

ashish.verma85’s picture

Status: Needs work » Needs review

hi ajalan065
Can you please check again? because this has been added some days ago already.
This comment says that:

https://www.drupal.org/node/2525758#comment-10101418

Above point 3.
configure = admin/content/help
is still missing in your *.info file.

And this is my file:

name = Node Help Text
description = Provides Interface to add help text for each Content type.
configure = admin/content/help
package = Node Help Text
core = 7.x
php = 5.3

Please check its there.
I have taken care of all the things this has everything in that, Also This module will be enhanced and will be developed for drupal 8 too, so i feel this should get full permission because it covers most of the commonly used functions + variables + install files. Also personally i had developed around 100+ custom modules for few projects, so i have started contributing it to drupal, i don't think so there is a need for go through the process again and again. Please check and promote it for full release.

Thanks
Ashish

nijolawrence’s picture

Status: Needs review » Reviewed & tested by the community

It is working fine and ready for RTBC for a full release

ajalan065’s picture

Hi ashish.verma85,
Sorry for providing wrong link. the correct link is https://www.drupal.org/node/2525758#comment-10100364 .
Please change the block name from "Help" to something like "Help Text" so that it reflects your project's properties. Drupal already has "Help" with it. So please change it as per the comments of babusaheb.vikas

ashish.verma85’s picture

hi,ajalan065

its already content type help
t('Content type help');

May be you need to clear the cache?
Please check and let me know

Thanks

mpdonadio’s picture

Assigned: Unassigned » mpdonadio

I'll look at this tonight or tomorrow.

ashish.verma85’s picture

hi Matthew,

Sure Thanks :)

Regards
Ashish

mpdonadio’s picture

Assigned: mpdonadio » klausi

Automated Review

Review of the 7.x-1.x branch (commit 8e3354f):

  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

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. You have to get a review bonus to get a review from me.

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
No: Causes module duplication and/or fragmentation. Your project page and README should elaborate on how this is different than custom blocks provided by Drupal core, and by the help text already provided on the node forms, which is configurable. Right now, I don't see a difference. Not a blocking issue.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
Not seeing any problems.
Coding style & Drupal API usage
Why do you need PHP 5.3 for this? I didn't see any 5.3 specific things?

node_help_text_install(), that isn't the best wayto handle translated links. See the comments on https://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/t/7

NODE_HELP_TEXT_FIELD_VALUES, normally variables are all lower case.

The config page is protected by 'administer site configuration', and node_help_text_form() uses 'full_html'. You may need to rethink this if you
use your own permission in the future, as you will need to take into account whether the user has access to this text format.

The check_plain() on the #title and #description in node_help_text_form() are superflous. t() w/ @arg placeholders will generate a safe string. See https://www.drupal.org/node/28984

You need to handle content type creation and deletion.

node_help_text_view_content(), the variable_get() should have a default value. The function should also return a render array (TBH, I don't 100% recall what will be in the value for that form element, 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.

Not seeing any blocking issues. This appears to be the first thorough review (based on the use of the Review Template), so I am assigning to @klasui for a second look, if he has time.

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.

ashish.verma85’s picture

hi Matthew,

Thanks for the great review.
#1 php version changed to 5.2
#2 NODE_HELP_TEXT_FIELD_VALUES are in lowercase now.
#3 check_plain() corrected
#4 yes content type creation is fine and deletion will be handled in next releases.
#5 is array already.

for the t() in the install file, i think i have used $t = get_t(); it should be fine i guess?

Thanks again for checking in.
looking forward for @klasui 's final look

Thanks & Regards
Ashish

klausi’s picture

Assigned: klausi » Unassigned
Status: Reviewed & tested by the community » Fixed

Review of the 7.x-1.x branch (commit 9fc9057):

  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
    
    FILE: /home/klausi/pareview_temp/node_help_text.info
    ----------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------
     6 | ERROR | Drupal 7 core already requires PHP 5.2
    ----------------------------------------------------------------------
    
  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

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. You have to get a review bonus to get a review from me.

manual review:

  1. project page: can you describe what the difference is to just putting help text with the fields of a node for example?
  2. I don't think it is a good idea to store your help text in the variable system, since this will be loaded on every single page request, while it is only needed when the block is displayed.

But otherwise looks good to me, so ...

Thanks for your contribution, ashish.verma85!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

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.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

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