Topic: debug mode option
in common.php
1. find
while ($cur_config_item = $db->fetch_row($result))
$pun_config[$cur_config_item[0]] = $cur_config_item[1];
2. after add
if (!defined('PUN_DEBUG') && $pun_config['o_debug_mode'] == '1')
define('PUN_DEBUG', 1);
in admin_options.php
3. find
<tr>
<td class="punright" style="width: 35%"><b>Message</b><br>The message that will be displayed to users when the board is in maintenance mode. If left blank a default message will be used. This text will not be parsed like regular posts and thus may contain HTML.</td>
<td style="width: 65%"><textarea name="form[maintenance_message]" rows="5" cols="55"><?php echo pun_htmlspecialchars($pun_config['o_maintenance_message']) ?></textarea></td>
</tr>
</table>
</td>
</tr>
4. after add
<tr>
<td class="puncon1right" style="width: 140px; white-space: nowrap">Debug </td>
<td class="puncon2">
<table class="punplain" cellpadding="6">
<tr>
<td class="punright" style="width: 35%"><a name="debug_mode"><b>Debug mode</b></a><br>When enabled, the board will turn on the debug mode. WARNING! Do not enble except when you are trying to find out codes that cause any problem.</td>
<td style="width: 65%"><input type="radio" class="puninput" name="form[debug_mode]" value="1"<?php if ($pun_config['o_debug_mode'] == '1') echo ' checked' ?>> Yes <input type="radio" class="puninput" name="form[debug_mode]" value="0"<?php if ($pun_config['o_debug_mode'] == '0') echo ' checked' ?>> No</td>
</tr>
</table>
</td>
</tr>
5. don't forget to execute the following sql:
insert into your_punbb_config values ( 'o_debug_mode', '0');
sometimes i hate changing code directly.