To enable debug mode for your IP address, add this block of code at the bottom of both presentation and core config.php files. Don't forget to keep the default debug mode lines in the config file commented out (with // in front).
To determine your public IP address, go to http://www.whatsmyip.org/ and it will tell your IP address. Copy that and paste into the $ips array declaration (marked with xxx.xxx.xxx.xxx) in the code below.
Presentation config (/config.php):
PHP Code:
// add IPs here (include the quotes and separate with comma)
$ips = array('xxx.xxx.xxx.xxx', 'xxx.xxx.xxx.xxx');
if (in_array($_SERVER['REMOTE_ADDR'], $ips) === TRUE)
{
$config['debug'] = true;
}
Core config (/core/includes/config.php):
PHP Code:
// add IPs here (include the quotes and separate with comma)
$ips = array('xxx.xxx.xxx.xxx', 'xxx.xxx.xxx.xxx');
if (in_array($_SERVER['REMOTE_ADDR'], $ips) === TRUE)
{
$config['Misc']['debug'] = true;
}
If you suspect the error is caused by a third-party plugin installed on your site, you could turn off all plugins globally for specific IP addresses too by adding this line inside the if-block in core config.php (2nd code above):
PHP Code:
define("DISABLE_HOOKS", true);
You could practically put any available config settings inside the if-block. For example, in presentation config file, you could disable (set to false) no_template_notices setting which is enabled (true) by default. Disabling it will display PHP notices in the templates. This is useful if you are debugging a template.
PHP Code:
$config['no_template_notices'] = false;
To undo the above changes simply comment out the line by adding two slashes // at the start of each added lines or enclose the whole block inside /* and */. This way should you need to enable debug mode again you just have to remove those comment tags.
To update API supported currencies in the AdminCP, Wayne told me to enable Debug, which is in general a bad idea in Production....
Instead, I swapped out the check for Debug mode with a check against the usergroupID:
Was: if ($vb5_config['Misc']['debug'])
Now: if(in_array(($vbulletin->userinfo['usergroupid']),array(6)))
What I need now is someone to give me a good reason why not to do a complete search/replace in the Core directories for " $vb5_config['Misc']['debug'] " and replacing with that In_array statement and creating a Debug usergroup .....
Talk me off the cliff, @glennrocksvb....