Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
List of changed var/array/function names
Brad
Join Date: Nov 2001
Posts: 4,765

 

Show Printable Version Email this Page Subscription
Brad Brad is offline 06-06-2005, 10:00 PM

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()
Reply With Quote
  #62  
Old 07-30-2005, 05:59 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think the shorthand notations get converted to longnames: u->userid, p->post(id)
Reply With Quote
  #63  
Old 07-30-2005, 09:32 PM
RaidenDAWG2 RaidenDAWG2 is offline
 
Join Date: Mar 2005
Location: THE Ohio State University
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
I think the shorthand notations get converted to longnames: u->userid, p->post(id)
So I should modify my template/code to pass in variables with the longnames (i.e. convert u->userid) instead of the current ?u=x&t=y&p=z format I've got now on the URL?

-RD
Reply With Quote
  #64  
Old 07-31-2005, 09:26 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, if you pass a 'u=..' on the url, i think you will end up with the userid variable, instead of just 'u' in the target script.
Reply With Quote
  #65  
Old 10-09-2005, 01:50 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This should be sticky, plz tyvm.
Reply With Quote
  #66  
Old 10-10-2005, 07:03 AM
Cap'n Steve's Avatar
Cap'n Steve Cap'n Steve is offline
 
Join Date: Feb 2004
Location: Kalamazoo, MI, USA
Posts: 745
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Agreed. This is really the best place to start getting familiar with 3.5.
Reply With Quote
  #67  
Old 10-10-2005, 07:25 AM
Neutral Singh's Avatar
Neutral Singh Neutral Singh is offline
 
Join Date: Sep 2004
Location: Sikh Philosophy Network
Posts: 545
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Global

$vboptions[] => $vbulletin->options[]
$vboptions[] works in vB3.5.0 too.
Reply With Quote
  #68  
Old 10-10-2005, 01:07 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MrNase
Thank you

One should edit the first post of this thread and add all usefull information
One is going to do that today, in a new thread, and the new thread will contain 15x more useful information than that of this thread's first post
Reply With Quote
  #69  
Old 10-28-2005, 11:30 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Posted, and I think this threads should be deleted as obsolete.
Reply With Quote
  #70  
Old 10-31-2005, 05:27 PM
scotsmist scotsmist is offline
 
Join Date: May 2005
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A link to the new thread please
Reply With Quote
  #71  
Old 10-31-2005, 07:49 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by scotsmist
A link to the new thread please
https://vborg.vbsupport.ru/showthread.php?t=98047
Reply With Quote
Reply


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 02:15 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04728 seconds
  • Memory Usage 2,297KB
  • Queries Executed 25 (?)
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
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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