phpBBHacks.com - Add Sections to Forum FAQ
Follow Microsoft at MicrosoftBlog.com
StatsForums Home   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
FAQFAQ   SearchSearch   MemberlistMemberlist   TutorialsTutorials   ContactContact Us
Add Us:     MySpace     Facebook     StumbleUpon
Username:    Password:
Remember Me?    
Add Sections to Forum FAQ
BlinkList
del.icio.us
Furl
linkaGoGo
reddit
Simpy
Mister Wong
Yahoo! My Web

Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2: Customizing Your phpBB
 See a User Guidelines violation? Please contact us.
Author Message

Thoul
VIP

Joined: 30 Jul 2002
Posts: 17676
Location: USA

PostPosted: April 2nd 2004, 5:27 pm    Post subject: Add Sections to Forum FAQ Reply with quote

When you add new features to your forum, it's always a good idea to explain how these work for your users. One way of doing this is to add a new section to your forum's FAQ. phpBB comes with two default FAQs. These are the main FAQ, like this one and a BBCode Guide linked in the posting form.

The text for these pages is stored in the language/lang_english/lang_faq.php and language/lang_english/lang_bbcode.php files, respectively. Each language on your forum may have it's own copy of these files, which are parsed by faq.php to create the list of question links at the top and the sections containing question and answer blocks on the FAQ pages displayed to users. If you want to add sections to the FAQ explaining how to use new BBCodes, you should edit lang_bbcode.php. Adding sections to the main FAQ requires editing lang_faq.php. Both files use a common format, which is explained later. Some large hacks may also come with their own FAQ pages stored in similar files.

There are two types of entries in each FAQ. These are header entries and question entries.

Each header entry creates a separate section on the FAQ page. Header entries look like this:
Code:
$faq[] = array('--', "Text for Header");

The two dashes indicate that this is a header entry. All of the question entries following one header entry and preceding another or the end of the file will be displayed in the section created by the first header.

Question entries are very similar. They look like this:
Code:
$faq[] = array("question", "answer");

Obviously, you would replace question and answer with the actual text of your FAQ question and answer.

When entering the text for your header, question, and answer, you must be careful about using double quote characters. Using double quotes inside one of these, as shown below, will create a parse error. If you need to use double quotes, add a backslash (\) before it. This is called escaping the double quote.
Code:
This is wrong:
$faq[] = array("What can create a parse error?", "Using a " inside a header, question, or answer.");

This is right:
$faq[] = array("What can fix a parse error?", "Escaping the \" inside a header, question, or answer.");


Also make sure you include the closing parentheses and semi-colon for each entry. Leaving either of those off can also cause a parse error.
_________________
Phantasy Star: The Fringes of Algo

Install, remove, or upgrade SQL with Advanced DB Update Generator! Now with phpBB 3 Support!

My phpBB Books, Hacks, and Other Works «·» 70+ Listings @ phpBBHacks.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2: Customizing Your phpBB All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Links: Big Message Boards - Free JavaScript - phpBB2 - phpbb styles - Suporte phpBB - phpBB.it - phpBB Česky - phpBB Turkiye - phpBBArabia.com - phpBB-fr.com - Romanian phpBB online community - phpBB-TW.net - phpBBservice.nl - phpBB Brasil

Network: iFroggy Network Blog - iFroggy Hosting - SportsForums.net - KarateForums.com - YanksBlog.com - DeveloperCube - Managing Online Forums - ManagingCommunities.com - CommunityAdmins.com - PhotoshopForums.com - MicrosoftBlog.com - DrGregHouse.com - Bad Boy Blog - BadBoyForums.com - SodaRatings.com - Patrick O'Keefe

< Advertising - Contact Us - Staff - User Guidelines >

Copyright © 2001-2008. iFroggy Network, phpBBHacks.com. All Rights Reserved. Privacy Policy. We Support phpBBHacks.com (of course!).
Powered by phpBB © phpBB Group. phpBB SEO. Hosted by 100MegsWebHosting. We are in no way affiliated with the phpBB Group. phpBB is copyright to the phpBB Group.