Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: cool34000 on June 09, 2007, 03:33:12 PM

Title: [Solved] Dev question - Creating templates
Post by: cool34000 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
Title: [Solved] Dev question - Creating templates
Post by: cool34000 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:
Title: [Solved] Dev question - Creating templates
Post by: slords 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.
Title: [Solved] Dev question - Creating templates
Post by: byte 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
Title: [Solved] Dev question - Creating templates
Post by: cool34000 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!