Date index for Jul 2002


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [achievo] Module - configuration



Hi,

Jonas Lincoln wrote:

If I want to include a config.inc.php-file specifig for a module that I'm writing;
a) where shoule I put it physically
b) how should I name the config-file
c) where and with what command should i include it
My module is named "vacation".

Good question. I don't have a provision yet for module specific configfiles. I put them in my general configfile, so I need only keep 1 configfile when upgrading to a new version.


But let's have a short discussion about it. What would be a good way to do it?

Maybe like this:

create a configs/ directory in the achievo directory, with for each module a configfile, with the name modulename.inc.php.

Advantage is that you have all configs in one place.
Disadvantages:
- when installing a module, you would have to put the configfile in place yourself, since we don't have a module installer yet.
- when upgrading the software, you should keep your configfile AND the configs/ directory.


What do you think?

By the way, if you name your configvar like this: $config_myconfigvar,
then you can retrieve its value with atkconfig("myconfigvar"); Doing this instead of using the global var directly, will later make it easier to switch the configuration method (configvars might come from a table in the future)


Greetings,
Ivo

--
Ivo Jansch <ivo dot 
ibuildings.nl BV - information technology
http://www.ibuildings.nl



http://www.achievo.org/lists achievo.org - ©1999-2002 ibuildings.nl BV