I'm working on another much larger module and one of the pieces I needed was a site help feature for users specific to roles. Instead of folding it into my module, I decided it would be better implementented as it's own module.
The intention of Site Help is to create a simple, site help content infrastructure suitable for site users in understanding how to use aspects of the site.
I've only recently been approved for a CVS account, and still need to learn how to use CVS. I'm also quite busy putting the finishing touches on my other module, which is my first priority. But I thought I would post this code here for anyone who may want to look at it and try it out. It has only been tested a little by me. If anyone has a CVS account and wants to create a project around this, I would be more than happy for you to do that. If you would like me to be co-maintainer, I would be happy about that too. If no one takes up that offer, I will eventually create a project around it myself (assuming comment and suggestions warrant it), but it will probably take me a few weeks to get around to that.
Would really like to hear comments and suggestions.
Here is the needed SQL (mySQL only, sorry postgres folks, I am not very familiar with postgres).
CREATE TABLE `site_help` (
`nid` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL ,
`site_help_type` VARCHAR( 100 ) NOT NULL ,
`site_help_roles` VARCHAR( 255 ) NOT NULL ,
PRIMARY KEY ( `nid` )
) TYPE = MYISAM ;
Here is the module
<?php
/**
* Implementation of hook_node_name()
*/
function site_help_node_name($node) {
return t('site help');
}
/**
* Implementation of hook_help()
*/
function site_help_help($section) {
switch ($section) {
case 'admin/modules#description':
// This description is shown in the listing at admin/modules.
return t('Allows creation of a simple site help content infrastructure suitable for site users.');
case 'node/add#site_help':
// This description shows up when users click "create content."
return t('site help is content intended to help users understand how to use aspects of this site.');
case 'admin/help#site_help':
$output = '
The intention of Site Help is to create a simple, site help content infrastructure suitable ';
$output .= 'for site users in understanding how to use aspects of the site.