I'm trying to create a plugin, that allows me through my admin panel to turn on or off as needed the Debug mode in the config file. (and make the debugging only viewable to administrators, so I don't have to turn off my board)
I've managed to narrow down the variables that the debug mode is contained in. (it's not $config[Misc][debug] as you would think, but rather kept in $vbulletin)
I've tried to place my plugin in global_start and in init_startup but neither allow me to set the debug mode variable.
Code:
if ($vbulletin->options['myParamName']=='1' && $vbulletin->userinfo[usergroupid]=='3') {
$vbulletin->config['Misc']['debug'] = true;
define('DEBUG', true);
}
No matter what I do, it won't let me set the debugging to on.
Anyone try something similiar and find out the reasons why you could/couldn't?
Thanks
Marcus