This patch is stripped down version of the patch at #299050-306: Help System - Master Patch.

Features:

  • Each module can have multiple help pages/topics.
  • Each help topic is a separate file with content in HTML format.
  • admin/help provides an overview to browse topics "by module".
  • Each topic page is accompanied by a Table of contents block, and next/prev navigation links, iff there are more than 1 topics.
  • Each module defines available topics in path/to/module/help/module.help file, in ini format.
  • Each defined topic can have a "title", "file", "weight", and "path". See help's help to know what they mean.
  • A module can be given a special name (which appears on the admin/help overview page). e.g. content.module probably wants itself to be called CCK instead.
  • Help files use [internal:X] token for linking to other topics.
  • That's all.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gurpartap Singh’s picture

A better highlighted view: http://pastie.org/416700

Gurpartap Singh’s picture

With a minor change. http://pastie.org/416703

dmitrig01’s picture

These are some of DamZ's comments, and some of mine

+function help_exists($module) {
+  if (drupal_function_exists('help_get_topics') && module_exists($module)) {

module_exists needs to come first.

+    // Add "more help" link on admin pages if the module provides help topics.
+    if ($arg[0] == "admin" && help_exists($arg[2]) && $help) {

the topic needs to have the same name as a URL? what if i want help on just admin/build?

+function help_by_module() {

This makes me think there is another "mode" to see topics in (help_by_X).

+  if ($prev || $up || $next) {

That if statement is unneeded

+function help_get_tree($topics, $topic_ids) {

That function name makes me think it's building a tree, but it's only building children. Also, calling the function with $topic['children'] doesn't lead me to believe that there is no hierarchy handling. THe parameter names and descriptions are unclear too.

+function _help_parse_ini() {

Let's cache this with cache_set

+  $info = help_get_topic_file_info($module, $topic);
+  if ($info) {

could be

if ($info = help_get_topic_file_info($module, $topic)) {

<?
+function help_get_topic_file_info($module, $topic) {
...
+ $info['path'], // In same directory as .inc file.
?>
do you mean .help file? if not, which .inc file?

+  return array('access help' =>

'access help' needs to be on the next line and the following array needs to be on the same line

that's it for now

redndahead’s picture

Good suggestions dmitrig01. (Okay this is just a subscribe post. Thought I'd spruce it up a bit.)

redndahead’s picture

Status: Active » Needs work

Moving to CNW

redndahead’s picture

FileSize
106.2 KB

Rerolled with few fixes. Here are responses to dmitrig01 comments.

  1. Fixed
  2. Was this possible in the current help system? We could add a manual link in the future and add a help file to the system module.
  3. Would help_render() be better?
  4. Fixed
  5. I'm also lost on this. Not sure what to do.
  6. I don't understand caching enough to handle this.
  7. Fixed
  8. I think it meant the .help file. I fixed this comment.
  9. This is cleaned up.

So to recap what's left:

  1. Topic needing to have the same name as the url. Is this a problem?
  2. Change help_by_module() to help_render()?
  3. help_get_tree() needs some more info for better understanding.
  4. Caching needs to be added to _help_parse_ini()
redndahead’s picture

Status: Needs work » Needs review

Moving to needs review. But it will still need a little more work to be moved to RTBC

Status: Needs review » Needs work

The last submitted patch failed testing.

catch’s picture

Status: Needs work » Postponed

afaik this is postponed on #401956: Provide an [internal] filter (which is stalled). If it's not really postponed on that, we could do with some feedback from webchick and Dries on what needs doing to get this RTBC.

redndahead’s picture

Status: Postponed » Needs work

I don't think we need to postpone for tokens. I think token support has a lot further to go than this help patch and making the necessary changes after #401956 goes in should be trivial. But we do need feedback from Dries or Webchick on what to do to get this in.

catch’s picture

:(

catch’s picture

Version: 7.x-dev » 8.x-dev

Forgot version change, sorry.

catch’s picture

Priority: Critical » Major

Downgrading all D8 criticals to major per http://drupal.org/node/45111

quicksketch’s picture

Category: task » feature

Eventually catch's post resulted in a cap on majors also. See http://drupal.org/node/1201874 for the new caps on all major tasks/bugs. Obviously this patch has seen major postponements and it doesn't make sense for it to prevent new features. I'm moving this to a feature, since the original issue quite clearly states this as a list of new features.

Features:
Each module can have multiple help pages/topics.
Each help topic is a separate file with content in HTML format.
admin/help provides an overview to browse topics "by module".
Each topic page is accompanied by a Table of contents block, and next/prev navigation links, iff there are more than 1 topics.
Each module defines available topics in path/to/module/help/module.help file, in ini format.
Each defined topic can have a "title", "file", "weight", and "path". See help's help to know what they mean.
A module can be given a special name (which appears on the admin/help overview page). e.g. content.module probably wants itself to be called CCK instead.
Help files use [internal:X] token for linking to other topics.

Still an incredibly important issue. Our help is lame. :(

realityloop’s picture

Title: Help System - Patch #1 » [meta] Rearchitect Help system
Version: 8.x-dev » 9.x-dev
Issue tags: +API change

It might be better to split this into smaller sub-tasks.

catch’s picture

Priority: Major » Normal
Issue summary: View changes
Status: Needs work » Postponed (maintainer needs more info)
Issue tags: +Needs issue summary update

#2351991: Add a config entity for a configurable, topic-based help system.

Not sure what this does that's not handled by that issue.

jhodgdon’s picture

Title: [meta] Rearchitect Help system » Rearchitect Help system
Version: 9.x-dev » 8.1.x-dev
Status: Postponed (maintainer needs more info) » Active

I don't think this is really a Meta issue, so changing title. Really it's an issue with a specific approach, more or less the Advanced Help module.

So I've filed a new meta issue to collect all the problems with the current help system and discuss the best route to fixing them; this issue is being added as Related there:
#2592487: [meta] Help system overhaul

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

jhodgdon’s picture

Title: Rearchitect Help system » Use approach like D7 Advanced Help for the Help module

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

andypost’s picture

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

gisle’s picture

Status: Active » Closed (outdated)
Related issues: +#2920309: Add experimental module for Help Topics

I am closing this as outdated. It looks like another approach has been selected for Drupal 8, re: #2920309: Add experimental module for Help Topics.