This is an old revision of the document!


FAQs Page

The conf/faqs.php contains all your FAQs texts.

This is a php file, that contains an array of string variables

Definition

Each of your FAQs is defined like that :

$faqs['SECTION']['INDEX']['q']	="(question) TEXT";
$faqs['SECTION']['INDEX']['a']	="(answer) TEXT";

Where:

  • SECTION is the section in which to sort your faqs
  • INDEX is an unique index for this section question/answer pair (can be a number or a string)
  • TEXT can be any string, that can even include HTML tages (ie for long anwser that might need LI or some P tags.

Here is an exemple :

$faqs['general']['1']['q']	="I have a question ?";
$faqs['general']['1']['a']	="This is our Answer.";
 
$faqs['general']['2']['q']	="I have another question ?";
$faqs['general']['2']['a']	="This is another Answer.";
 
$faqs['general']['spammer']['q']="Can I send Spam ?";
$faqs['general']['spammer']['a']="Of course you can, but to your mother only";
 
$faqs['support']['1']['q']      ="Will you come at home to repair my software ?";
$faqs['support']['1']['a']      ="Of course yes, and we even bring a coffee.";

Sections

Sections are completely optionnals, but are usefull to separate your FAQs in differents sections, especially if you have many FAQS. If you dont want to use sections, simply put all your faqs in the same section, ie 'general' and no sections will be displayed.

Each section index used in FAQs definitions must be named using the following syntax:

$faqs_sections_names['SECTION']		="NAME";

Where :

  • SECTION is the section inde used in FAQs definitions
  • NAME is the title that will be used for each Section

Example :

$faqs_sections_names['general']="General Questions";
$faqs_sections_names['support']="Support Questions";

Sorting

Faqs are groupped by section and sorted :

  • first in the order the $faqs_sections_names are defined in the configuration file,
  • then in the order the $faqs are defined in the configuration file.