From the NannyMUD documentation

LAST CHANGE

2001-09-29

TOPIC

NAME

        ihelp_examples - Examples for ihelp.

DESCRIPTION

	Examples of how to use Ihelp

	In this file we assume that we want to add help for a guild called
	Champions of Khorne. The Guildmaster has created a dir called
	/guilds/khorne/help in which he has put the normal (standard)
	helpfiles for the guild. It is organized like this:
	
	>ls
	INDEX combat/    commands/  help       info/

	So what are those things? Well, first notice the "INDEX" file. It is
	the file displayed when someone enters the ihelp node "/khorne". The
	subtopics for that node are: "combat", "commands", "help" and
	"info". So let's explain what these subtopics really are. The file
	named "help" will be the node "/khorne/help" and when you enter that
	node the file is displayed. However, we will not change level in the
	ihelp structure, so the subtopics are the same as for "/khorne". But,
	as you enter any of the others, we will change level in the structure
	and those directories' "INDEX" will be displayed.

	Below is the code the Guildmaster needs to add in the guildmark:

	NOTE /obj/ihelp need to have acl LR in the dir the help resides, ie
	     /guilds/khorne/help/> edac . /obj/ihelp:LR

	init_ihelp()
	{
	  object ihelp;
	  ihelp=present("ihelp",this_player());
	  if(objectp(ihelp)) 
	  {
	      ihelp->add_hook("ihelp_new_help_hook",this_object());
	   }
	 }

	 /* The hook is used to help us save cpu at login. It will also only
	  * be called once, so you do not have to remove yourself, try: man
          * ihelp_new_help_hook
	  */ 
	 ihelp_new_help_hook(array,ihelp)
	 {
	     ihelp->add_help("/guilds/khorne/help/","khorne");
	     // See *1* below.
	     // See *2* below.
	 }

	In this particular guild, you receive new help when you reach a
	certain position within the guild. So we need to know how to add a
	node in the Ihelp structure.

	*1*)
	ihelp -> add_topic("/khorne/","daemons","/guilds/khorne/texts/daemons");

	This adds the file "/guilds/khorne/texts/daemons" in the node
	"/khorne/daemons".

	But we also want to add a new level below "/khorne", namely a structure
	that deals with the history of the guild.

	*2*)
	ihelp->add_topic("/khorne/history","INDEX","/guilds/khorne/texts/history");
	ihelp->add_topic("/khorne/history","Khorne","/guilds/khorne/texts/khorne");
	ihelp->add_topic("/khorne/history","myth","/guilds/khorne/texts/myth");

	Note that you MUST add a node called "INDEX" in order to add a new
	level below the current one.