Technically Extending Help Edit
When I first approached help edit there was just one real change I had in mind, however the more I worked on it the more I saw I wanted to do. Before I had even begun working on the module Ian had already made a change to it which made path aliases work correctly. A small change, but as the content the modules provides is entirely context based having it actually show up is very important.
What I had been asked to do was implement a mechanism which would allow different groups of uses to see different messages – role control. To do so I created a new table in the database to hold the information about which groups of users get to see which message, and I had to make changes to the pages where you create and edit help messages so that an admin can select which roles see a help edit message. Beyond that I only made a small change to the database query which finds the help edit message for a given page, but as I said, I also ended up addressing a few other things…
- I decided to move the menu item which lets you create help edit messages. It had been called “customize” and grouped under the "help” item. I moved out from under help, and renamed it “Custom Help”. Doing this allows you to turn help.module off and still use help edit, giving you more control over what your users see, even to the extent of totally replacing the built in help.
- Showing multiple help messages simply wasn’t happening in help edit. Although I’m still not happy with the way that I now have it working, a user will see all the help messages which match the user’s role, and the page viewed. Before, a user would only see the most recently created message, which seems a little too arbitrary, and a problem waiting to happen on a site with a large number of help edit messages. I’m still not quite sure the best way to deal with multiple messages, but currently you at least get to see them all.
- Another small change I made was putting a module description on the admin/modules page. A simple thing, but it goes a long way to reducing confusion when you’ve got a load of modules on your Drupal installation.
Given all these modifications I’m not sure if my changes will ever become part of the actual help edit module, but they are available on the Drupal site (http://drupal.org/node/30545) as part of a patch I submitted.
2 Comments
Yea - I actually made those
Yea - I actually made those changes but I never got a chance to test them at all, so the patch never made it up there. I'm confident that I'm not going to be able to take a look at that code for a while, but if you'd like a copy of there version we use shoot me an email. (jeff at developmentseed.org)
Your help edit patch
Hi,
Just wondering if you had the time to reroll the patch as mentioned in comment #5 of the drupal node you refer to above.