Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions

Reply
 
Thread Tools Display Modes
  #11  
Old 01-08-2004, 08:36 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

VB_AREA is the constant defined to let you know what 'area' of vB your in:

AdminCP: Admin CP;
ModCP: Mod CP;
Forum: Anything in the root or anything that requires the roots global.php
Install: The installer for vB3
Upgrade: The upgrade system for vB3
Reply With Quote
  #12  
Old 01-08-2004, 09:19 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NTLDR
VB_AREA is the constant defined to let you know what 'area' of vB your in:

AdminCP: Admin CP;
ModCP: Mod CP;
Forum: Anything in the root or anything that requires the roots global.php
Install: The installer for vB3
Upgrade: The upgrade system for vB3
so is that sorta how locations are defined in vB3 ?
Reply With Quote
  #13  
Old 01-08-2004, 09:23 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Me thinks NTLDR is way to brainy
Reply With Quote
  #14  
Old 01-08-2004, 09:28 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Faranth
so is that sorta how locations are defined in vB3 ?
I don't think its used in many places, but allows to easy selection of code based on where the user is, take alook at print_cp_login() in adminfunctions.php for an example, it selects the CP title, and what stuff to display based on the value of VB_AREA. Its also used when sending out DB errors IIRC.

Quote:
Originally Posted by MindTrix
Me thinks NTLDR is way to brainy
*lmao* Thanks
Reply With Quote
  #15  
Old 01-08-2004, 09:33 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow this debug mode is crazy!! It's like vBulletin on drugs or something, well to me anyway

So im guessing this should help me with things now?
Reply With Quote
  #16  
Old 01-08-2004, 09:39 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes it should help you out and quite alot of 'extra' stuff is enabled/visible when debug is on. Note that debug mode can be dangerous and does pose a security threat. If you have it enabled on a public board install Xenons hack so its only switched on for yourself
Reply With Quote
  #17  
Old 01-08-2004, 09:48 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mines a mess about board at the moment so

I cant quite grasp how it helps me lol, but im sure i will eventually.
Reply With Quote
  #18  
Old 01-08-2004, 09:55 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, some cool debug stuff

Look at the bottom of each forum page, you'll see a drop down list, this contains all sorts of stuff thats added to it as PHP executes the code. Under this is a 'template usage' box, this shows all the templates that the page you are on has used, and how many times, if you see bold red ones then these are uncached templates (which is bad generally) and have caused extra queries which can normally be avoided.

Add ?showqueries=1 or ?explain=1 onto any URL and it gives an output of all the queries that have run on that page and how long each one took. Very usefull for finding sluggish queries that slow down the page load time.

The settings stuff as explained before.

And probably a bunch of other usefull things that I've forgotten
Reply With Quote
  #19  
Old 01-08-2004, 10:09 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Maybe you should write a tutorial/list then The info you just told me sounds interesting. I thought the debug was just for the admin control panel Thats the only place i looked!
Reply With Quote
Reply

Thread Tools
Display Modes

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 08:30 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.04045 seconds
  • Memory Usage 2,231KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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