This is a cleanup of the patch in #537828-32: Help text for core modules - update to conform to new standard from the original issue: #537828: Help text for core modules - update to conform to new standard (Also cross-posted)

Index: modules/node/node.module                            
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v            
retrieving revision 1.1167                                         
diff -u -p -r1.1167 node.module                                    
--- modules/node/node.module    14 Nov 2009 07:58:49 -0000      1.1167
+++ modules/node/node.module    14 Nov 2009 17:04:15 -0000            
@@ -80,14 +80,23 @@ function node_help($path, $arg) {                 
                                                                      
   switch ($path) {                                                   
     case 'admin/help#node':                                          
-      $output = '<p>' . t('The node module manages content on your site, and stores all posts (regardless of type) as a "node" . In addition to basic publishing settings, including whether the post has been published, promoted to the site front page, or should remain present (or sticky) at the top of lists, the node module also records basic information about the author of a post. Optional revision control over edits is available. For additional functionality, the node module is often extended by other modules.') . '</p>';                       
-      $output .= '<p>' . t('Though each post on your site is a node, each post is also of a particular <a href="@content-type">content type</a>. <a href="@content-type">Content types</a> are used to define the characteristics of a post, including the title and description of the fields displayed on its add and edit pages. Each content type may have different default settings for <em>Publishing options</em> and other workflow controls. By default, the two content types in a standard Drupal installation are <em>Page</em> and <em>Story</em>. Use the <a href="@content-type">content types page</a> to add new or edit existing content types. Additional content types also become available as you enable additional core, contributed and custom modules.', array('@content-type' => url('admin/structure/types'))) . '</p>';                                                                                                   
-      $output .= '<p>' . t('The administrative <a href="@content">content page</a> allows you to review and manage your site content. The node module makes a number of permissions available for each content type, which may be set by role on the <a href="@permissions">permissions page</a>.', array('@content' => url('admin/content'), '@permissions' => url('admin/config/people/permissions'))) . '</p>';                                                                                                                                                     
-      $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@node">Node module</a>.', array('@node' => 'http://drupal.org/handbook/modules/node/')) . '</p>';                                                                                                                                                                                 
-      return $output;                                                                                                                                                                  
+      $output = '<h3>' . t('About') . '</h3>';                                                                                                                                         
+      $output .= '<p>' . t('The node module manages the creation, editing, deletion, and display of all content on your site.') . '</p>';                                              
+      $output .= '<h3>' . t('Uses') . '</h3>';                                                                                                                                         
+      $output .= '<dl>';                                                                                                                                                               
+      $output .= '<dt>' . t('Publishing content') . '</dt>';                                                                                                                           
+      $output .= '<dd>' . t('When new content is created, the node module records basic information about the content item including the author, date of creation, and the type of content. It also tracks the <em>publishing options</em> which define whether or not the content is published, promoted to the front page of the site, and/or sticky at the top of content lists. Revision control of content edits is also available. Default settings can be configured for each <a href="@content-type">type of content</a> on your site.', array('@content-type' => url('admin/structure/types'))) . '</dd>';                                                                                                                                            
+      $output .= '<dt>' . t('Administering content') . '</dt>';                                                                                                                        
+      $output .= '<dd>' . t('The administrative <a href="@content">content page</a> allows you to review and manage your site content.', array('@content' => url('admin/content'))) . '</dd>';                                                                                                                                                                                 
+      $output .= '<dt>' . t('User permissions') . '</dt>';                                                                                                                             
+      $output .= '<dd>' . t('The node module makes a number of permissions available for each content type, which may be set by role on the <a href="@permissions">permissions page</a>.', array('@permissions' => url('admin/settings/permissions'))) . '</dd>';                                                                                                              
+      $output .= '</dl>';                                                                                                                                                              
+                                                                                                                                                                                       
+    return $output;                                                                                                                                                                    
                                                                                                                                                                                        
     case 'admin/content':                                                                                                                                                              
-      return ' '; // Return a non-null value so that the 'more help' link is shown.                                                                                                    
+      // Return a non-null value so that the 'more help' link is shown.                                                                                                                
+      return ' ';                                                                                                                                                                      
                                                                                                                                                                                        
     case 'admin/structure/types/add':                                                                                                                                                  
       return '<p>' . t('Individual content types can have different fields, behaviors, and permissions assigned to them.') . '</p>';                                                   
@@ -96,13 +105,12 @@ function node_help($path, $arg) {                                                                                                                                  
       return '<p>' . t('This form lets you add, edit, and arrange fields within the %type content type.', array('%type' => node_type_get_name($arg[3]))) . '</p>';                     
                                                                                                                                                                                        
     case 'admin/structure/types/manage/' . $arg[3] . '/display':                                                                                                                       
-      return '<p>' . t('This form lets you configure how fields and labels are displayed when %type content is viewed in teaser and full-page mode.', array('%type' => node_type_get_name($arg[3]))) . '</p>';                                                                                                                                                                 
-                                                                                                                                                                                       
+      return '<p>' . t('This form lets you configure how fields should be displayed when %type content is rendered in the following contexts.', array('%type' => node_type_get_name($arg[3]))) . '</p>';
     case 'admin/structure/types/manage/' . $arg[3] . '/display/' . $arg[5]:
-      return '<p>' . t('This form lets you configure how fields should be displayed when rendered %type content in the following contexts.', array('%type' => node_type_get_name($arg[3]))) . '</p>';
+      return '<p>' . t('This form lets you configure how fields should be displayed when %type content is rendered in the following contexts.', array('%type' => node_type_get_name($arg[3]))) . '</p>';

     case 'node/%/revisions':
-      return '<p>' . t('The revisions let you track differences between multiple versions of a post.') . '</p>';
+      return '<p>' . t('The revisions let you track differences between multiple versions of your content.') . '</p>';

     case 'node/%/edit':
       $node = node_load($arg[1]);
@@ -1769,7 +1777,7 @@ function node_menu() {

   $items['admin/structure/types'] = array(
     'title' => 'Content types',
-    'description' => 'Manage posts by content type, including default status, front page promotion, comment settings, etc.',
+    'description' => 'Manage content types, including default status, front page promotion, comment settings, etc.',
     'page callback' => 'node_overview_types',
     'access arguments' => array('administer content types'),
     'file' => 'content_types.inc',
@@ -3144,7 +3152,7 @@ function node_unpublish_by_keyword_actio
   $form['keywords'] = array(
     '#title' => t('Keywords'),
     '#type' => 'textarea',
-    '#description' => t('The post will be unpublished if it contains any of the phrases above. Use a case-sensitive, comma-separated list of phrases. Example: funny, bungee jumping, "Company, Inc."'),
+    '#description' => t('The content will be unpublished if it contains any of the phrases above. Use a case-sensitive, comma-separated list of phrases. Example: funny, bungee jumping, "Company, Inc."'),
     '#default_value' => isset($context['keywords']) ? drupal_implode_tags($context['keywords']) : '',
   );
   return $form;
@@ -3190,7 +3198,7 @@ function node_requirements($phase) {
   } else {
     $value = $t('Disabled');
   }
-  $description = $t('If the site is experiencing problems with permissions to content, you may have to rebuild the permissions cache. Rebuilding will remove all privileges to posts, and replace them with permissions based on the current modules and settings. Rebuilding may take some time if there is a lot of content or complex permission settings. After rebuilding has completed posts will automatically use the new permissions.');
+  $description = $t('If the site is experiencing problems with permissions to content, you may have to rebuild the permissions cache. Rebuilding will remove all privileges to content and replace them with permissions based on the current modules and settings. Rebuilding may take some time if there is a lot of content or complex permission settings. After rebuilding has completed, content will automatically use the new permissions.');

   $requirements['node_access'] = array(
     'title' => $t('Node Access Permissions'),
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webchick’s picture

Status: Active » Reviewed & tested by the community

As far as I'm concerned, this patch is already RTBC from the earlier issue. I'll mark it as such.

If anyone disagrees, I still have a couple of hours before I get my computer back. ;)

arianek’s picture

Issue tags: +d7help

adding tags

samirnassar’s picture

Issue tags: +Documentation, +Help text

Add tags: documentation, Help text

webchick’s picture

For those who are more visual:

Before:
Old node help text

After:
New node help text

webchick’s picture

Status: Reviewed & tested by the community » Fixed

And... committed to HEAD! Yay! :D Keep 'em coming, folks!

jhodgdon’s picture

Status: Fixed » Needs work

Standard for capitalization was changed, see http://drupal.org/node/537828#comment-2303764 and http://drupal.org/node/632280 -- we are now saying the name of the module should be capitalized. Sorry for the inconvenience but we need a new patch...

arianek’s picture

note - this also just needs a once over for consistency since it was the first to go in

arianek’s picture

Status: Needs work » Needs review
FileSize
81.82 KB
5.51 KB

hugely updated this... made it match the standard, added some links, rewrote some bits, and tried to clean up the code and language in some of the *context sensitive* ;-) help (ooh, learning so much tonight!) review!

Status: Needs review » Needs work
Issue tags: -Documentation, -Help text, -d7help

The last submitted patch failed testing.

Status: Needs work » Needs review
Issue tags: +Documentation, +Help text, +d7help

jhodgdon requested that failed test be re-tested.

jhodgdon’s picture

Status: Needs review » Needs work

Shouldn't the Uses section for the Node module say something about creating your own new content types?

Also I am not sure why you removed all the blank lines before the case statements. I think it improves readability of the code quite a bit to have a blank line before case statements. I am not sure if we have a Drupal coding standard for that, but...

I do like the new text though. :)

arianek’s picture

Assigned: Unassigned » arianek

ah - that's just what i'd been seeing elsewhere (i'll put the linebreaks back!)

and yes, that is a good idea to add that - it was some pretty sparse text to start from, so will fill it in some more (assigns to self)

arianek’s picture

Status: Needs work » Needs review
FileSize
109.48 KB
6.16 KB

added that, and split revisions into a separate use. my brain is going to mush, so i'm just going to post this!

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Your brain must not be too much mush. I think the current patch is good.

lisarex’s picture

I am getting a reject when I apply the patch, but it might just be my local setup or something :/
Hunk #1 FAILED at 80.
Hunk #2 FAILED at 106.

arianek’s picture

just retested, applies cleanly for me.

jhodgdon’s picture

The most reliable way to test for patch being able to apply is just to click the "retest" link on the patch. :)

arianek’s picture

the patch passed fine with the bot, lisa is just having trouble with it locally.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD.

arianek’s picture

Status: Fixed » Needs review
FileSize
2.34 KB

just found a missing link in one of the arrays while using this to update the standard page.... here's a patch.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

good catch!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks!

jhodgdon’s picture

Status: Fixed » Needs work

I'm reopening this issue, as the Node help screen has a couple of issues. One is easy to fix:

- The link in Node help to the Permissions page should be url('admin/config/people/permissions') (current link is broken).

The other is a philosophical question...

Is it really accurate to say the node module manages "all site content"? There can actually be a lot of content on a site that is not nodes, such as comments, Aggregator items, custom blocks, etc. The on-line handbook page (http://drupal.org/handbook/modules/node) also repeats this idea that all content on your site is nodes. I don't think that idea is accurate. Thoughts?

jhodgdon’s picture

I had a thought on this one: Change "all site content" to say "the main site content". Thoughts?

jhodgdon’s picture

Status: Needs work » Needs review
FileSize
2.07 KB

Here's a patch that fixes the permissions link and changes the first sentence of About to read:

The Node module manages the creation, editing, deletion, settings, and display of the main site content.

Definitely needs a second opinion. See comment #23 for my opinion.

arianek’s picture

hmm... ok, the patch itself looks good. i am a little hung up on "main site content". certainly "all site content" wasn't really right, but i'm not sure this is either... we really do need a way to differentiate from blocks, etc.

maybe we can specify by saying something like "main site content created through the Create content page" or something? there must be a better way to phrase it though, without using the link...

arianek’s picture

Assigned: arianek » Unassigned
jhodgdon’s picture

Status: Needs review » Needs work

OMG, I put in a big comment on this earlier today and it got lost. Sigh. Had a new suggested wording and everything. Completley lost into the ether.

I'll see about doing a patch with my best guess at what I had written before (which wasn't a patch). Sigh.

jhodgdon’s picture

Status: Needs work » Needs review
FileSize
2.73 KB

OK, here's a patch with some new wording. Not what I wrote this morning, but hopefully better.

The wording of the About section has become:

The Node module manages the creation, editing, deletion, settings, and display of the main site content. Content items managed by the Node module are typically displayed as pages on your site, and include a title, some meta-data (author, creation time, content type, etc.), and optional fields containing text or other data (fields are managed by the Field module). Some of your site content may also be managed outside the Node module; for example, the core Block module allows you to create content displayed in blocks, and the core Comment module manages the content of comments entered by users. For more information, see the online handbook entry for Node module.

I left the Uses section alone, see http://drupal.org/files/issues/help_node_after3.png (old screen shot)

jhodgdon’s picture

FileSize
2.73 KB

That other patch has a typo (conent type instead of content type)

arianek’s picture

awwww... d.o has been not so happy this past week.

i VERY much like the new description of "main content" etc. but i think "Some of your site content may also be managed outside the Node module; for example, the core Block module allows you to create content displayed in blocks, and the core Comment module manages the content of comments entered by users." might fall into the category of TMI... 2nd opinions?

jhodgdon’s picture

I'm OK with taking that out.

jhodgdon’s picture

FileSize
2.38 KB

So OK that here's another patch. New text for About is:

The Node module manages the creation, editing, deletion, settings, and display of the main site content. Content items managed by the Node module are typically displayed as pages on your site, and include a title, some meta-data (author, creation time, content type, etc.), and optional fields containing text or other data (fields are managed by the Field module). For more information, see the online handbook entry for Node module.

Some day, we might even get a test bot on it, when the testing site comes back to life.

arianek’s picture

FileSize
2.45 KB

there were some bad brackets WSODing in there, fixed that... there's also this at line 97 which i'm not sure what it is, but i left it in "array('fragment' => 'module-node')"

pls re-review

jhodgdon’s picture

fragment: makes the link go to admin/config/permissions#module-node as opposed to just admin/config/permissions (or whatever the URL is).

Duh on brackets.

I think this is now RTBC if the test bot agrees. Should definitely wait for the test bot.

arianek’s picture

ah, cool cool - hmm... seems like testbot is sleeping.... maybe the DDOS has affected it. will have to check back...

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

looks like test bot is dead... let's just rtbc it, since it shouldn't cause any test failures (no code change) now that arianek has fixed the brackets.

Status: Reviewed & tested by the community » Needs work
Issue tags: -Documentation, -Help text, -d7help

The last submitted patch failed testing.

Status: Needs work » Needs review

arianek requested that failed test be re-tested.

Status: Needs review » Needs work

The last submitted patch, , failed testing.

Status: Needs work » Needs review

Re-test of from comment #2381848 was requested by @user.

Status: Needs review » Needs work
Issue tags: +Documentation, +Help text, +d7help

The last submitted patch, , failed testing.

jhodgdon’s picture

Status: Needs work » Needs review
FileSize
2.45 KB

This is interesting.

I wanted to see if this was a problem with the test bot or with the patch.

So I first ran the two tests (Help Functionality and No Help), and they were fine (after a clean install).

Then I installed the patch and ran the tests. I did get the four exceptions (PHP warnings). In all four cases, the warning message was:

htmlspecialchars() expects parameter 1 to be string, array given	Warning	bootstrap.inc	1202	check_plain()	Exception

Hah! Found the typo in the patch. Attaching a new one, which should work better.

jhodgdon’s picture

OK, this patch now results in passing those two tests. Let's see what the test bot thinks...

Status: Needs review » Needs work
Issue tags: -Documentation, -Help text, -d7help

The last submitted patch, , failed testing.

Status: Needs work » Needs review
Issue tags: +Documentation, +Help text, +d7help

Re-test of from comment #2405934 was requested by @user.

arianek’s picture

Status: Needs review » Reviewed & tested by the community

Way to go! That was driving me insane!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks!

Status: Fixed » Closed (fixed)
Issue tags: -Documentation, -Help text, -d7help

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