View file faqman/Documentation.txt

File size: 2.94Kb
                        Faqman 1.0 Documentation
                                       
     * Website URL   [ http://www.phphelper.net/ ]
     * Local documents:
          + Version history: ChangeLog
          + General notes: README
          + License: LICENSE
   
Requirements

     * PHP4
     * a web-browser w/Javascript support (doh!).
   
Introduction

   Faqman creates a formatted FAQ from plain text files.
    Currently xmltree can:
     * Have an unlimited number of categories
     * Each category has its own questions/answers
     * Full admin section to easily add/edit/delete 
     * All files in plain text. No database needed

 
   
Installation
   
   Quick Install:
    1. Untar or unzip the distribution (be sure to unzip the
       subdirectories): tar xzvf xmltree_x.x.tar.gz in a 
       web accessible directory.
    2. Open cFaq.php and you can edit the following.
       var $sPath = "/home/sites/htdocs/data/"; is the path to the where
       all the datafiles will be located to use by Faqman
       If you are on a unix system make sure this directory is writeable if
       you are going to use the admin.php script.
       
       If you are using admin.php open this file and change the following line:
       require("cFaq.php"); 
       
       Make sure the require is pointed to where cFaq.php is located. 
       
    3. Point your browser http://<your domain>/<unzip directory/faqman/admin.php
    
       You can now add/edit/delete your FAQ
   
Configuration

  At the top of the cFaq.php are 2 lines.

	var $sPath = ""; // Path to data files
	var $sCat = "cat.dat"; // category file name                   
	
	You can edit these to use the directory you want storing the data files.
	you may also rename cat.dat to whatever you wish. Cat.dat hold the category and file 
	information.
   
   
Plain Text file information:

  The cat.dat is the list of categories with the filename being used to hold the
  answers and questions.
  
  It looks like the following:
  
  General||general.txt
  
  The above lines tells faqman the name of the category is General and the file it uses
  will be general.txt
  
  General.txt will hold all the questions and answers for this category. 
  It has the folling format:
  
  Question||Answer
  
  
To use Faqman:

  To use Faqman requires you to insert 5 lines of code into any PHP page
  
  1. require("cFaq.php");
  2. $faq = new cFaq;
  3. $faq->Getdata();
  4. $faq->DisplayQ();
  5. $faq->DisplayA(); 
  
  Line 1: Tells this page to load the cFaq.php script. Make sure it is pointed
          to exactly where you placed cFaq.php(ie require("/www/cFaq.php"))
  
  Line 2: Instanciate cFaq.php class
  
  Line 3: This is the main engine and it gathers all the faq data and makes it ready to use
  
  Line 4: Displays the Questions only with links to their answers
      
  Line 5: Displays the Question/Answer formatted