Log in

View Full Version : Upgrade to 2.2.2 From 2.2.1


Scott MacVicar
01-29-2002, 10:00 PM
This file contains all the changes you must make to upgrade your forums to 2.2.2 from 2.2.1. I have used this on my forums and it has worked successfully. Unfortunately we will unable to provide support for this, if you are getting errors then you may have applied the change in the wrong place.

Make sure you backup your files and database before doing this.

Once you have changed all the files you must upload them plus the new vBulletin.style upgrade15.php and some other files which were changed too extensively to justify a list of all the changes.

Scott

SirSteve
01-30-2002, 07:06 PM
Thank the maker! This will save major time!

:D

Princeton
01-30-2002, 08:14 PM
Thank you ... uploaded with no problems.:)

djr
01-30-2002, 08:17 PM
Scott,

First, a big major thanks for all your efforts! Did a great job on this document!

Second, does this mean we'd only have to change these .php files and leave all others untouched? For example: you don't say anything about member.php, does this mean I can just leave the 2.2.1 version of this file?

- djr

Scott MacVicar
01-30-2002, 08:56 PM
correct
if its not mentioned it doesn't need to be modified, as this release was mainly a bug fix not every file was edited.

I also had someone emailing me asking if Jelsoft allowed this, John had no quams with me posting this here.

djr
01-30-2002, 08:59 PM
Great, thanks! /me needs to do some serious editing now :-)

... and off I am

Jawelin
01-30-2002, 09:58 PM
Wonderful!!
Great, Scott. :D

I never saw before a FULL UPGRADE HACK... ;)
Yeah, it's the hack itself.
Thanks

P.S.: what did you use ?
Araxis Merge, Beyond Compare, eight pairs of eyes and hands, or what ? :pleased:

SWFans.net
01-30-2002, 10:30 PM
You sir, are a saint among men. Thank you!!!!

Tim Wheatley
01-30-2002, 11:30 PM
Thanks :D

Princeton
01-30-2002, 11:33 PM
squawell,
Look at it more closely ... you'll see it was a typo, e was left out.

squawell
01-30-2002, 11:33 PM
thankz PPN~:D:D

it's very useful~~

Lionel
01-31-2002, 12:22 AM
you are God sent. Thank you

SirSteve
01-31-2002, 02:18 AM
I noticed if you have the contract/expand hack installed and the community bulletin hack, some of this code makes it unusable.

FWC
01-31-2002, 03:31 AM
Originally posted by SirSteve
I noticed if you have the contract/expand hack installed and the community bulletin hack, some of this code makes it unusable. I upgraded my test board and noticed some interesting things. Hacks that were inserted into the default templates were mostly moved to custom templates. This happened to vBStats and everything was fine. Some of the Contract Posts templates were blown away. I made new custom templates for modifyoptions_hideposts_ie and showthread_hideposts and everything was back to normal. I'm glad I'm testing everything on the test board first. :)

Freddie Bingham
01-31-2002, 04:10 AM
You can only lose templates IF you put them into your database with a templateset id of -1. You should never use templateset -1 as those are the base templates and they are removed and replaced with every upgrade.

FWC
01-31-2002, 04:17 AM
Originally posted by freddie
You can only lose templates IF you put them into your database with a templateset id of -1. You should never use templateset -1 as those are the base templates and they are removed and replaced with every upgrade. Some of the hacks intsall that way. I was just testing to see what would happen. The interesting thing is most of them didn't get deleted but moved to custom templates. I thought that was pretty slick. I only had to add two back. :)

FWC
01-31-2002, 06:23 AM
OK, here's a trick. If you have hack templates installed into the default templates, you will lose them in the upgrade. Unless they are modified. If they've been modified they will move to custom templates. I went through my vBStats, Contract Posts and vBLinks templates and modified the ones I hadn't touched. I added some junk and then took it out. I did NOT revert them. Then when I upgraded my real board, they all got moved to custom templates. If you combine this with hacking the PHP files according to PPN's instructions (be very careful if you have a hack in any of the modified code), you will have no problems. :)

Scott MacVicar
01-31-2002, 07:49 AM
Those hacks shouldn't replace the default template in my opinion.

Remi
01-31-2002, 08:40 AM
I think ther is a mistake in the instructions

=====================
/admin/functions.php

look for
eval("standarderror(\"".gettemplate("error_banip")."\");");

below it add
exit;
=============

