vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Debug Mode (Visible for members) How to make it visible for Admins only? (https://vborg.vbsupport.ru/showthread.php?t=286939)

ChiNa 08-22-2012 09:34 AM

Debug Mode (Visible for members) How to make it visible for Admins only?
 
Hey everyone, I have my DEBUG MODE set to TRUE in my config file! Now my members are also seeing the DEBUGING stuff when they login! Is it normal for them to see?

I found this Thread https://vborg.vbsupport.ru/showthread.php?t=265999
If I can use one of the 3 Methods, then which of the methods should I use, and still be able to have the SAME affect using the Debug Mode for my Xml Products....

If you have another Idea, then I would be appreciated... Thank you!

Scanu 08-22-2012 11:51 AM

Hi china-man i don't know if this is valid for vb3 but you can create a plugin with the admin_global hook and put this php code
PHP Code:

$vbulletin->debug true

In this way (after removing debug line from config.php) you should use debug mode just on admincp.

ChiNa 08-22-2012 12:59 PM

Ok Scanu mate, I will give it a try ! And hopefully it will not change anything or affect my product makings... Thank you very much Scanu

vbresults 08-22-2012 03:19 PM

Your best bet is to check for a static IPs in config.php.

PHP Code:

if (in_array($_SERVER['REMOTE_ADDR'], array('1.2.3.4')) {
    
$config['Misc']['debug'] = true;


Replace 1.2.3.4 with your IP, and if you have more than one Admin, add their IP to the array.

There is no other reliable way IIRC -- someone correct me if I'm wrong.

I just looked at class_core and I'm almost positive the code Scanu provided does not work -- it is too late to change the variable at that point.

kh99 08-22-2012 03:29 PM

I think as scanu said, his method is only to have the extra admincp controls, and not to have full debug mode (but I haven't actually tried it myself).

Simon Lloyd 08-22-2012 06:52 PM

Really what you want is this https://vborg.vbsupport.ru/showthread.php?t=176700 saves all the messing around, works on vb3.7.x to vb3.8.x at least :)


All times are GMT. The time now is 09:26 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01430 seconds
  • Memory Usage 1,722KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete