Oh I didn't realised it sanitized it, I thought we had to do that
Also if the user doesn't input any data into this setting:
$something_setting_6 = array(
'sid' => 'NULL',
'name' => 'something_disablefor',
'title' => 'disable for (1,2)?',
'description' => 'Please select whether you want this to appear on the register page.',
'optionscode' => 'text',
'value' => '0',
'disporder' => 6,
'gid' => intval($gid),
);
How can I save the setting with the value of 0 automatically as if they remove the 0, it saves blank which doesn't work.
Thanks

Just do something like:
if($mybb->settings['mysetting'] == '') // user left the field empty when editing settings
{
$mybb->settings['mysetting'] = "0";
}
Within your function.
Thanks Omar, which function should I place it in? I've tried it in the _newreply_end() function but it doesn't seem to change the setting when I've left it blank.
Thanks

Thanks for the reply
Does it matter which function I add it in? It doesn't appear to change the value to 0 if i've left it blank.
You can as well add it to he beginning of your plugin file, set $mybb as a global first.
Thanks for the reply
I've added it like this:
if(!defined("IN_MYBB"))
{
die("You Cannot Access This File Directly. Please Make Sure IN_MYBB Is Defined.");
}
global $mybb;
if($mybb->settings['mysetting_disablefor'] == '') // user left the field empty when editing settings
{
$mybb->settings['mysetting_disablefor'] = "0";
}
require_once MYBB_ROOT."inc/functions_user.php";
// Hooks
but it still doesn't seem to change the setting to 0 when I leave it blank.
Thanks

It will not, but you can now, for example, put {$mybb->settings['mysetting_disablefor']} in your footer template, and if you leave the setting empty it will output "0".
Thanks Omar
How would I go about automatically changing the setting value to 0 if it's left blank as currently it just outputs 0 in the footer.
Thanks
