1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

"Debug Info" in Footer for Admins Only

Only show the debug information in the footer to administrators.

  1. Vincent

    Vincent Well-Known Member

    VincentU submitted a new resource:

    "Debug Info" in Footer for Admins Only (version 1.0) - Only show the debug information in the footer to administrators.

    Read more about this resource...
     
  2. Archet

    Archet Member

    I've been looking for this, but even if I replace the code as above, the debug info wont show for admins.

    The only way to make it show is if I enable debug mode in config.php
     
  3. Vincent

    Vincent Well-Known Member

    That's not a bug, that's how it's designed.
    The debug info, by default, only shows when debug mode is on. Normally it shows it to everyone but thanks to this modification it only shows the debug information to admins when debug mode is on.
     
  4. Archet

    Archet Member

    Oh, I misunderstood what it did. Got it working now.

    Thanks a lot :)
     
  5. JohnSmith001

    JohnSmith001 Member

    Doesn't seem to be working with 1.5.6.

    But this works:

    // Enable debug mode for these IP addresses
    $allowedIPs = array(
    '127.0.0.1', // First allowed IP address
    '127.0.0.1', // Second allowed IP address
    );

    if (in_array($_SERVER['REMOTE_ADDR'], $allowedIPs)) {
    $config['debug'] = true;
    }
     

Share This Page