Add this to your config.php file.
Create a new topic for this in your index.php file.
Create a new file called faq.php in your WWW.
Download: faq.php for dummies.
Enjoy. eace:
PHP:
// Server FAQ, credits: Archez and elf.
$config['site']['faq'] = array(
'What if I see there are power abusers?' => 'You should always report these people.',
'What if someone is advertising in the server?' => 'You report that player to our gamemasters.'
); // 'question' => 'answer',
Create a new topic for this in your index.php file.
PHP:
case "faq";
$topic = "F.A.Q.";
$subtopic = "faq";
include("faq.php");
break;
Create a new file called faq.php in your WWW.
PHP:
<?php
$main_content .= '<script type="text/javascript"><!--
function show_hide(flip)
{
var tmp = document.getElementById(flip);
if(tmp)
tmp.style.display = tmp.style.display == \'none\' ? \'\' : \'none\';
}
--></script>
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor=' . $config['site']['vdarkborder'] . '>
<td>
<b>' . $config['site']['worlds']['0'] . '\'s FAQ</b>
</td>
</tr>';
$i = 0;
foreach($config['site']['faq'] as $q => $a)
{
$i++;
$main_content .= '
<tr bgcolor="' . (is_int($i / 2) ? $config['site']['darkborder'] : $config['site']['lightborder']) . '">
<td style="cursor: pointer;" onclick="show_hide(\'faq_' . $i . '\'); return false;">
' . $q . '<div id="faq_' . $i . '" style="display: none;"> <b>' . $a . '</b></div>
</td>
</tr>';
}
$main_content .= '
</table>';
?>
Download: faq.php for dummies.
Enjoy. eace:
Last edited: