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

Reply
 
Thread Tools
Quickly upgrade your hacked vBulletin 3 without compare programs
Brad
Join Date: Nov 2001
Posts: 4,765

 

Show Printable Version Email this Page Subscription
Brad Brad is offline 07-04-2004, 10:00 PM

I love compare programs, but let?s face it, they can and will miss changes or the core changes so much that they do not become much help at all. Now I'm not knocking compare programs, if you use them that is fine. However I've learned not to trust them for vital upgrades.

In this thread I'm going to show you how to quickly upgrade a board with hacks, with nothing more then a text editor and about an hour of your time.


Before you hack:

Before you begin hacking your board you should always keep in mind that jelsoft will, at some time, release an updated version of vBulletin.
This means at some point you are going to be stuck in a dilemma, which is, do you re-hack the entire source or do you stay with your current version?

Most people choose the latter option, and eventually end up running and insecure copy of the software.

For these reasons it is always important to document all changes you have made, with reference text file.

Keeping good reference:

Having good references will make upgrading an easy task for you. Open any text editor and make a new file named 'vb_upgradekit.txt' and store it in a safe place.

Whenever you install a hack make sure to update this file, include what code you had to find in the stock source, what file it was in, and what code you replaced/placed above or below the stock cod.

Here is an example of a well kept vb_upgradekit.txt file:

PHP Code:
// ################## In file /includes/functions.php ##############

// ## Find: 

$foo

// ## below that add:

while($foo >= $bar)
{
    echo 
$foo;
}

######## End changes for /includes/functions.php ############### 
By documenting your php changes in this way, you can upgrade the .php files of your board quickly because you only have one file to look at. Basically it will feel as you are just installing one large hack.

[high]Very important note: do not include SQL queries from hacks in your upgradkit.txt file, the database should not be affected by upgrades. Re-running SQL queries including in hack installations can damage your board or cause loss of data[/high]

The upgrade process:

1: Download the latest package from the member?s area and extract it to a folder on your local machine.

2: Open your vb_upgradekit.txt file and apply the necessary modifications to the .php files

3: Back-up your database and close your boards

3: Upload the vBulletin package to your server with modified .php files

4: Point your browser to www.mysiteurl.com/forum/install/upgrade.php and follow the on-screen instructions

5: Insure that the board still functions correctly

6: If there seem to be no errors re-open the boards

That?s it
Reply With Quote
  #2  
Old 07-06-2004, 06:09 PM
Jason McConnell Jason McConnell is offline
 
Join Date: Jun 2004
Location: Syracuse NY
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Man, I wish I saw this thread last night I prety much did all of that anyway, without creating the vBUpgradekit. Definitely bookmarking this page
Reply With Quote
  #3  
Old 07-06-2004, 07:35 PM
kira kira is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much, Brad! Great idea. I already comment the heck outta my hacked vB files, but having a separate composite instruction guide is brilliant.

Here's an extra thought: maybe you could remind people to include comments w/the names of the hacks each edit is related to? I don't see that in there, and though it seems obvious, you never know how easy it is to forget simple stuff like that.
Reply With Quote
  #4  
Old 07-21-2004, 01:30 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Another interesting way:
Simply comment your current code and add the new one, with "old code" tags.

Example:
PHP Code:
/* start old code
if ($vboptions['displayloggedin'])
{
    $datecut = TIMENOW - $vboptions['cookietimeout'];
    $numbervisible = 0;
    $numberregistered = 0;
    $numberguest = 0;
end old code */

if ($vboptions['displayloggedin'])
{
    
$datecut TIMENOW $vboptions['cookietimeout'];
    
$numbervisible 0;
    
$numberregistered $numbervisible $numberguest;
    
$numberguest 0
Then, you simply do a search for "old code" to compare.
Reply With Quote
  #5  
Old 07-21-2004, 03:17 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That works but why go back to the files all the time? I used to do that myself, but I have far less trouble just keeping a referance .txt file.
Reply With Quote
  #6  
Old 07-21-2004, 01:46 PM
Zachariah's Avatar
Zachariah Zachariah is offline
 
Join Date: Feb 2002
Location: Canoga Park, CA
Posts: 2,125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Araxis Merge 6.5 works for me @ 70+ hacks ... the comment /* worked ok, and make a file w/ list of changes was ok, but Araxis makes it 10 min vs. 2-3 hours of code.

To each their own I guess.
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 01:06 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.03959 seconds
  • Memory Usage 2,251KB
  • Queries Executed 21 (?)
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
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete