Hack Name:
FAQ & Rules Management System v1.4
Description:
This modification will replace your current faq.php with a new one. The FAQ's will be placed in your database so you can handle them easily instead of them being in templates and the language file.
Because the rules and the faq are in one file, I decided to spice up the rules as well.
Some features are:
- This gives you the opportunity to add/edit as many FAQ's as you please.
- You can decide per Question/Answer if HTML / BBCode / Smilies / IMG code should be enabled or disabled.
- The old links "
faq.php?page=usermaint
" / "
faq.php?page=using
" / "
faq.php?page=messages
" / "
faq.php?page=misc
" / "
faq.php?page=forumrules
" still work.
- The old links like "
faq.php?page=usermaint#1
" will not work. They will, but with different #numbers.
- You can have the smilie and rank listing show up at any Question/Answer you want to.
- You can now decide if you want HTML / BBCode / Smilies / IMG code enabled or disabled in the Board Rules.
- You can set it so that every member has to re-agree to the rules. This way every member will be notified of any major rule changes and they can't complain about it as they can't surf the board if they don't agree first.
Compatibility:
XMB 1.9.8 Engage SP3
Version:
1.4
Code Designed By:
FunForum
License Note:
This modification is released under the GPL License.
Notes:
- For your own safety, backup all effected files & templates before proceeding with this hack
- Keep all names and copyrights in their place
- Do not use this modification if you have more then one language available to your members, as this Management System, only manages one language (which you can determine yourself).
- 2004 / 09 / 26; Adjusted the coding. Activated DEBUG mode and worked out all "issues".
- 2004 / 10 / 04; Fixed the selection of checkboxes/pulldownmenu. "Board Rules" must be turned on if the "All members must re-agree to the rules" wants to work.
- 2004 / 10 / 28; Minor adjustments to meet XMB 1.9.1 Final coding. Added cosmetic fixes by John.
- 2006 / 04 / 09; Minor adjustments to meet XMB 1.9.5 Final coding by GuldantheWarlock.
- 2009 / 02 / 03; Minor adjustments to meet XMB 1.9.8 SP3 coding by WormHole.
Edit PHP File: Language File
And to end of file:
// FAQ-Rules Management System Mod Begin $lang['faq_A'] = "FAQ's updated successfully!"; $lang['faq_B'] = "Add New FAQ:"; $lang['faq_C'] = "Question:"; $lang['faq_D'] = "Answer:"; $lang['faq_E'] = "FAQ Options:"; $lang['faq_F'] = "Edit FAQ's"; $lang['faq_G'] = "New FAQ Category"; $lang['faq_H'] = "New FAQ Question"; $lang['faq_I'] = "Edit Current FAQ's"; $lang['faq_J'] = "New FAQ Solution"; $lang['faq_K'] = "Enter A New FAQ"; $lang['faq_L'] = "New FAQ Sub-Question"; $lang['faq_M'] = "The FAQ Sub-Question Solution"; $lang['faq_N'] = "Admin Area"; $lang['faq_O'] = "Here you can maintain your FAQ's."; $lang['faq_P'] = "Category Name:"; $lang['faq_Q'] = "Category Code:"; $lang['faq_R'] = "The \"Category Code\"
The FAQ comes standard with 4 groups. And one can use links like faq.php?page=misc to go to a section.
To not lose that feature you can tell here what group belongs to which one of the four \"codes\".
Be sure to use each \"code\" only once."; $lang['faq_S'] = "Display:"; $lang['faq_T'] = "If you agree to
all
terms, hit the \"I Agree\" button below to continue...
"; $lang['rules_A'] = "In this part of the \"FAQ Management System\" you can set your Board Rules, and decide if you want HTML, BBCode, Smilies and the IMG Code enabled/disabled.
Also, you can set if every member MUST re-agree to the rules after you changed/updated them."; $lang['rules_B'] = "Rules settings updated successfully!"; $lang['rules_C'] = "All members must re-agree to the rules:"; $lang['rules_D'] = "Admin Message:
Will be shown above the rules and only in that place when the checkbox above is checked.
"; $lang['rules_E'] = "You have accepted the rules. You will now be redirected to the place you were going to."; // FAQ-Rules Management System Mod End
Select All
Upload PHP File: faq.php
'Administration Panel' » 'Insert Raw SQL' »
Use the 'Browse...' button to locate the SQL.txt file that was in the zip file with this html file.
Edit PHP File: member.php
Find (2 Times):
$db->query("INSERT INTO ".X_PREFIX."members
Select All
Find on those same lines:
) VALUES
Select All
Replace With (Both Times):
, readrules) VALUES
Select All
Find on those same lines:
)");
Select All
Replace With (Both Times):
, 'no')");
Select All
Edit PHP File: header.php
Find:
'favorites',
Select All
Replace With:
'faq', 'favorites',
Select All
Find:
// if the user is registered, check for new u2u's
Select All
Add Above:
// Check if the user has read the new rules... $self['readrules'] = ''; if (X_MEMBER && $SETTINGS['bbrules'] == 'on' && $self['readrules'] == 'yes') { if (!strstr($url, "faq.php?page=agreerules")) { redirect('faq.php?page=agreerules', 0); exit; } }
Select All
Edit PHP File: cp.php
Find & Delete:
$ruleson = $rulesoff = ''; settingHTML('bbrules', $ruleson, $rulesoff);
Select All
Find & Delete:
$bbrulesnew = formOnOff('bbrulesnew'); $bbrulestxtnew = postedVar('bbrulestxtnew');
Select All
Find & Delete:
printsetting1($lang['textbbrules'], 'bbrulesnew', $ruleson, $rulesoff);
Select All
Find & Delete:
printsetting4($lang['textbbrulestxt'], 'bbrulestxtnew', stripslashes($SETTINGS['bbrulestxt']), 5, 50);
Select All
Find & Delete:
bbrules='$bbrulesnew', bbrulestxt='$bbrulestxtnew',
Select All
Upload the faq.php that came in this zip file.