Log in

View Full Version : The Debug mode option.


ridley_1969
01-05-2006, 04:22 AM
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.

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

Heo13
01-05-2006, 04:33 AM
I think you have posted in the wrong section ;)

MrZeropage
01-05-2006, 04:42 AM
Well, normally Administrators have UserGroupID 6 ... So maybe you should change this$vbulletin->userinfo[usergroupid]=='6'

ridley_1969
01-05-2006, 05:54 AM
Thanks for the responses.
By the way, what forum should I be in, when posting plugin questions?

Also, the solution was accessing the correct variable. Which I wasn't.


if ($vbulletin->options['myParamName']=='1' && $vbulletin->userinfo[usergroupid]=='6') {
$vbulletin->debug = true;
}

Marcus