Page 1 of 1

Add a help system to a web project

Posted: Wed Jan 19, 2005 9:53 am
by AGISB
I am kind of uneven how to go about adding help pages to my web project.

The page design is templated. However as I am doing this for myself I got sloppy and didn't do a clear template design on the outputed data. So the text is created on the fly depending on the databse preferences.

Every page gets a hardcoded ID. With this ID I want to create a database driven help system.

All would work fine except one little thing. As my pages are non-static, menus and other items might change and therefore the help page would also require different text.

I could put the help text into the database but how could I add the differnet text options for different e.g. menu settings?

Can I include MySQL Text data into the file and output it? So I could put the switch statement into the database?

Posted: Wed Jan 19, 2005 9:59 am
by feyd
there's a potential to use eval() as a means to run stored code.. however, using eval() can be extremely dangerous.. and this is what I don't like about a bunch of templating engines out there.

There may be a way to use table linkage to tell you what help texts to show for a given page. Whereby you have certain ones for the user specific things, and a seperate (internally anyways) hook into the page specific texts. The page specific ones could just be linked to any page ID then, as a generic help among them since a lot of controls are often used in multiple locations.