The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
List of changed var/array/function names
A lot of things changed in 3.5 and you might find yourself lost for awhile as you figure out how to work with the new var/array/function names. This list should help you port your old 3.0.x hacks quicker, if you have anything to add to the list reply to this thread and I will edit the first post! Note that some of these might not work in some parts of the new code, OOP changes a lot of things, in some cases you might be using $this-> or some other alternative to get to these. On the front end they will work for the most part. Do remember that there are hooks littered in the 'build' functions like the one that builds postbit. For an example of working with such hooks you can check out a plug-in I released, I spend 5 minutes wondering why $post would not work until I realized I was begin an idiot! Anyway check out the .xml file: https://vborg.vbsupport.ru/showthread.php?t=82623 Turned out I needed to use $this->post because that hook was inside of a function! Doh! [high]The big list...[/high] 3.0.x version of the var will be on the left, 3.5 on the right as so: 3.0.x => 3.5 [high]Global[/high] $DB_site-> => $db-> $bbuserinfo[] => $vbulletin->userinfo[] $vboptions[] => $vbulletin->options[] $_GET/$_REQUEST/$_POST/$_COOKIE => $vbulletin->GPC[] globalize() => $vbulletin->input->clean_array_gpc() |
#42
|
|||
|
|||
Quote:
$vbulletin->userinfo['buddyarray'] = $buddyarray |
#43
|
||||
|
||||
Quote:
|
#44
|
||||
|
||||
function construct_page_nav now accepts 5 params, not just 3 as the legacy one
but I don't really know why the phpdoc only states for 3 params: PHP Code:
2st param: number of items per page. the last 3 params are defined in the phpdoc above, they're just like before. Please update all the info that users submit so that others only have to look at the fist post so that they can check for what has been changed. |
#45
|
|||
|
|||
Quote:
PHP Code:
|
#46
|
||||
|
||||
$url => $vbulletin->url
----------------------------------------- I can't use $vbulletin->input->clean_array_gpc as globalize() with globalize() globalize($_POST, array('e' => INT, 'do' => STR_NOHTML, 'iconid' => INT)); gives value to varibles $e, $do, $iconid but with $vbulletin->input->clean_array_gpc('p', array('e' => TYPE_UINT, 'do' => TYPE_STR, 'iconid' => TYPE_UINT)); I can't get $e, $do, $iconid any suggestion to use $vbulletin->input->clean_array_gpc properly ? EDIT: I figured out it turns to be $vbulletin->GPC['e'], $vbulletin->GPC['do'], $vbulletin->GPC['iconid'], am I correct ? how complex. ------------------------------------------ print_standard_error(...) is now redundant. Instead, use standard_error(fetch_error(...)) |
#47
|
|||
|
|||
While looking at the changes needed for vbportal, I wanted to share what I found.
I see you have $bbuserinfo is now $vbulletin->userinfo listed, you may want to add $session is now $vbulletin->session $session[sessionurl] for example is now $vbulletin->session->vars[sessionurl] $session[sessionurl_js] is now $vbulletin->session->vars[sessionurl_js] another is with the datastore caches which are unserialised in init.php $forumcache is now $vbulletin->forumcache $iconcache is now $vbulletin->iconcache etc another is $url is now $vbulletin->url also $nozip is now $vbulletin->nozip plus $scipt is now $vbulletin->script and $scriptpath is now $vbulletin->scriptpath in addition to $vbulletin->input->clean_array_gpc you can also use $vbulletin->input->clean_gpc when there is only one variable. you may wish to use something like $perpage = $vbulletin->input->clean_gpc('r', 'perpage', TYPE_UINT); so you can use $perpage in a template the bitwise $_FORUMOPTIONS and $_USEROPTIONS have been replaced by $vbulletin->bf_ugp_forumoptions and $vbulletin->bf_ugp_useroptions notice that HTML_SELECTED and HTML_CHECKED are not defined now function iif() is marked as obsolete to ! (one of my personal favourites) function bbcode_parse is now $bbcode_parser->parse the print_standard_redirect function has changed a little and it doesn't pass the $url anymore, so you need to set $vbulletin->url first. the function also supports forceredirect, so there's no need to set $GLOBALS['forceredirect'] anymore. |
#48
|
|||
|
|||
Big-board here, with the annoying questions nobody wants to answer.
I read all about the 3.5 changes on vb.com, but I didn't see anything about the query_write query_read abstraction until just now. Color me floored! My question is, for us large sites that use MySQL replication functionality, is there anything in place currently to distribute reads among a group of servers which are replicating? I'd love to be able to easily spread reads to our slave server(s) for queries, and have the ability to pseudo load balance queries, or at least have some type of "failover", that is, if our slave server is unresponsive to remove it from the pool of available query_read capable servers. Obviously this would be a very rudimentary form of clustering, but I'll take what I can get at this point (It's more MySQL's fault than anything else, not having master<->master replication sucks). |
#49
|
|||
|
|||
Does anyone know how the style vars are stored now? $style["imgdir_misc"] still works as before, but $style["title"] and some others do not.
|
#50
|
|||
|
|||
Quote:
Can someone shed some light on this? Based on the above, I changed a program to use $vbulletin->GPC instead of $_REQUEST and the program no longer works. Switched back to $_REQUEST and everything works fine. I am puzzled. I think I need to elaborate: In the past, I was using this part of code: PHP Code:
PHP Code:
|
#51
|
||||
|
||||
Quote:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|