UBB.Dev
Posted By: Mark_S Upgrading With Hacks : Best Practices - 03/23/2007 3:58 PM
Don't Shoot me as i did try to post
this topic in the "How To/Site Help Library"
And I wasnt permitted too?

Question : Upgrading With Hacks : Best Practices

As i'm now getting into installing the hacks that
are being posted its coming up to a upgrade very soon.

I'm Running Threads 7.1 and i'm sure 7.1.1 is about to be released.
I have installed various hacks,

You TUBE : Hack
Top 30 day Posters
Posts in the last 24hrs
and another one i'm sure.

How do you guys go about a upgrade with the hacks installed?
Do you...

Overwrite all the files and then install the hacks again
one by one?

Ammend the new version files with the hacks and then upload.

I'm curious as you guys must have been doing it for a while
now and getting good at upgrading with hacks,

I have started to add //HACK to my files where the amendments
have been made.

What would you recommend,
as a best practice route?

Thanks.
p.s. Move me if you wish as I'm not sure where the best place
to post this is? Thanks.
Posted By: Ian_W Re: Upgrading With Hacks : Best Practices - 03/23/2007 8:53 PM
Beyond Compare smile

I copy my site to my HDD
I then compare the copy to the new files - and copy my hacks over to the new files.

Then upload the new files to my site smile

Posted By: Gizmo Re: Upgrading With Hacks : Best Practices - 03/23/2007 10:41 PM
I tend to upload the files then re-apply the hacks by hand; but in the past I've used Beyondcompare to do things...

Reason for not using BC anymore? well, a, I lost the license I was using, and b, i like ensuring things are there properly by doing it manually; but then again yous ee where all of the changes are in BC so it's not too easy to mess things up lol
Posted By: Mark_S Re: Upgrading With Hacks : Best Practices - 03/24/2007 10:43 AM
Thanks for the feedback, I'm sure others will benefit too.

I'm guessing this is the software?
Click Me

I think i'm going to take a little from both of your advice.

Thank you.

Will let you know which route i take when its upgrade time. smile
Posted By: Ian_W Re: Upgrading With Hacks : Best Practices - 03/24/2007 5:21 PM
indeed - you can download a trial - which is on a month trial I think.

use a regular expression rule of .*Script Version.*

This will then ignore the script version line that Rick adds to the top of every file that changes with each release.

Essentially once you run this rule on all files both within the latest release and on your site, you should be left with just the files that either you or Rick has altered on each upgrade. it is then just a case of importing your changes into the ricks files and upload. If you have marked your changes then it should be nice and quick.

When you scroll through each file that has differences remaining it is usually fairly easy to see which files you have altered.

In minor releases i.e. 7.1.1 then the changes made by Rick are probably going to be small and hopefully all current mods should work.

I think upgrading to 7.1 took me no more than 10 minutes or so once I had a fresh copy of my site on my PC.
Posted By: Stephen G Re: Upgrading With Hacks : Best Practices - 03/27/2007 3:14 PM
I'll do a fresh upgrade and re-add the mods, marking them THIS time because I've forgot wot I got !

laugh
Posted By: Mark_S Re: Upgrading With Hacks : Best Practices - 03/29/2007 10:00 AM
Originally Posted by Ian_W

use a regular expression rule of .*Script Version.*

This will then ignore the script version line that Rick adds to the top of every file that changes with each release.


Thanks for the extra TIP wink
Posted By: Mark_S Re: Upgrading With Hacks : Best Practices - 04/21/2007 4:54 PM
Humm i'm having a little trouble with the Regular Expression?
Or i dont think i have the results i expect.

// Ultimate Bulletin Board -->> // Ultimate Bulletin Board
// Script Version 7.1.1 -->> // Script Version 7.0.0rc1



And then the following in most of the older unused files. ?
//
// You may not distribute "hacks" for UBB without approval from
// Groupee, Inc.

As the newer file has that removed.

Ive used the Regualr Expression with *Script Version.*
in the drop box "Filters".

Just need a little help on what i do and how?
Whats the correct search option?

In the Session Manager i have this.

General
Left = Newer files
Right = From Server

By Name
Include Files = *Script Version*
Include Folders = *

By Date
Nothing Ticked

Other
Nothing Ticked

Criteria
Compare Contents - Binary Comaparison

More
Nothing Ticked

Help with the Sessions Manager options would be appreciated
Thanks smile
Posted By: Mark_S Re: Upgrading With Hacks : Best Practices - 04/21/2007 6:20 PM
I think i'm getting there now,
as i was confusing file Filters with the Regular Experssion Files
once i found the thing lol..
Posted By: The Team Re: Upgrading With Hacks : Best Practices - 04/22/2007 1:22 PM
That's some program, how sweet smile smile

Ian how did you get around the

