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 |
#2
|
|||
|
|||
this is my first subscribed thread (no email notifications).
in other way, i bookmarked. Thank You so much, DV! |
#3
|
||||
|
||||
very handy. thanks.
|
#4
|
|||
|
|||
Excellent!!
|
#5
|
|||
|
|||
NICE work Dark Visor.
|
#6
|
|||
|
|||
Very nice! Bookmarking for future references
Great job. Matt |
#7
|
|||
|
|||
Thanks everyone for feedback.
Tutorial has been updated with two pairs of emendations to the $db class documentation: - $db->escape_string(); + $db->escape_string_like(); - $db->show_errors(); + $db->hide_errors(); |
#8
|
|||
|
|||
Brilliant - I've actually bookmarked this thread. Why do Jelsoft make it so bloody difficult for people? I've been looking for some simple software documentation on this type of thing and it's just "not provided".
Many thanks, keep up the good work! Keith L |
#9
|
|||
|
|||
Not bad young grasshoper. Not bad at all.
|
#10
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|