I think it should be remove "exit;"

please correct me if I am wrong

Jawelin
01-31-2002, 09:31 AM
Originally posted by FWC
OK, here's a trick. If you have hack templates installed into the default templates, you will lose them in the upgrade. Unless they are modified. If they've been modified they will move to custom templates. I went through my vBStats, Contract Posts and vBLinks templates and modified the ones I hadn't touched. I added some junk and then took it out. I did NOT revert them. Then when I upgraded my real board, they all got moved to custom templates. If you combine this with hacking the PHP files according to PPN's instructions (be very careful if you have a hack in any of the modified code), you will have no problems. :)
Let me check if understood.
You say if I edit each my 'default template' which was added by any hack (installer or not), to see near it the three links [edit] [revert to original] [view original] instead of the standard two, I'll be sure they'll be moved to 'custom template' section after the upgrade; or at least they will not reverted by the upgrade ....

Is it true ?
Thanks

Scott MacVicar
01-31-2002, 02:21 PM
remi this was a change between 2.2.2 RC and 2.2.2 final i'll have to wait until i am home to confirm this for you.

FWC
01-31-2002, 04:43 PM
Originally posted by Jawelin

Let me check if understood.
You say if I edit each my 'default template' which was added by any hack (installer or not), to see near it the three links [edit] [revert to original] [view original] instead of the standard two, I'll be sure they'll be moved to 'custom template' section after the upgrade; or at least they will not reverted by the upgrade ....

Is it true ?
Thanks That's how it worked on both my test board and live board.

orca
01-31-2002, 04:44 PM
Thanks for the good work

Linus
02-01-2002, 07:34 AM
Does this mean I can use this without losing my hacks ?

Scott MacVicar
02-01-2002, 07:57 AM
yes it is a list of all changes in the files between 2.2.1 and 2.2.2

Jawelin
02-01-2002, 08:51 AM
Just FYI, in today's feb 1 download of VB 2.2.2,
upload/admin/vbulletin.style has changed.

Bye

Scott MacVicar
02-01-2002, 03:33 PM
did they announce on the site that it had changed?

cause the downloads are made dynamically the creation date will always be different, depending on when you downloaded it as they use CVS.

Jawelin
02-01-2002, 04:08 PM
I know well.
The dates change, but the file content doesn't.... ;)

Instead, I checked the two zips with a my slight utility which compares file-CRCs .... That file is the only changed in the past day.

I often check when new release comes out, as the first two or three days there are a lot mods...
For example, the 2.2.1 just came out, in four days changed about 3 times.

Hwr, this time only the style changed. This shouldn't affect your great job.

Bye

Mystics
02-01-2002, 09:24 PM
Big Thx @PPN for your great work!

But, one little fault: :rolleyes:

In online.php, you also have to do this changes:look for
if (($userinfo["$key"]['lastactivity'] < $user['lastactivity']) or !$userinfo["$key"]['lastactivity']) {

below it add
$userinfo["$key"]['realname'] = $user['username'];I only noticed this, because it affected a bug I posted on vbulletin.com :p

Greetings,
Mystics

Hoffi
02-01-2002, 09:27 PM
It works great. I just used it, with a german Style and all works perfeclty. You saved me much time.

Erwin
02-01-2002, 11:01 PM
Done! It works well, thanks for the upgrade "hack"!!!

:)

Tim Wheatley
02-01-2002, 11:03 PM
For those having trouble -- OBVIOUSLY you modify the new code around your existing hacks. Someone (I take it?) says that the contract/expand hack doesn't work? It did on my board -- I just had to re-insert the mods into the templates again.

I keep full records of EVERY modification I make to the board on my site, the forums are what make my site and I reeeeeeally don't want them screwed up for long if I can help it.

When I was installing 2.2.2 I didn't even have to turn the board off, users didn't even know I'd upgraded -- but I haven't had a single 'my link in e-mail doesn't work' e-mail. :)

I'd just like to thank 'PPN' again for taking the time to do this. :D

Erwin
02-01-2002, 11:12 PM
Yup - just run the install_contractposts.php to reinstall the templates - no need to make any code or template changes.

SirSteve
02-02-2002, 04:58 AM
$pagenav = getpagenav($totalposts,"showthread.php s=$session[sessionhash]&threadid=$threadid&perpage=$perpage".iif(isset($highlight), "&highlight=$highlight", ""));

Where is the question mark after .php?

