Skip to content

Instantly share code, notes, and snippets.

@shabbirbhimani
Last active November 3, 2018 16:56
Show Gist options
  • Save shabbirbhimani/6b80fc3bee5f5961666a052ecb84fb49 to your computer and use it in GitHub Desktop.
Save shabbirbhimani/6b80fc3bee5f5961666a052ecb84fb49 to your computer and use it in GitHub Desktop.
How to Enable Debug Mode in XenForo Only for Admins
<?php
//* Do NOT include the opening php tag above. Copy the code shown below.
// Add here your ip.
$debug_ips = array('202.71.5.115');
//For multiple IPs Use this
//$debug_ips = array('202.71.5.115','SOME.OTHER.IP');
if(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip_address = $_SERVER['REMOTE_ADDR'];
}
if(in_array($ip_address, $debug_ips))
$config['debug'] = true;
@4maroc
Copy link

4maroc commented Mar 10, 2018

Sorry but Not working
i use xenforo 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment