Koozali.org: home of the SME Server

Modification of orginal templates

Offline arne

  • *****
  • 1,116
  • +0/-4
Modification of orginal templates
« on: March 21, 2005, 08:08:03 AM »
During the years with the sme server one thing that I have been thinking about, but not done yet, as an experiment, that is to modify the orginal templates.

Well, I know, that's not the way "it should" be done, you should be moving over a copy to the custom folder .. etc

If you are modifying the orginal templates there should be one disadvantage, and that is no backup of the modifications will be in the backup file.

Except for that, wouldn't it work just modyfying the orginal templates ? There is functions that write over the configuration files, but there is no functions that will write over the templates. Right !!??

Why .. because modifying the orginal templates is done in a minute or two. Making it the "right way" will (at lest for me) allways require a written step by step instruction.

So if it is possible to also make "quick and dirty" modifications on the orginal templates, the most difficult side with the sme server will be not so dificult any more. Actually it will be allmost as easy to modify as any other Linux where you van edit the config files directely.

Anyone that have tried or who knows anything about that ?

One other special issue with the sme is that it is so difficult to find the datas for the ibays. You have to "travel trough" a lot og directories before you are there. This is quite easy to modify. Just a softlink from root /ibays that jumps you just into the ibays area.

Best reg Arne.
......

onsy

Modification of orginal templates
« Reply #1 on: March 21, 2005, 09:23:04 AM »
Hi,

About modifying original templates, I agree and desagree  :-D

I agree when you want to test quickly a small modification that you hope will not be too hard to do.

But I disagree for the long play and for the big play : first it will be hard to maintain : every time you update your SME, you'll have to apply your modifs again after update. So, to keep even a mittle modif, you'll have to go the "template-custom way"
Second, if your modif is a tricky one, it's hard to keep things clean : you'll have to keep a way back to the good template in case things go wrong with your code ; so you must have a copy in another directory (due to the way templates work, you cannot just keep a foo.sav in the same directory)
And guess what ? It's just why you have a template-custon directory : this way, the template directory keeps clean.

IMHO, if you want to make your modifications avalaible for the long time, at the end, you'll have to "template-customize" , so do it at first. It isn't difficult to do a mkdir -p  and a cp of the template you want to alter ?

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Modification of orginal templates
« Reply #2 on: March 21, 2005, 04:36:22 PM »
A sugestion: If you are not agree with the great template system, copy entire content of template directory to template-custom, and make mod under custom directory.
I not agree with your consideration because the implementation of template hold server clean, and secure. And I only backup the custom directory.

Offline arne

  • *****
  • 1,116
  • +0/-4
Modification of orginal templates
« Reply #3 on: March 21, 2005, 05:40:56 PM »
Yes, I do agree with the tempate system in general.

I just wondered if it were possible to make some variants over the use of it. If you want the backup clean, and if you want the modificationd not to follow the restore, I believe it might be an oportunity also to modify the orginal templates.

By the way, I have allways used to do it "the right way" or "the completely wrong way" by editing the config files directely, so I just wondered if it were also a "semi rigt way" editing the templates directely.

Thanks for your comments. I think editing the teplates directely will work and that it will give "permanent changes" that will not follow a backup/restore.

If direct template editing should not work, I will leave a message.
......

Offline Normando

  • *
  • 841
  • +2/-1
    • Unixlan
Modification of orginal templates
« Reply #4 on: March 21, 2005, 06:15:48 PM »
Remember when expand the templates, template-custom has priority over templates