![]() |
Where can I look for vbulletin constants?
Hi everyone.
Where can I find/read up on all the vbulletin's constants? eg: $show['member'] or $bbuserinfo[username] Right now I wish to detect whether the current page is "index.php". I believe I have to look through the constants. Can any kind soul please give some advice please? Thanks |
Those examples are not constants but variables. ;)
You are looking for the THIS_SCRIPT constant. |
Quote:
But, where are the references for these variables? Which part of the vbulletin manual can I find it? :D |
There isn't anything about them in the manual. The manual only specifies how to run the forum and occasionally touches on the technical coding.
|
At the top of the index page (and most pages) is a line that says
Code:
define('THIS_SCRIPT', 'index'); Code:
<if condition="THIS_SCRIPT=='index'"> https://vborg.vbsupport.ru/showthread.php?t=98047 https://vborg.vbsupport.ru/showthread.php?t=98009 |
Actually, such a list of constants (yes, i mean constants) would actually be very useful.
currently I have to do a search for define(' over the entire vbulletin directory, and that just pulls up a ton of repeats and ones I know about already (like THIS_SCRIPT, TIMENOW, TABLE_PREFIX, etc). Not to mention this doesnt cover the ones that can be defined, and get checked along the way, like DISABLE_HOOKS... a search for defined(' gets those, but again, this doesnt guarantee that it finds all of them. And of course nowhere does it explain what each constant is meant to indicate or flag... magical stuff like SKIP_SESSIONCREATE or LOCATION_BYPASS... fun stuff which I can sort of guess what they do, but wish I could know for sure the exact implications to create optimized pages, ones that I know exactly what they need to do, and everything else will just be a waste of time and resources. In fact theres one block I am trying to write which will simply echo out a row from datastore (an external system processes the output). except datastore can be stored in multiple ways which get handled by global, and I dont want the script to bother with sessions or any of the usual vb setup. just build the appropriate datastore system, get my row, and die :D so, im trying to dig around to find the various constants to turn off everything else -_- |
Yes. If vBulletin is able to release all these information in the member directory, that would be great.
|
But this in a PHP Plugin somewhere, it will fetch constants that are defined but you won't be able to find those that aren't.
PHP Code:
|
yeah, finding them is no big deal :D like i said a quick search through the files will find tons... but does nothing to explain what vb intends them to do without studying the code. and half the time you dont even know some of them are there without seeing some random file defining it at the top of the page - so how would you know when to run that little line :p
|
Last time i build such a list was for 3.6.3:
Code:
// Last check 3.6.3 |
Thanks Marco.
May I suggest vBulletin add those to the official documentation? Thanks. PS: with explaination too. --------------- Added [DATE]1199884383[/DATE] at [TIME]1199884383[/TIME] --------------- Hey guys, I noticed a "feature" in vB admincp. If you mouseover any right pane options, the alt/title description will hover and states the related variables. Eg: you hover over: Allow Users to Email Other Members It will display: $vbulletin->options['displayemails']; |
many thanks marco :D a great starting point
but i too will go suggest vb post somewhere the list of useful constants, and file-prefix flag constants |
Quote:
|
Quote:
|
All times are GMT. The time now is 03:50 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|