[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fmsystem-developers] (my) First post!
From: |
Sigurd Nes |
Subject: |
Re: [Fmsystem-developers] (my) First post! |
Date: |
Mon, 20 Jun 2011 18:04:58 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110516 Lightning/1.0b2 Thunderbird/3.1.10 |
On 01/-10/-28163 08:59 PM, Thomas Lundquist wrote:
Hello.
As the from headers already have told you, My name is Thomas Lundquist and
I'm a consultant/programmer/architect/project manager from Redpill Linpro.
I was just appointed to work on this system for a customer of ours which
is not Bergen Kommune this time.
And the first thing I started to look at was replacing the "Bergen Kommune"
logo and it occured to me that the template stuff may need some changing.
Quite a few places we have "base" as the template in use and inside that
code is hard coded stuff like "Velkommen til Bergen kommune og AktivBy".
This seems to be like that regardless what template chosen and that is
a bit of a challenge if we are going to let more people use this system.
So, I have a suggestion.
What if we just made the existing base directory (aka mv) bkbooking
and made a script that could set up this with symlinks?
Then we could have as many base templates we'd like and it would do
ln -sf<template_dir> base
Wherever that is needed. Some places do use the set template in the
preferences and we'll keep that.
This is a lot quicker than recoding all places using 'base' to get the
template/directory from the DB which is nothing I'd like to do right now
since I do not know the code well enough yet.
Any opinions? I may be totally wrong here and something else would
be alot easier to do and if that, please let me know.
I've also sent a request for being a developer in the Savannah project
and if I do get that I'll make a branch for this change so you can have a
look at it and merge it to trunk when it's ready.
regards
Thomas.
Hi
It seems like you refer to the 'bookingfrontend'
I absolutely agree - it would be great to get rid of hardcoded configurations.
The framework supports multiple template sets - 'base' is the fall-back when the
chosen one is not found.
(have a look at phpgwapi/inc/class.xslttemplates.inc.php - around line 154 )
Template is set by user (which can override default setting) in preferences.
The template used for 'bookingfrontend' is 'bkbooking' - which is found in
phpgwapi/templates
I think it would be best to use:
1) template-sets for separate design
2) configurable variables for elements as text-items, logo etc...
configurable variables can be stored as:
1) values in header.inc.php:
a) per domain for hosting services
b) global values across domains
2) as values stored by database (per domain)
to store values to database - have a look at the file
/bookingfrontend/templates/base/config.tpl
which can be accessed by (last part of url):
index.php?menuaction=admin.uiconfig.index&appname=bookingfrontend
to read the settings within the code:
$config = CreateObject('phpgwapi.config','bookingfrontend');
$>config->read();
print_r($config->config_data);
There is also an alternative generic config which is not subject to hardcoded
fields - useful for generic configuration on integration interfaces.
(used in the 'property'-module)
How do you think?
(Btw - you are approved as developer at the project)
Regards
Sigurd Nes