Re: 2.5.2 Feature Discussion [message #12427 is a reply to message #12414] |
Thu, 07 August 2003 15:57 |
Ilia
Messages: 13241 Registered: January 2002
Karma:
|
Senior Member Administrator Core Developer |
|
|
Let me explain how template upgrading works (and why), maybe it'll clarify the process for people and maybe even give someone an idea on how to design a better template upgrading scheme.
First of all, why do we need to modify templates?
If a template changes it is due to two reasons, new feature was added and in order for it to work new sections need to be added or old sections need to modified. The other reason is that there was a bug in the template and fixing it required some changes.
If these changes do not occur, the template may end up missing crucial sections resulting in theme compilation error or end up trying to not displaying new information or trying to display nonexistent variables.
How does the upgrade work?
First of all the upgrade script compares the md5 checksum of the new file to the old, if they are the same the file remains the same. No need to replace a file if it's identical. If the files do differ then the upgrade script checks the CVS id of the new file & the original. If they are the same it means that the user modified the template, BUT the template in the upgrade script is still the same as in the old version. In this case the user's template is left as is. ONLY when the cvs ids differ will the upgrade script replace the template.
I do try to make sure I don't touch forum.css.tmpl, header.tmpl & footer.tmpl which are the templates most people modify. Thus making sure that most people can upgrade their forums without having to reapply their template changes. However, if you've made more extensive modifications and the templates were modified I have no choice but to replace the affected templates.
FUDforum Core Developer
|
|
|