The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
[How-To] vBulletin API Basics: Variables, Functions, Objects
vBulletin API Basics: Variables, Functions, Objects This How-To should serve as a reference to coders, who have a basic knowledge of PHP and who want to make their own mods. $vbulletin (Type: Object) Contains vBulletin data that has been in separate variables in vB 3.0.x. Below you can find a translation table of changed variables and functions. This is an expanded version of the list that you can find in vBulletin's source code (functions_legacy.php). vBulletin 3.0.3 locations are on the left hand side, and the corresponding vBulletin 3.5.0 locations are on the right hand side. Legacy locations can be enabled by running legacy_enable(), although this is officially not recommended for long term compatibility. Code:
* $vboptions['x'] --> $vbulletin->options['x'] * $iforumcache --> $vbulletin->iforumcache * $forumcache --> $vbulletin->forumcache * $usergroupcache --> $vbulletin->usergroupcache * $datastore['wol_spiders'] --> $vbulletin->wol_spiders * $smiliecache --> $vbulletin->smiliecache * $stylechoosercache --> $vbulletin->stylecache * $datastore['x'] --> $vbulletin->x * $bbuserinfo['x'] --> $vbulletin->userinfo['x'] * $session['x'] --> $vbulletin->session->vars['x'] * * $_BITFIELD['usergroup'] --> $vbulletin->bf_ugp * $_BITFIELD['usergroup']['x'] --> $vbulletin->bf_ugp_x * $_BITFIELD['usergroup']['x']['y'] --> $vbulletin->bf_ugp_x['y'] * $_BITFIELD['calmoderatorpermissions']['x'] --> $vbulletin->bf_misc_calmoderatorpermissions['x'] * $_BITFIELD['moderatorpermissions']['x'] --> $vbulletin->bf_misc_moderatorpermissions['x'] * $_BITFIELD['languageoptions']['x'] --> $vbulletin->bf_misc_languageoptions['x'] * $_USEROPTIONS['x'] --> $vbulletin->bf_misc_useroptions['x'] * $_FORUMOPTIONS['x'] --> $vbulletin->bf_misc_forumoptions['x'] * $_INTPERMS --> $vbulletin->bf_misc_intperms * $_INTPERMS['x'] --> $vbulletin->bf_misc_intperms['x'] * * ------------------------------------------------------------------------------ * Variables and Functions below are NOT affected/re-enabled by legacy_enable() * ------------------------------------------------------------------------------ * * $_GET/$_POST/$_REQUEST/$_COOKIE/$_FILES --> $vbulletin->GPC['x'] * $DB_Site->x() --> $vbulletin->db->x() * $url --> $vbulletin->url * $nozip --> $vbulletin->nozip * $script --> $vbulletin->script * $scriptpath --> $vbulletin->scriptpath * * HTML_SELECTED --> not defined anymore in vB 3.5 * HTML_CHECKED --> not defined anymore in vB 3.5 * * bbcode_parse() --> $bbcode_parser->parse * iif($condition, $r_true, $r_false) --> obsolete, use ($condition ? $r_true : $r_false) instead;
$db (Type: Object) As you might have judged from the Table 1 in this tutorial, the database object in vB3.5 is $vbulletin->db. However, $db is another way to access that object; it is the way that used everywhere unless you call it from within a function. In functions, use $vbulletin->db. Obviously, the purpose of the database method is to perform various operations on the database. Most common methods are described below.
Data Managers Data Managers (DMs) are an interface to various data objects used within vBulletin. They enforce necessary constraints and administrator-set options on the data to ensure that the data is valid. You can read more about Data Managers in vBulletin's online manual. Also, you can read specifically about the User DM in this KirbyDE's How-To, and about Thread DM here. Authentication Storage The authentication data is stored in the following way (thank to Kirby for this info): $_COOKIE: {cookiepfx}userid - plain(userid) {cookiepfx}password - md5(md5(md5('PlaintextPassword') . salt) . 'LicenseNo'). TABLE user: password - md5(md5('PlaintextPassword') . salt) Note that for cookie, {cookiepfx} is your board's cookie prefix. It is configurable via admincp and is accessible via the COOKIE_PREFIX constant. Important Functions
>> EOD |
#42
|
|||
|
|||
Its a pity such articles don't get written any more and we have to read the 3.5 ones...
|
#43
|
|||
|
|||
It's true, you'll find that most of the things in the article are true for 3.6 as well as 3.7.
|
#44
|
|||
|
|||
I know, but I wanted to mention that such good articles don't get written any more...
|
#45
|
||||
|
||||
There isn't much point in adding too many more vB. articles as everything has pretty much been covered. If you are looking for general programming articles, then this isn't the best place.
|
#46
|
|||
|
|||
Quote:
And no, I'm not looking for general programming articles here. In fact I find that comment of yours quite offending. |
#47
|
||||
|
||||
It's not supposed to be offensive, sorry if you found it that way.
This is from a perspective of someone who would be writing the articles. |
#48
|
||||
|
||||
Aside from vb's AJAX being migrated to the Yahoo UI, I'm not really aware of that much which has changed from 3.6 to 3.7 either. Most of the time whjen I am coding and need to reference things, the articles which are still here seem to do the trick for me.
|
#49
|
|||
|
|||
Doing some upgrading on a few mods, and was wondering how I can check the actual version of vBulletin itself.
Basically, if Less Than 4.0, run this, else, run this. |
#50
|
|||
|
|||
Hmmm , how can i set "variable portions" in my own Product ?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|