Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Debug variable in URL Details »»
Debug variable in URL
Version: 1.00, by krohnathlonman krohnathlonman is offline
Developer Last Online: Dec 2008 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 04-16-2004 Last Update: Never Installs: 3
 
No support by the author.

open your global.php and go to the end of it....

Insert:


if ($_REQUEST['debug'] > 0) {
$debug = 1;
}

Now just add &debug=1 at the end of any URL to be able to see those debugging stats

If anybody else did this already just kill this thread... Just wanted to add this kind of info to my articles page and came up with this code.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 04-17-2004, 07:18 AM
rob_daemon's Avatar
rob_daemon rob_daemon is offline
 
Join Date: Sep 2003
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah... excellent

One change that I can think of:

PHP Code:
if ($_REQUEST['debug'] > AND ($permissions['adminpermissions'] & CANCONTROLPANEL))
{
     
$debug 1;

That way you have to be able to access the Admin CP to do this.
Reply With Quote
  #3  
Old 04-17-2004, 09:21 AM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rob_daemon
Ah... excellent

One change that I can think of:

PHP Code:
if ($_REQUEST['debug'] > AND ($permissions['adminpermissions'] & CANCONTROLPANEL))
{
     
$debug 1;

That way you have to be able to access the Admin CP to do this.
That wouldn't work because the $permission array won't be initialized in config.php yet.
Reply With Quote
  #4  
Old 04-17-2004, 03:39 PM
rob_daemon's Avatar
rob_daemon rob_daemon is offline
 
Join Date: Sep 2003
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by AlexanderT
That wouldn't work because the $permission array won't be initialized in config.php yet.
He said to put this in global.php where it would work... if you wanted it in config.php or even init.php, you'd have to use $_COOKIE.
Reply With Quote
  #5  
Old 04-17-2004, 03:49 PM
AlexanderT's Avatar
AlexanderT AlexanderT is offline
 
Join Date: Mar 2003
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rob_daemon
He said to put this in global.php where it would work... if you wanted it in config.php or even init.php, you'd have to use $_COOKIE.
Ahh, where are my glasses!
Reply With Quote
  #6  
Old 04-17-2004, 03:59 PM
krohnathlonman krohnathlonman is offline
 
Join Date: Feb 2004
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you want only admins to be able to see it, I suggest you change

This part:
if ($_REQUEST['debug'] > 0) {

to something hidden like if ($_REQUEST['zebrapants'] > 0) {

then in the URL instead of using &debug=1 use &zebrapants=1
Reply With Quote
  #7  
Old 04-17-2004, 10:44 PM
Majik?'s Avatar
Majik? Majik? is offline
 
Join Date: Mar 2004
Location: Thunder Bay, ON, Canada
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by krohnathlonman
If you want only admins to be able to see it, I suggest you change

This part:
if ($_REQUEST['debug'] > 0) {

to something hidden like if ($_REQUEST['zebrapants'] > 0) {

then in the URL instead of using &debug=1 use &zebrapants=1
Instead of having to type something that long, why wouldn't you jsut add a conditional to either check permissions or usergroup of the user? not only that, there's always the potential that someone would find out what the variable is and without any kind of usergroup/permission check, they can use it.
Reply With Quote
  #8  
Old 04-18-2004, 02:51 AM
GamerJunk.net's Avatar
GamerJunk.net GamerJunk.net is offline
 
Join Date: Jan 2004
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Screenshot of what it would look like when you debug it?
Reply With Quote
  #9  
Old 04-18-2004, 03:12 AM
krohnathlonman krohnathlonman is offline
 
Join Date: Feb 2004
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it's the VB built in Debug screen which tells you time to create page, what templates used, queries.
Reply With Quote
  #10  
Old 04-19-2004, 10:24 PM
Rich's Avatar
Rich Rich is offline
 
Join Date: Mar 2004
Location: U.S.A
Posts: 921
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,
The code worked as suspected,but then it caused an error claiming that header can't be sent,they already were. I am running VB3 gold, all the newest mysql,apache,etc. I debugged,and returned to my normal forum. All was fine until I tried to read a post. Thats when the errors jumped. Naturally,I removed the code from my global and everything was fine again. (Yes,I placed the code where it states to do so.)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:49 PM.


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.07293 seconds
  • Memory Usage 2,294KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete