Koozali.org: home of the SME Server

[Solved] Dev question - Creating templates

Offline cool34000

  • *
  • 339
  • +0/-0
[Solved] Dev question - Creating templates
« on: June 09, 2007, 03:33:12 PM »
Hi,


I would like to be able to change the password with the help of templates and SME db in my future rpms.
So that when I change DbPassword value, the new password is updated where it has to.
So, I have to change 2 things (more or less):
- MySQL password (that's already working)
- Modify the db_config.php file (working not so fine)

Here's my problem: each time the template system is used, there is this message on top on the generated file:
Quote
#------------------------------------------------------------
#          !!DO NOT MODIFY THIS FILE!!
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at http://wiki.contribs.org/development/
#
# Copyright (C) 1999-2006 Mitel Networks Corporation
#------------------------------------------------------------
which is not good in my case because this text is displayed on the webpage as I'm working on a .php file!

So my stupid question of the day would be: is there a way to avoid this automatic message?


Thanks in advance.
Sylvain

Offline cool34000

  • *
  • 339
  • +0/-0
[Solved] Dev question - Creating templates
« Reply #1 on: June 09, 2007, 11:42:37 PM »
Found out myself: I just need to add 2 empty files named 'template-begin' and 'template-end'

So easy to use and so hard to find the info :lol:

Offline slords

  • *****
  • 235
  • +3/-0
[Solved] Dev question - Creating templates
« Reply #2 on: June 10, 2007, 05:05:55 AM »
Or you could link them to /etc/e-smith/templates-default/template-begin-php and /etc/e-smith/templates-default/template-end-php files.  See any of the horde config files for how that is done.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs,
and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." -- Rich Cook

Offline byte

  • *
  • 2,183
  • +2/-0
[Solved] Dev question - Creating templates
« Reply #3 on: June 10, 2007, 06:17:25 PM »
Quote from: "cool34000"
Found out myself: I just need to add 2 empty files named 'template-begin' and 'template-end'

So easy to use and so hard to find the info :lol:


Not so hard to find the info  :wink:

http://mirror.contribs.org/smeserver/contribs/gordonr/devguide/html/x628.htm
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline cool34000

  • *
  • 339
  • +0/-0
[Solved] Dev question - Creating templates
« Reply #4 on: June 10, 2007, 08:12:11 PM »
Hi byte,


I find my answer on looking at existing templates!
Thanks for pointing me back to the dev-guide...

Everyhing is not understandable for me in the dev-guide as I don't have all the required knowledge to read it.
So I skipped a few chapters talking about Perl which is pretty much used in SME. But this chapter wasn't skipped, I just missed the info!
You can blame me!!!


Thanks also for helping people by always giving the right link (i.e. bugzilla :wink: )
Forgot to tag the thread with [Solved], I'm doing this right now!