Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
services:pvw:conf:faqs [2015/03/16 12:42]
r2d2 [Definition]
services:pvw:conf:faqs [2015/03/18 10:15] (current)
eric
Line 1: Line 1:
 ====== FAQs Page ====== ====== FAQs Page ======
  
-The **conf/​faqs.php** contains all your FAQs texts. ​+The **conf/​faqs.php** contains all of your FAQs texts. ​
  
 //This is a php file, that contains an [[http://​php.net/​manual/​en/​language.types.array.php|array]] of  [[http://​php.net/​manual/​en/​language.types.string.php|string variables]]//​ //This is a php file, that contains an [[http://​php.net/​manual/​en/​language.types.array.php|array]] of  [[http://​php.net/​manual/​en/​language.types.string.php|string variables]]//​
  
 ===== Definition ===== ===== Definition =====
-Each of your FAQs is defined ​like that :+Each of your FAQs are defined ​as the following ​:
  
 <code php> <code php>
-$faqs['​SECTION'​]['​INDEX'​]['​q'​] ="​(question) TEXT";​ +$pvw_conf['​faqs']['​SECTION'​]['​INDEX'​]['​q'​] ="​(question) TEXT";​ 
-$faqs['​SECTION'​]['​INDEX'​]['​a'​] ="​(answer) TEXT";+$pvw_conf['​faqs']['​SECTION'​]['​INDEX'​]['​a'​] ="​(answer) TEXT";
 </​code>​ </​code>​
  
 Where: Where:
-    * **SECTION** is the section in which to sort your faqs +    * **SECTION** is the section in which your FAQs are sorted. 
-    * **INDEX** is an unique index for this section question/​answer ​pair (can be a number or a string) +    * **INDEX** is unique index for this sectionquestion/​answer ​pairs can be a number or a string. 
-    * **TEXT** can be any stringthat can even include HTML tages (ie for long anwser ​that might need LI or some P tags.+    * **TEXT** can be any string that can even include HTML tags (like long answers ​that might need LI or P tags.
  
-Here is an exemple ​:+Here is an example ​:
 <code php> <code php>
-$faqs['​general'​]['​1'​]['​q'​] ="​I have a question ?"; +$pvw_conf['​faqs']['​general'​]['​1'​]['​q'​] ="​I have a question ?"; 
-$faqs['​general'​]['​1'​]['​a'​] ="​This is our Answer.";​+$pvw_conf['​faqs']['​general'​]['​1'​]['​a'​] ="​This is our Answer.";​
  
-$faqs['​general'​]['​2'​]['​q'​] ="​I have another question ?"; +$pvw_conf['​faqs']['​general'​]['​2'​]['​q'​] ="​I have another question ?"; 
-$faqs['​general'​]['​2'​]['​a'​] ="​This is another Answer.";​+$pvw_conf['​faqs']['​general'​]['​2'​]['​a'​] ="​This is another Answer.";​
  
-$faqs['​general'​]['​spammer'​]['​q'​]="​Can I send Spam ?"; +$pvw_conf['​faqs']['​general'​]['​spammer'​]['​q'​]="​Can I send Spam ?"; 
-$faqs['​general'​]['​spammer'​]['​a'​]="​Of course you can, but to your mother ​only";+$pvw_conf['​faqs']['​general'​]['​spammer'​]['​a'​]="​Of course you can, but to martians ​only";
  
-$faqs['​support'​]['​1'​]['​q'​] ​     ="Will you come at home to repair my software ?"; +$pvw_conf['​faqs']['​support'​]['​1'​]['​q'​] ​     ="Will you come to my place to repair my software ?"; 
-$faqs['​support'​]['​1'​]['​a'​] ​     ="Of course ​yes, and we even bring coffee.";​+$pvw_conf['​faqs']['​support'​]['​1'​]['​a'​] ​     ="Of course ​we will and we'​ll ​even bring coffee.";​
 </​code>​ </​code>​
  
  
 ===== Sections ===== ===== Sections =====
-Sections are completely optionnals, ​but are usefull ​to separate your FAQs in differents ​sections, especially if you have many FAQS.+Sections are totally optional ​but they can be very useful if you want to separate your FAQs into different ​sections, especially if you plan to print many FAQs. 
 +//If you don't need or want to use sections, simply put all of your FAQs content within the same section such as '​general'​ and no sections will be displayed.//
  
-Each section index used in FAQs definitions must be names using the following syntax:+Each section index used in FAQ definitions must be named using the following syntax: 
 +<code php> 
 +$pvw_conf['​faqs_sections'​]['​SECTION'​] ="​NAME";​ 
 +</​code>​
  
-$faqs_sections_names['​**SECTION**'​] ="​**NAME**";​\\ +Where : 
- +    * **SECTION** is the section ​index used for FAQs definitions. 
-Where: +    * **NAME** is the title that will be used for each of the sections.
-    * **SECTION** is the section ​inde used in FAQs definitions +
-    * **INDEX** is an unique index for this section question/​answer pair (can be a number or a string) +
-    * **NAME** is the title that will be used for each Section+
  
 Example : Example :
 <code php> <code php>
-$faqs_sections_names['​general'​]="​General Questions";​ +$pvw_conf['​faqs_sections'​]['​general'​]="​General Questions";​ 
-$faqs_sections_names['​support'​]="​Support Questions";​+$pvw_conf['​faqs_sections'​]['​support'​]="​Support Questions";​
 </​code>​ </​code>​
  
-//BTW, If you dont want to use sections, simply put all your faqs in the same section, ie '​general'​ and no sections will be displayed.//​+
  
  
 ===== Sorting ===== ===== Sorting =====
  
-Faqs are groupped by section ​and sorted : +FAQs are groupped by sections ​and sorted ​as 
-  * first in the order the **$faqs_sections_names** are defined in the configuration file,  +  * First in the order the **$pvw_conf['​faqs_sections'​]** are defined in the configuration file,  
-  * then in the order the **$faqs** are defined in the configuration file.+  * Then in the order the **$pvw_conf['​faqs']** are defined in the configuration file.
  
  
Line 66: Line 67:
  
 {{indexmenu_n>​40}} {{indexmenu_n>​40}}
-