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
Last revision Both sides next revision
services:pvw:conf:faqs [2015/03/16 12:42]
r2d2 [Definition]
services:pvw:conf:faqs [2015/03/17 09:34]
r2d2 change $faqs to $pvw_conf
Line 9: Line 9:
  
 <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>​
  
Line 20: Line 20:
 Here is an exemple : Here is an exemple :
 <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 your mother only";
  
-$faqs['​support'​]['​1'​]['​q'​] ​     ="Will you come at home to repair my software ?"; +$pvw_conf['​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.";​+$pvw_conf['​faqs']['​support'​]['​1'​]['​a'​] ​     ="Of course yes, and we even bring a coffee.";​
 </​code>​ </​code>​
  
Line 36: Line 36:
 ===== Sections ===== ===== Sections =====
 Sections are completely optionnals, but are usefull to separate your FAQs in differents sections, especially if you have many FAQS. 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 names using the following syntax: +Each section index used in FAQs definitions must be named using the following syntax: 
- +<code php> 
-$faqs_sections_names['**SECTION**'​] ="​**NAME**";\\+$pvw_conf['​faqs_sections'​]['​SECTION'​] ="​NAME";​ 
 +</​code>​
  
-Where:+Where :
     * **SECTION** is the section inde used in FAQs definitions     * **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     * **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.//​+
  
  
Line 58: Line 59:
  
 Faqs are groupped by section and sorted : Faqs are groupped by section and sorted :
-  * 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.