Page 1 of 1

Upgrading to 3.1 question

Posted: Wed Mar 19, 2008 12:28 am
by rj
If I have made changes to index.tpl, entries.tpl, and a couple Lang files I assume they will be overwritten on an upgrade. My question is can I upload those old files of mine to the new installation or do I have to go make the changes in the code of the new files themselves?

thanx

RJ

Posted: Wed Mar 19, 2008 2:29 am
by Don Chambers
index.tpl and entries.tpl are template specific. If the template you are using is not in the serendipity release, then they will not be overwritten. If your template *IS* one of the core templates, then they will be overwritten, and "yes" you can upgrade, then upload your modified files..... the risk is that those files were upgraded, and if you upload, you lose the updates by overwriting with your older versions. Ideally, you will compare the 1.3 version of your file to your modified version.... if the only difference is your changes, then overwrite the files. If the difference is more than that, you might want/need to merge your modifications with the new version.

For language files - again, depends on what you are talking about. If these are language files in your serendipity /lang folder, then you are taking a chance if the lang files were modified to include new constants. This is also an issue of what version you were using when you modified your language files. IE, if your language files are version 1.0, then there is a good chance of change. If they are 1.3 beta 2, odds are there is no change. Make sense?

Posted: Wed Mar 19, 2008 7:09 am
by rj
Thanx

Lets forget the lang files, I can do those over again, but I have been tweaking entries.tpl and index.tpl for a year. I am upgrading from 1.1.
I used the template called carl_contest which I have changed completely over time. Which is where the two concerned files are.
Things I changes were head stuff and rearranging come code to make it present different and such.

So if I just do the update, those files will be overwritten and if I then copy the old ones in, I MAY lose upgrade stuff?

Or should I print those files out and add the changes by hand?

Thanx RJ

Posted: Wed Mar 19, 2008 12:59 pm
by judebert
Yes, you will lose any upgraded template code when the template is upgraded. The only "may" in question is whether the template was upgraded.

You can use developer.berlios.de's WebSVN to take a look at the templates and see what changes have occurred over time. Then you can add those changes to your template files before you copy them back in.

You should probably consider creating your own template directory and copying the modified files into it. Serendipity's fallback system uses the files in the default template directory if it can't find what it needs in the current template directory. That way your files don't get overwritten in an upgrade.