FAQ Manager FAQ

FAQ Manager: click here to add/edit material
Table of contents

1 FAQ Manager Features
1.1 Why Do I Need a FAQ Manager?   (08/09/98 Paul Johnson)
1.2 What are the Special Features of FAQ Manager?   (08/09/98 ?)
2 Installation Process
2.1 How do I get the FAQ Manager?   (08/09/98 ?)
2.2 What do I need to install and make it work?   (08/09/98 ?)
2.3 How do I install it?   (09/09/98 ?)
2.4 How do I create a new FAQ page?   (09/09/98 ?)
2.5 How do I modify the template?   (09/09/98 ?)
2.6 How do I protect the FAQ Manager?   (09/09/98 ?)
3 Working with FAQ Manager
3.1 How does the tool work?   (08/09/98 ?)
3.2 How do I work with FAQ Manager?   (08/09/98 ?)

1 FAQ Manager Features


1.1 Why Do I Need a FAQ Manager?   (08/09/98 Paul Johnson <pauljohn@ukans.edu>)

FAQ Manager makes it easy to update Web documents. Use your browser to inspect your document, hit the FAQ Manager link, and voila! (or Shazam! or Eureka!) you are in an editor.

If you've ever had to maintain an outlined list of items in HTML format, and then make sure the numbering in your outline matches a separate Table of Contents, you already know why FAQ Manager is valuable.

[top]

1.2 What are the Special Features of FAQ Manager?   (08/09/98 ? <?>)

FAQ Manager allows you to create FAQ pages very easily. It has these special features:

  1. Automatic Outlines
  2. FAQ Manager creates an outline structure that can be two headings deep. You can have a FAQ with many questions grouped into a smaller subgroups. There is no limit to the number of questions or groups.

  3. User Friendly Interface
  4. The interface is self evident. FAQ Manager has split 3 modes: New, Edit and Move/Delete.

    1. Creating new Items:

    2. Editing Items: Easy select->edit->submit combo. Again like in 'Add new item' you can upload a new file, write the content yourself or just leave the URL to another document

    3. Move/Delete Items: In that mode you can move or delete items and groups of items very easily if you select a destination of move to be a trash can, the selected items will be deleted.

    Submit the Changes and Check them Out: Changes are implemented when you hit the "Submit" button. Then pressing 'Back to document' button will take you immediately to the page you have been editing and you will see the latest changes.

  5. Fix your Mistakes
  6. If you submit a change, a Commit Rollback feature appears. You can undo several stages of editing!

  7. HTML Codes Can be Used in FAQ Manager Documents
  8. FAQ Manager creates a nice looking outline if you just type in material, but if you want some special HTML tags, go ahead and use them.

  9. On-Line Help
  10. The How Do I...: button will give you the detailed help for the usage of the current mode.

[top]

2 Installation Process


2.1 How do I get the FAQ Manager?   (08/09/98 ? <?>)

You can download it for free from http://www.eprotect.com/stas/TULARC/works/faq_manager/

[top]

2.2 What do I need to install and make it work?   (08/09/98 ? <?>)

FAQ Manager runs on Unix/Linux systems. It is a perl script, so most importantly it requires:

[top]

2.3 How do I install it?   (09/09/98 ? <?>)

Check Your System Setup

First, make sure you've got a working system with Perl 5, the needed modules, and an http server. You probably should serve up a regular html document or two before you mess with FAQ Manager.

For purposes of installation, you have to know a little bit about your system--its web address and how it serves cgi scripts. Suppose for purpose of discussion that your server is named

your.server.com

You keep the executable cgi scripts in a directory such as

/home/http/cgi-bin/

and your web documents are in the "documentation" directory, such as

/home/http/docs/

Users can access these documents by going to the URL http://your.server.com/

You also need to know how cgi scripts are activated on your system. Later on, you will edit one of your html documents and insert a command to start up FAQ Manager. You need enough information to customize a command like this:

< A HREF="http://your.server.com/cgi-bin/faq_manager-2.02/faq_manager.pl"> click here to activate FAQ Manager </A >

