forum.coppermine-gallery.net

No Support => General discussion (no support!) => Topic started by: soboyle on September 20, 2005, 07:18:47 pm

Title: upgrading after extensive mods
Post by: soboyle on September 20, 2005, 07:18:47 pm
I am looking to use Coppermine for a stock photo site I am building.
But before I invest a lot of time customizing coppermine (i'm not a programmer and will be flying by the seat of my pants), I was wondering how difficult upgrades are to the program after you have made extensive changes to coppermine? Will I have to remake those changes at each upgrade?
Title: Re: upgrading after extensive mods
Post by: artistsinhawaii on September 20, 2005, 09:05:40 pm
soboyle,

Quote
I was wondering how difficult upgrades are to the program after you have made extensive changes to coppermine?

IMHO, as with any program or script, it really depends on how extensive your modifications have been, and how what files you modified.  A good program like [url http://winmerge.sourceforge.net/]winmerge[/url] http://winmerge.sourceforge.net/ is indispensible when viewing changes between two files. With it, you can instantly view the differences between your existing file and any new updated file and readily update your file accordingly.

Variations between updates:  1.30 -> 1.31 ->1.32 ->1.33 ->1.34  are not as severe as variations between upgrades: 1.2x -> 1.3x  ->1.4x   

When modifying files, I believe it's always a good idea to add a comment where you modified on or near the modified section or line of code.  eg:   

new code here; // modified by me for xxx feature start
next code here; // modified by me for xxx feature end 

or

<!-- section modified by me for xxx feature start -->
new code 1;
new code 1;
<!-- section modified by me for xxx feature  end-->

In addition, you should keep create a text log (I suggest keeping it in the Docs folder) listing all of the files that contain personal modifications.  This way, you will always be able to expedite "updates" on the files you had previously modified and simply overwrite files that you did not modify.

"Upgrades," on the other hand, may require more extensive rework as an upgrade generally implies an extensive overhaul of the code.  For example, much of the scripting in the individual theme components of versions 1.3x are now in a shared file in versions 1.4x. Newer versions incorporate new features, some of which might even be the same features you added to a previous version, but scripted in a different manner.  It may well be that where you previously incorporated your modifications will no longer be in the same file, but in a different file or files.  This is where good notation as to where and what your modifications are come in handy.

For me, the advantages of an open source program like Coppermine is that, unlike most commercial programs, modifications and features are welcome.  There are many people here who are happy to help you with your changes, provided you search the boards thoroughly and don't repeat requests that have already been resolved.  Others with similar or same modifications will go through a shared experience with you and their questions and the answers posted will go a long way to resolving any issues you might have when upgrading.  This is enough for me to recommend Coppermine regardless of the difficulties that might ensue from future upgrades.

Dennis



Title: Re: upgrading after extensive mods
Post by: Joachim Müller on September 21, 2005, 06:39:38 am
it's usually safe to change your theme - whenever a new version is released, we provide upgrade details that explain what you have to do to make your custom theme work with the new version.
Title: Re: upgrading after extensive mods
Post by: soboyle on September 22, 2005, 09:45:49 pm
Thanks for the tips and helpful suggestions, will follow them from now on.
I was looking for the changes that are coming in the new 1.4 release, and was thinking of maybe holding off until that is out of beta.
I have heard that the search functionality is better in 1.4, is that true?
Title: Re: upgrading after extensive mods
Post by: artistsinhawaii on September 23, 2005, 03:44:14 am
Thanks for the tips and helpful suggestions, will follow them from now on.
I was looking for the changes that are coming in the new 1.4 release, and was thinking of maybe holding off until that is out of beta.
I have heard that the search functionality is better in 1.4, is that true?

As there is no telling when a stable version of 1.4x will actually be released, I'd suggest building your site with 1.34. Read the docs on 1.34 in the docs folder of the download package.   Familiarize yourself with this version.  Make sure you run a version check from the admin tools section of coppermine to get the latest fixes.  Once you have gotten a good feel for coppermine 1.3x, read the docs for 1.4x.

If you like, you can also build a duplicate site in a sub-directory of your domain just to test 1.4x and see how your modifications might differ between the two.  As mentioned by Gaugau, 1.4x has very good documentation on how to adapt your modified themes to work with 1.4. Understand, however, that 1.4x undergoes constant change and files are updated regularly.  This would mean having to update 1.4x routinely and checking files against your modifications.

For the time being, I'd stick to mods and hacks that are compatible to both versions. At least until you are more familiar with the various blocks of code in Coppermine and feel comfortable searching for code contents based on the familiarity you have achieved.  The more popular mods and hacks will more than likely be updated to work with 1.4 by other users. So, if you really need  special mods that aren't presently compatible with 1.4, wait till the appropriate updates have been made before making a switch.

Dennis







Title: Re: upgrading after extensive mods
Post by: Joachim Müller on September 23, 2005, 06:28:57 am
The search in cpg1.4.x is actually more powerfull, see for yourself: http://coppermine-gallery.net/demo/cpg14x/search.php