Is it not supposed to be there?

Scott MacVicar
02-02-2002, 07:02 AM
there is a question mark in my version

SirSteve
02-02-2002, 12:35 PM
Thanks. Odd, it's stripped out on my end... also, was that double "exit;" correct?

nafae
02-02-2002, 01:38 PM
this was so incredibly helpful... TANKIE YOUZ!

X-Fan
02-02-2002, 02:02 PM
Thank you sooooooooooo much for this!!! You've saved me a lot of time and effort!

All I had to do was re-run the VBStats hack and select upgrade to re-initialize that hack - the rest remained untouched and intact!!!

Thanks again!

Scott MacVicar
02-02-2002, 02:37 PM
yeah it should have been remove exit; someone distracted me at the time on ICQ, can't remember who though probably FireFly ;)

SirSteve
02-02-2002, 04:57 PM
Do you remember which file that was in?

voogru
02-02-2002, 07:57 PM
Thanks :D

SirSteve
02-02-2002, 09:39 PM
Another thing, are the changes made to forumdisplay.php the "optimized" changes as referring to this page:

http://www.vbulletin.com/forum/showthread.php?s=&threadid=38684

Jawelin
02-03-2002, 09:31 AM
Originally posted by SirSteve
Another thing, are the changes made to forumdisplay.php the "optimized" changes as referring to
Correct. Infact nowaday downloading of the vbulletin2.zip has changed that file too, besides the .style of two days ago.

Well.
What should be the right upgrade sequence ??
- change the php files as written here (without uploading)
- backup templates
- upload and execute upgradeXX.php
- restore templates with changes
- upload all the modified php files

Is it all right ?
Thnx

Scott MacVicar
02-03-2002, 01:57 PM
ok updating the file with the optimized options added

Jawelin
02-03-2002, 02:29 PM
PPN: the quickest hacker in the west !
(what's your timezone ? :stupid: :stupid: )

Hwr, i'll raise my procedural question above:

Originally posted by Jawelin
Well.
What should be the right upgrade sequence ??
[...]
Is it all right ?


Thanx
As said in another (https://vborg.vbsupport.ru/showthread.php?postid=216738#post216738) hack/upgrade-oriented thread, this is the first time I upgrade an hacked version, so wouldn't make mistakes to make me close for a month!
Bye

Scott MacVicar
02-03-2002, 03:03 PM
I'd do the following
apply the file changes
backup database
close board
upload new files including upgradeXX.php and vBulletin.style
restore templates
open board

Jawelin
02-03-2002, 05:59 PM
Originally posted by PPN
[...]restore templates[...]
Thanks for the checklist.
About quoted action, more questions:
- Template Backup System ? And what about new created/modified templates by upgradeXX.php ?
- Should I compare all the new templates with the old ones ?

Thnx

SirSteve
02-03-2002, 09:52 PM
So what do those that already did the updates from the first file do?

Jawelin
02-04-2002, 09:14 AM
Originally posted by SirSteve
So what do those that already did the updates from the first file do? ?!?!?
Is it a word game ? :dead:

Jawelin
02-04-2002, 01:47 PM
Originally posted by Jawelin

Let me check if understood.
You say if I edit each my 'default template' which was added by any hack (installer or not), to see near it the three links [edit] [revert to original] [view original] instead of the standard two, I'll be sure they'll be moved to 'custom template' section after the upgrade; or at least they will not reverted by the upgrade ....

Is it true ?
Thanks
Still I can't understand how modified (by hacks) templates could stay in 'default' with only [change original] voice.
On my board there are three states of 'default' templates:
1) Custom, identified by [edit] [remove] options
2) Original, identified by [change original] option
3) Original modified, identified by [edit] [revert to original] [view original] options

Well, if case 2, I don't worry if upgrade changes it, of course.
If cases 1 and 3, do you mean they are automatically skipped by the upgrade as they are 'custom' ?
If so, I'll have the upgrade modifications only in the 'original' version of those customized templates, is it true ? How could I compare - via TBS, for example - the original and modified versions to apply by hand the changes ?

Thanks everybody.
Bye

TECK
02-06-2002, 08:31 AM
great work PPN.. u basically did the job with araxis merge right?

Scott MacVicar
02-06-2002, 01:07 PM
Jawelin they modified the default template, this means that vBulletin thinks that the modification they made to the template comes as standard with the vBulletin install.

