1

Topic: Need Extension Help - Can't Write To Database

I'm brand new at making extensions for PunBB. For some reason I can't write to the config table on submit. The extension installs fine..


Here's an example:

<hook id="aop_features_avatars_fieldset_end"><![CDATA[
 ?>
 <input type="checkbox" name="form[allow_notify]"<?php if ($forum_config['allow_notify'] === '1') echo ' checked="checked"'; ?> />
 <?php
]]></hook>

<hook id="aop_features_validation"><![CDATA[
 $form['allow_notify'] = (isset($_POST['form']['allow_notify']) ? '1' : '0');
]]></hook>

There has to be something missing that's "PunBB specific"...  Is anything missing above that should be there?

If above looks correct, can anyone give me an example of saving a setting to the config table?

2

Re: Need Extension Help - Can't Write To Database

In case anyone else has the issue.. The setting needed an "o_" prefix.

..apparently something in parsing (maybe having to do with $form) adds the o_ - where $forum_config does not.


So an example setting:

o_allow_notify

Is updated with this:

$form['allow_notify']

Which is carried here:

$forum_config['o_allow_notify']

smile