//
under the
/ You may not distribute "hacks" for UBB without approval from
// Groupee, Inc.
//

As mine holds on there?
The regular expressions ive been trying don't work?
Something like, ending in a \s

Ive upgraded both live and test forums and they work great smile
And interesting to see the changes live smile

Question
How do you do it in 15 mins?
As i done it manually more or less.

Ive been right clicking on a folder and saying compare.

There was something else but ive forgotten it will come back
to me smile
Posted By: Mark_S Re: Upgrading With Hacks : Best Practices - 04/22/2007 4:00 PM
Dam that was me lol, forgot to log in.

The other thing now i rememeber is when you run the upgrade
script, it picks up the version numbers?

How do you get around that?
Posted By: AllenAyres Re: Upgrading With Hacks : Best Practices - 04/27/2007 12:31 AM
You have to either file compare your changes into the new forum files or upload the new files and then re-upload your changed files after you've run the upgrade.php script.

Best practices would be to file-compare your changes into the new scripts then upload them prior to running the upgrade.php script.
Posted By: blaaskaak Re: Upgrading With Hacks : Best Practices - 04/30/2007 11:36 AM
I have all my hacks documented in a file. It's in the forum of "Filename/hack".

I upgrade UBB only uploading new/changed files, and after that I check if any new files need to be rehacked or not.
Posted By: Ian_W Re: Upgrading With Hacks : Best Practices - 05/05/2007 10:43 AM
Mark - did you get this sorted (sorry have been away a lot of the last month, and now I am laid up as I can't walk frown frown )

PM me if you need further help with this - as my set-up works without any issues.
Posted By: blaaskaak Re: Upgrading With Hacks : Best Practices - 07/23/2007 11:00 AM
Originally Posted by blaaskaak
I have all my hacks documented in a file. It's in the forum of "Filename/hack".

I changed this practise for my upgrade to 7.2

This documenting thing is fun in theory, but if you are as messy as me, you kinda forget things.

Using BeyondCompare, I compared my current install with 7.1.1 out of the box, re-applying hacks that I wanted in the to be uploaded 7.2 code.

My upgrade never went as smooth as this time. I was done in less then an hour, including backups before and after.
Posted By: sirdude Re: Upgrading With Hacks : Best Practices - 07/23/2007 4:37 PM
same method, but with UltraCompare works for me. i use the 'Merge' feature a lot, so as to not have to even copy/paste or dice/splice.

also, i try to comment blocks of code where i have a mod with '// SD - Mod: xxxx' in php and {* SD - Mod: xxxx *} in the tpls.

then a simple grep piped to a txt file, where i use a macro to transform it to a csv for excel to be used as a checklist. (this is extra, but i'm a little anal so what the hell) wink
Posted By: Gizmo Re: Upgrading With Hacks : Best Practices - 07/24/2007 1:55 AM
I totally vouch for the commenting mod's approach; you never know when you'll be poking around and go "what the hell is this?"
Posted By: AllenAyres Re: Upgrading With Hacks : Best Practices - 07/24/2007 4:23 PM
We could standardize comment structure to whatever php.net/zend recommends
Posted By: sirdude Re: Upgrading With Hacks : Best Practices - 07/25/2007 12:22 AM
makes sense Allen
Posted By: Mark_S Re: Upgrading With Hacks : Best Practices - 08/20/2007 12:16 AM
Originally Posted by AllenAyres
We could standardize comment structure to whatever php.net/zend recommends
What would that be?

I just do

//HACK - name

//END OF HACK - name

But i can never find them lol....

I tried beyond comapare from 7.1x to 7.2 and it didnt work so well for me, i dont know why?

So returned to 7.2 default and added the hacks again
as i'm getting more confident now wink

Works a treat, will do bug fix updates with beyond compare
and try again when 7.3 hits the shelf smile
Posted By: AllenAyres Re: Upgrading With Hacks : Best Practices - 08/20/2007 5:46 PM
You really have to pay attention with Beyond Compare that you don't over-write lines with partial changes for mods. Typical example is when we add a column to a database table for a mod then add that column to our query by tagging it on the end. Beyond Compare will show it's different from the unchanged files, but unless you scroll all the way to the right to see what the change is you're going to over-write the change if you just copy over it. Upgrading is do-able with BC, it just takes a while...
Posted By: blaaskaak Re: Upgrading With Hacks : Best Practices - 08/29/2007 10:06 AM
New upgrade, new method smile

2 times beyondcompare open.

One with original 7.2 with my 7.2 to find all the hacks
One with my 7.2 and a fresh new 7.2.2 to apply the hacks back again.
Posted By: Gizmo Re: Upgrading With Hacks : Best Practices - 08/29/2007 2:03 PM
Been there several times; I find it a nice way to update with hacks quickly... Then again, I like installing everything manually sometimes... call it OC wink
© UBB.Developers