When you go to upgrade it replaces the default template set, this is ones that are NOT modified, and as they didn't modify them in the regular way it just overwrites them.

nakkid i used Beyond Compare to do this

psico
02-06-2002, 04:39 PM
PPN thanks a lot!!!
I´ve migrated my Board with 20+ hacks in minutes!!!

Everything works perfectly...

cya

Scott MacVicar
02-06-2002, 05:03 PM
no problem

jus to clarify the problem with templates cause i don't think i was too clear.

There is a template set with the id -1 stored in the database, this is the master template set these are not modified in anyway and are stored for use when you create a new template set. These hacks modify this master template set so when vBulletin upgrade rewrites them it overwrites the pieces that the hack inserted in the Master Template Set.

If the hack had inserted them in a normal template set then this wouldn't have been an issue.

igowoofwoof
02-06-2002, 06:58 PM
will i lose my hacks and stuff if i run upgrade 15 or apply this hack to my forum?

Scott MacVicar
02-06-2002, 07:55 PM
no you don't lose any hacks (thats the whole point of this file) , it was just that some hacks that modify the templates directly were causing bother. You should backup your templates if you don't know if you have any of these hacks installed.

Jawelin
02-06-2002, 10:17 PM
Originally posted by psico
PPN thanks a lot!!!
I?ve migrated my Board with 20+ hacks in minutes!!!

Everything works perfectly...

cya I took two days but I'm slow... everyone knows... ;)

@ PPN: Thanks for your explanation about templates.
Actually, backin' up them to html files with FF hack (before and later), I found where unpredictably (to me...;) ) changed only some vbstats_ .... ones, exactly those I hadn't ever modified so they still had the '-1' ... :)
Clear enough the non-replaceing process. But if I hacked a template which should change in an upgrade ?
1) I should have later my modified unupdated version, as the updated one is the 'original' template.
2) I should have only the status as before, i.e. template upgrade got lost
Either ?

Thanks

Wolf42
02-10-2002, 09:47 PM
It was very helpful to know where the changes are. ;) But all my templates are in german. So I had to download a comleate style-set to get 2.2.2 run on my board. I hope the are no new templates! Or are there?

slideboxer
02-11-2002, 06:29 PM
Did it, no problems. Had to run the vbStats script again, though. Also, my vblinks categories drop down is missing now... hmm.

Scott MacVicar
02-11-2002, 08:40 PM
sounds like a template issue as there is nothing in the coding which would cause this.

Lionel
02-17-2002, 08:37 PM
in 2.21 editpost.php this is no where to be found
$DB_site->query("DELETE FROM searchindex WHERE postid=$postid");

Lionel
02-17-2002, 10:31 PM
cannot find post above and this one below in postings.php
After that I am good to go.

look for
$getfirstpost=$DB_site->query_first("SELECT postid FROM post WHERE threadid=$threadid ORDER BY dateline LIMIT 1");
$DB_site->query("DELETE FROM searchindex WHERE postid=$getfirstpost[postid]");
indexpost($getfirstpost[postid]);

$getfirstpost=$DB_site->query_first("SELECT postid FROM post WHERE threadid=$newthreadid ORDER BY dateline LIMIT 1");
$DB_site->query("DELETE FROM searchindex WHERE postid=$getfirstpost[postid]");

importmix
03-07-2002, 06:21 AM
do i have to save copies of my modified default templates? Like if I modified postbits, do I need to save a copy of that?

X-Fan
03-07-2002, 07:30 AM
PPN, any chance you could please do a new version of this hack for upgrading from 2.2.2 to 2.2.3b?

Please?

Remi
03-07-2002, 08:58 AM
Originally posted by X-Fan
PPN, any chance you could please do a new version of this hack for upgrading from 2.2.2 to 2.2.3b?

Please?

Thanks :D

psico
03-07-2002, 10:41 AM
Or at least what files have changed...from 2.2.2 to 2.2.3b

el3m3nt
03-07-2002, 01:07 PM
dito! i would also prefer to upgrade this way

wooolF[RM]
03-07-2002, 01:15 PM
]same here :) please :D

wooolF[RM]
03-07-2002, 01:19 PM
]btw...
found it at the member's area at vb.com

"If you have hacks installed and would like an overview of changed code, you should try out Beyond Compare. The website is: http://www.scootersoftware.com/ "

