Configuration file proposal

0 views
Skip to first unread message

Piotr Gabryjeluk

unread,
Aug 23, 2008, 6:57:25 PM8/23/08
to temporary wikidot dev-list
Hello,

I've review Wikidot configuration file, extracted the most important
parts from it and came out with a proposal of a new configuration .ini
file for Wikidot.

In the simplest form it would look like this:

[main]
secret = enter some random phrase here
domain = your-domain.com
service = Wikidot custom installation

[db]
host = localhost
user = wd
password = wdpass
database = wd1

[mail]
host = gmail.com
ssl = true
user = your-mail-user
password = your-password

all the other values now stored in the configuration file can be
computed from the supplied data or there is not real need to change
them.

Examples:

1. value that cane be computed from the other values:

---------------------------------------------------------------
GlobalProperties value | some default value computed from the
| config file
---------------------------------------------------------------
DEFAULT_SMTP_HOSTNAME | [mail].host
DEFAULT_SMTP_FROM_EMAIL | if [mail].user contains "@":
| [mail].user;
| else:
| [mail].user @ [mail].host
DEFAULT_SMTP_FROM_NAME | [main].service + " mailer"
DEFAULT_SMTP_REPLY_TO | DEFAULT_SMTP_FROM_EMAIL
DEFAULT_SMTP_SENDER | DEFAULT_SMTP_FROM_EMAIL
---------------------------------------------------------------

2. values that are not worth changing:

names of all the cookies, who would benefit in changing them?

Of course if wikidot admin wants to override any default value, they
would be supplied with such an option -- every property from current
GlobalProperties file would be given a configuration variable to set if
needed. The file I propose is just the minimal that will allow to start
a wiki farm.

There is one more good thing in this situation: if Wikidot needs a new
configuration entry, we could just add a new configuration variable
(having its default value) and things would just work. There would be
no need to edit any files after an upgrade to let Wikidot "just work".

I look forward to opinions from you. Especially from whose had already
set up a Wikidot installation.

--
Piotr Gabryjeluk
Wikidot.com developer

Ed Johnson

unread,
Aug 24, 2008, 3:59:21 PM8/24/08
to temporary wikidot dev-list
Piotr,

I think your initial idea is a good approach. simple=easier.

In addition to being able to override other default values from the
current GlobalProperties file, I'd like to see other "defaults" added
like I mentioned in my other post. I'm sure others could help populate
the list. My initial ideas are from a rather selfish perspective, but
the more configuration options that can override defaults, the better.
This could include things like the text to display in various
circumstances, default button text, etc.

Thanks,
Ed
Reply all
Reply to author
Forward
0 new messages