You need not set your documentation directory to /home/http/docs. You can configure FAQ manager to write its output into any directory where you serve up HTML files. A single user, Bill Jones, might configure FAQ Manager to write into his personal space /home/billjones/public_html. Users would find his documents by going to the URL http://your.server.com/~billjones.

Prepare Perl Modules For FAQ Manager

I assume you have root access in what follows and then at the end add some comments for users who do not have root access but can install FAQ Manager under cgi-wrap.

If you have root access, you can install the perl modules in the /usr/lib/perl5 hierarchy. If you untar the perl module, all you do is type

% perl Makefile.PL
% make
% make install

Install FAQ Manager Software in CGI-BIN

Non-Root Installation and CGI-wrap

If you don't have root access, but do have CGIwrap on your system, you can install FAQ Manager and the perl modules in your private user space, and then configure to use the CGIwrap setup.

[top]

2.4 How do I create a new FAQ page?   (09/09/98 ? <?>)

To create a new FAQ page, copy the template file from the ./tmpl directory into your documentation directory (or subdirectory of the documentation directory). The file is called faq_template.inline.html, but you should rename it (e.g. my_faq.html).

The CGI doesn't create the initial FAQ pages, you do that by editing this template.

[top]

2.5 How do I modify the template?   (09/09/98 ? <?>)

[top]

2.6 How do I protect the FAQ Manager?   (09/09/98 ? <?>)

If you are going to use the FAQ Manager on the Internet or at the place you don't want others to change the contents of the FAQ but a group of authorized people you need to password protect the directory where faq_manager resides.

You need to create 2 files:

After you finish configuring these 2 files. Try to follow the link to FAQ Manager, and it should prompt you with login/passwd popup window. Try to login with username/passwd that you choose and if you succeed you have finished with this section

[top]

3 Working with FAQ Manager


3.1 How does the tool work?   (08/09/98 ? <?>)

When you follow the link to faq_manager from the page you want to edit, the variable HTTP_REFERER is being set to an URL of the page you have called the cgi from. The tool translates the URL to the real path of the file on the filesystem by replacing http://your.server.com with /home/httpd/htdocs so URL of http://your.server.com/faqs/faq1.html will become /home/httpd/htdocs/faqs/faq1.html. The translation is done by using $base_dir and $base_url.

Now all is left to the faq_manager is to read the file, let you edit it, and write it back...

When you call the script it saves the top and the bottom of the html, grabs the rest of the content, splits it to groups, questions and answers and represent for you in GUI so you can edit it. Now every time you do submit to some action either add, edit or move/delete the html is recreated by taking the saved top and bottom htmls and recreating the content of HTML by internal function (that can be modified to suite your needs) a.k.a creates the index of FAQ and the question->answer pairs.

Another thing is how the original file is recreated when you edit it: Once page is read in, it's getting parsed. First we split the page into 3 parts top, body, and bottom by using $top_sep and $bottom_sep separators (these are the comments that you have been requested to keep untouched in the file). We remember the top and bottom since we will need them back when we will write back the modified document.

Next step is to parse the body and extract all groups, questions and answers. We do it with help of $g_begin_sep $g_end_sep $q_begin_sep $q_end_sep $a_begin_sep $a_end_sep separators. The extracted data is stored on the disk using the unique string to name the file. We pass that file name as a hidden parameter from form to form. Each time you apply some change -- a new file is created and passed along. Every time we increase the index of the object file .2 .3 ... etc. So you can always jump back to one of the prior versions.

With help of javascript we fill the question/answer input form with preset values when you select some item to modify.

The directory of objects $cgi_obj_dir is getting cleaned when the script called for a first time per faq it checks for files older than 2 days and delete them. Ofcourse you can change that value.

That's all. If you want to learn even more, read the code :-) It's well commented.

[top]

3.2 How do I work with FAQ Manager?   (08/09/98 ? <?>)

There is a complete online documentation when you work with the tool. Just press a 'How do I...' button in the action menu on the left side and you will get a new window with detailed documenation of the current mode usage. When you switch the modes (add/edit/move/delete) you get a different help page

[top]


FAQ Manager