X-Fan
03-07-2002, 01:56 PM
Originally posted by wooolF[RM]
"If you have hacks installed and would like an overview of changed code, you should try out Beyond Compare. The website is: http://www.scootersoftware.com/ "

Why the need to download a software package to do it? I've got enough programs installed for my work as it is without having to install and learn another!

Surely someone can do what PPN did and just create a list of what code you need to add/insert/remove in however many files to bring your current board up from v2.2.2 to v2.2.3b? Please?

Scott MacVicar
03-07-2002, 02:50 PM
I'm already doing it, will release it tonight as soon as soon as I am back from work. Cause I'm doing it to my own boards then.

el3m3nt
03-07-2002, 03:36 PM
wow, really cool :)

im waiting.. :)

psico
03-07-2002, 03:41 PM
PPN
You are THE MAN!!
Thanks!

wooolF[RM]
03-11-2002, 12:01 PM
]bump? :D

Jawelin
03-11-2002, 12:09 PM
The release of new version is at the moment too dynamic (three versions 2.2.3, 2.2.3b and now 2.2.4 within few days) to create an useful and definitive upgrade scheme.
Please, std-by for a while.
:)

SirSteve
03-11-2002, 01:15 PM
Don't forget 2.2.3c ;)

fonzerelli_79
03-11-2002, 01:25 PM
im still on 2.20
(at the time they said that it would be the last upgrade til 3.0 - doh!!)

has anyone seen 2.20 to 2.21 upgrade kicking about the forums

Erwin
03-12-2002, 08:04 AM
A 2.2.2 to 2.2.4 upgrade hack (text file showing changes needed to specific files) would be beautiful.

Thank goodness I did not go to 2.2.3 - I would have had to start from scratch to go to 2.2.4.

:)

I am praying for this...

Overgrow
03-12-2002, 08:42 AM
Learning to use a program like Araxis Merge:

http://www.araxis.com/merge/

Is much easier and much faster than using one of these (admittedly handy) upgrade documents. Trust me.. He's using a program like Merge to create this document-- just get the program and do it yourself. It's even faster than the copy/paste routines you have to do with the upgrade document.

Jawelin
03-12-2002, 11:34 AM
Originally posted by Erwin
A 2.2.2 to 2.2.4 upgrade hack (text file showing changes needed to specific files) would be beautiful.
:)

I am praying for this...

Please, read above (Post #75, for example...) and be patient.
At least a couple of us already did it (upgrade procedure from 2.2.2 to 2.2.4) but we're waiting for an OK to publish it ASAP.
I heard of a couple of days, from now.

Besides, as Overgrow correctly said, is much easier to do it by yourselves. Simply, open
Araxis Merge (shareware and not too much expensive), to obtain a great and fast
three-way compare :
- 1st window: original 2.2.2 code
- 2nd window: original 2.2.4 code
- 3rd window: hacked/modified 2.2.2 target code
This way you'll have on the left side a comprehensive comparison of the original code, see yourself the old/new/mod rows, and with a simple click you can apply these mods to the right side onto target customized code.
Pretty easy and WYSIWYG... :bandit:

Bye

Erwin
03-12-2002, 05:28 PM
I downloaded Araxis Merge, and it looks good.

What about the template changes? Is there a way to upgrade the templates manually without losing the changes?

Thanks for the advice.

Jawelin
03-13-2002, 07:16 AM
Templates, as they're upgraded via upgradeXX.php which reads vbulletin.style, are much more complex to analyze 'off-line'.
Great help could give the TBS hack from FireFly, which stores templates as html files you can download before and after the upgrade.
This way, just like the php code, you can manage the differences and restore all the hacked upgrades you loose.
Anyway, all the custom templates aren't overwritten by the upgrade script. Let's say, all those templates you have modified by their interface (those who have the '[revert to original]' button) aren't overwritten.
Only those created new by hack installation scripts and never modified will be deleted.

The problem this way still remains is you'll lack each new template upgrading what you modified. They should be managed by the above TBS+compare procedure.

Bye

Jawelin
03-13-2002, 03:08 PM
Originally posted by Erwin
A 2.2.2 to 2.2.4 upgrade hack (text file showing changes needed to specific files) would be beautiful.
[...]
I am praying for this...

This has just been released... HERE (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36090) !
:D

Erwin
03-13-2002, 05:41 PM
Araxis Merge works great! It is actually faster than manually installing an upgrade hack, just so you guys know. But by all means use the upgrade hack that Jawelin is providing.