RE: [SMAUG] web-based help files

RE: [SMAUG] web-based help files



You can always make a very simple function to print them all out on your
website.

The loop is just:

void example()
{
  HELP_DATA *help;
  FILE_DATA *file;

  file = fopen( "../../public_html/helpfiles.html", "w");
  fprintf( file, "<HTML><HEAD><TITLE></TITLE></HEAD><BODY>");
  for ( help = first_help; help; help = help->next)
   fprintf( file, "%d - %s\n%s\n<HR>", help->level, help->keyword,
help->text );
  fprintf( file, "</BODY></HTML>");
  fclose( file);
}

That tiny thing will print out one big page with every helpfile on it
separated by page breaks.
It's relatively simple to expand it to create an index and either link
the index to the big page via name anchors like:

   fprintf( file, "<A NAME='%s'>%d - %s</A>\n%s\n<HR>", help->keyword,
help->level, help->keyword, help->text );

Or to have it create an actual page for every topic and index itself.
It's all variations of the same loop.
If you use CSS you can add the appropriate CSS info and pointers into
the heading section, or anything else you want, such as manual
instructions for how to appear.

Note in the file address the usage of the ../ first one to leave your
muds area directory  ../ second one to leave your mud directory.
Important to remember smaug actually 'starts' and runs inside the areas
directory if you want to point to a file somewhere else.

| -----Original Message-----
| From: owner-smaug@game.org [mailto:owner-smaug@game.org] On 
| Behalf Of Crystal
| Sent: Sunday, December 07, 2003 10:27 AM
| To: smaug
| Subject: [SMAUG] web-based help files
| 
| 
| Can anyone point me in the right direction of getting my help 
| files available from my mud's page?  I've got access to all 
| the fun web stuff on my host, except for sql.