Handling of daylight changes a bit better
[swisdk.git] / Documentation / configuration.txt
blob5ad5f4653b4535ff96da878aee7a0598bc7d3d30
1 # Configuration\r
2 \r
3 This tries to be a complete list of all configuration variables:\r
4 \r
5 *Note!* Lists are always comma separated\r
6 \r
7 `core.admin_email` (string)\r
8 \r
9 : The site administrator's email address\r
10   This address is used for notifications in case of errors.\r
12 `core.name` (string)\r
14 : The name of this installation\r
16   This should be unique; it is prepended to notification emails for easy\r
17   sorting in your mail user agent.\r
19 `core.paranoia` (bool)\r
21 : Flag for extra-careful handling of authentication\r
23 `core.token` (string)\r
25 : Hashing token which should be unique for every installation\r
27 `db.dbfile` (string)\r
29 : path to sqlite database (only if you use sqlite driver)\r
31 `db.dbname` (string)\r
33 : name of MySQL database (only if you use mysql driver)\r
35   Replaces `db.database`, which is still used if driver is mysql and db.dbname is empty\r
37 `db.driver` (string)\r
39 : One of mysql, sqlite\r
41 `db.host` (string)\r
43 : host of the MySQL server (most often this is `localhost`\r
45 `db.password` (string)\r
47 : password for your MySQL user\r
49 `db.username` (string)\r
51 : username for the MySQL connection\r
53 `dispatcher.modules` (list of string)\r
55 : list of subclasses of ControllerDispatcherModule\r
57 `dispatcher.*`\r
59 : SiteHandler class which handles files with the given extension\r
60   \r
61   Example:\r
63   Handle `/controller/` with file `CONTENT_ROOT/controller_ctrl.php`:\r
65     `ctrl.php = PhpSiteHandler`\r
67   Handle `/static_page/` with file `CONTENT_ROOT/static_page_tpl.html`:\r
69     `tpl.html = SmartySiteHandler`\r
71 `error.debug_mode` (bool)\r
73 : are error messages displayed on screen?\r
75 `error.email_notification` (bool)\r
77 : email notification when errors happen?\r
79 `error.ignore_error_nrs` (list of int)\r
81 : PHP error ids to ignore (see <http://ch2.php.net/error_reporting>)\r
83 `error.logfile` (string)\r
85 : filename of your logfile\r
87 `error.logging` (bool)\r
89 : is logging activated?\r
91 `git.bindir` (string)\r
93 : location of your git binaries (`WikiComponent`)\r
95 `runtime.language` (string)\r
97 : default language key\r
99 `runtime.webroot.js` (string)\r
101 : Base path for javascript files. Defaults to /scripts, but will be changed\r
102   to /js soon\r
104 `runtime.webroot.css` (string)\r
106 : Base path for css files. Defaults to /styles, but will be changed to /css\r
107   soon\r
109 `runtime.webroot.feeds` (string)\r
111 : Prefix for XML/RSS feeds. Defaults to /feeds, but will be changed to /xml\r
112   soon\r
114 `runtime.webroot.img` (string)\r
116 : Base path for image files. Defaults to /images, but will be changed to /img\r
117   soon\r
119 `website.*`\r
121 : Configuration for websites. Please see the [[websites]] page.\r
123 `wiki.basedir` (string)\r
125 : location of wiki folder relative to your `content` folder\r
128 The following variables are only set while SWISDK is serving a request:\r
130 `runtime.arguments` (array of string)\r
132 : URL tokens (these were separated by slashes) which remain after taking\r
133 away the controller part\r
135 `runtime.controller.class` (string)\r
137 : Site class (from `Swisdk::register()`)\r
139 `runtime.controller.url` (string)\r
141 : The URL to the controller.\r
143   Example:\r
145   Suppose the user requests the page at `/wiki/xyz/page`. You have a file\r
146   `wiki_ctrl.php` inside your `content` folder which handles this request.\r
147   `runtime.controller.url` will be set to `/wiki`\r
149 `runtime.domain` (string)\r
151 : *Only if MultiDomainDispatcher is used*\r
152 The currently active domain\r
154 `runtime.includefile` (string)\r
156 : the file `DynamicSiteHandler` is going to include\r
158 `runtime.language` (string)\r
160 : Current language key\r
162 `runtime.language_id` (int)\r
164 : the language id\r
166 `runtime.navigation.prepend` (string)\r
168 : String to prepend to every URL while generating the navigation\r
170 `runtime.navigation.url` (string)\r
172 : the URL which `NavigationComponent` should use to build the navigation\r
173   from. This value overrides `runtime.request.uri` if it is set.\r
175 `runtime.page.title` (string)\r
177 : the title of the current page (taken from the sitemap)\r
179 `runtime.parser.domain` (array of string)\r
181 : *Only evaluated in MultiDomainDispatcher*\r
182 all currently registered domains\r
184 `runtime.parser.website` (array of string)\r
186 : All website keys\r
188 `runtime.request.host` (string)\r
190 : the host part of the request (f.e. `http://www.example.com`)\r
192 `runtime.request.protocol` (string)\r
194 : Protocol (http or https)\r
196 `runtime.request.uri` (string)\r
198 : the full URL without host for the current request\r
200   For the example above, this would be set to `/wiki/xyz/page`\r
202 `runtime.stage` (string)\r
204 : The current stage *See also Swisdk::load()*\r
206 `runtime.urlgenerator.$class` (string)\r
208 : Controller url for data object with class\r
210 `runtime.webroot.[img|js|css|feeds]` (string)\r
212 : Location of default images if it is not /[img|js|css|feeds]\r
214 `runtime.website` (string)\r
216 : the current website; see also `website`\r
218 `runtime.website.title` (string)\r
220 : the title of the current website (taken from the `website` section)\r
222 `runtime.website.url` (string)\r
224 : The URL of the current website\r
226 ## Website configuration values\r
228 ### ContentSite\r
230 See ContentSite documentation\r
232 ## Example configuration file\r
234     ; SWISDK2 config file\r
236     [core]\r
237     name = Example!\r
238     admin_email = admin@example.com\r
239     token = "INSERT UNIQUE VALUE HERE"\r
241     [dispatcher]\r
242     modules = DomainDispatcher, WebsiteDispatcher, ControllerDispatcher\r
243     ctrl.php = PhpSiteHandler\r
244     full.html = XHTMLSiteHandler\r
245     tpl.html = SmartySiteHandler\r
247     [error]\r
248     debug_mode = true\r
249     ignore_error_nrs = 2,8,2048 ; ignore E_WARNING, E_NOTICE and E_STRICT\r
250     email_notification = true ; also send emails\r
251     logging = true\r
252     logfile = filename.log\r
254     [db]\r
255     driver = mysql\r
256     host = localhost\r
257     username = db_user\r
258     password = db_pass\r
259     dbname = example_org\r
261     [runtime]\r
262     language = e\r
263     \r
264     [git]\r
265     bindir = /usr/local/bin\r
267     [wiki]\r
268     basedir = ../wiki\r
270     [website.default]\r
271     title = "Example.org - Examples and more"\r
272     template_dir = templates\r
273     template.base.full = base/main.tpl.html\r