1. Open cFaq.php in a text editor
2. Change line: var $sPath = ""; to the absolute path where your data files are located
Example:
var $sPath = "/home/sites/htdocs/data/";
3. Chmod 777 to the data directory
4. Open admin.php
5. Change the line: require("cFaq.php");
to include any path you may need in order to access cFaq.php.
It is BEST to put the admin.php in a secure area of your server that is
password protected and not accessible by all users.
6. Run admin.php and add the information you wish. Start by adding a category.
7. Your installing a now done :)
In order to view the faq you must do the following.
1. Open a PHP file that you wish to use to view the faq. There is a demo file included named test.php
that will show you exactly how to use the FAQ in your websites layout.
There is a couple things you MUST include on the page you wish the FAQ to show up.
First at the very top of the file you must have the following:
<?
// EDIT THE LINE BELOW TO POINT TO THE LOCATION OF cfaq.php
require("cFaq.php"); //Line 1
$faq = new cFaq; //Line 2
$faq->cFaqfGetdata();//Line 3
?>
Line 1: Will include all the program function it needs to be able to display the faq.
Line 2: Tells PHP to "start" the faq program.
Line 3: Tell the program to gather all the data it needs to display the FAQ
These 3 lines MUST be included or the faq will not function.
Next, you need to tell the program to print out the faq. You do this by the following 2 line:
<? $faq->cFaqfDisplayQ(); ?>
The above line will show the Questions only with a link to the answers below and sorted by category.
<? $faq->cFaqfDisplayA(); ?>
This line above will display the answers to the questions sorted by categories.
For further reference open test.php in a text editor or place this file on your server and run it.
Make sure to modify Line 1: require("cFaq.php"); to point to the exact location of the cfaq.php