Add a hint to the login prompt of all wipis.
[matthijs/projects/wipi.git] / conf / farmconfig.py
1 # -*- coding: iso-8859-1 -*-
2 # IMPORTANT! This encoding (charset) setting MUST be correct! If you live in a
3 # western country and you don't know that you use utf-8, you probably want to
4 # use iso-8859-1 (or some other iso charset). If you use utf-8 (a Unicode
5 # encoding) you MUST use: coding: utf-8
6 # That setting must match the encoding your editor uses when you modify the
7 # settings below. If it does not, special non-ASCII chars will be wrong.
8
9 """
10     MoinMoin - Configuration for a wiki farm
11
12     If you run a single wiki only, you can keep the "wikis" list "as is"
13     (it has a single rule mapping all requests to mywiki.py).
14
15     Note that there are more config options than you'll find in
16     the version of this file that is installed by default; see
17     the module MoinMoin.config.multiconfig for a full list of names and their
18     default values.
19
20     Also, the URL http://moinmo.in/HelpOnConfiguration has
21     a list of config options.
22 """
23
24
25 # Wikis in your farm --------------------------------------------------
26
27 # If you run multiple wikis, you need this list of pairs (wikiname, url
28 # regular expression). moin processes that list and tries to match the
29 # regular expression against the URL of this request - until it matches.
30 # Then it loads the <wikiname>.py config for handling that request.
31
32 # Important:
33 #  * the left part is the wikiname enclosed in double quotes
34 #  * the left part must be a valid python module name, so better use only
35 #    lower letters "a-z" and "_". Do not use blanks or "-" there!!!
36 #  * the right part is the url re, use r"..." for it
37 #  * the right part does NOT include "http://" nor "https://" at the beginning
38 #  * in the right part ".*" means "everything". Just "*" does not work like
39 #    for filenames on the shell / commandline, you must use ".*" as it is a RE.
40 #  * in the right part, "^" means "beginning" and "$" means "end"
41
42 wikis = [
43     # Standalone server needs the port e.g. localhost:8000
44     # Twisted server can now use the port, too.
45
46     # wikiname,     url regular expression (no protocol)
47     # ---------------------------------------------------------------
48     ("exodus", r"exodus.evolution-events.nl/wipi"),
49     ("exodus", r"exodus-nieuw.evolution-events.nl/wipi"),
50     # Pretend we're also available at /. In reality, only the /Site pages are
51     # available there due to lighttpd rewriting. Due to proper setting of
52     # script-name by lighttpd and the url_mappings site in the exodus config,
53     # all links still work too!
54     ("exodus", r"exodus-nieuw.evolution-events.nl"),
55     ("extinction", r"extinction.evolution-events.nl/wipi"),
56 ]
57
58
59 # Common configuration for all wikis ----------------------------------
60
61 # Everything that should be configured the same way should go here,
62 # anything else that should be different should go to the single wiki's
63 # config.
64 # In that single wiki's config, we will use the class FarmConfig we define
65 # below as the base config settings and only override what's different.
66 #
67 # In exactly the same way, we first include MoinMoin's Config Defaults here -
68 # this is to get everything to sane defaults, so we need to change only what
69 # we like to have different:
70
71 from MoinMoin.config.multiconfig import DefaultConfig
72
73 # Now we subclass this DefaultConfig. This means that we inherit every setting
74 # from the DefaultConfig, except those we explicitely define different.
75
76 # Local setting, defined by matthijs for easy moving of data. It didn't work
77 # to define this in the FarmConfig class, so just put it here..
78 import os
79 data_dir_root = os.path.join(os.environ['SITE_DIR'], 'data', 'wipi')
80
81 class FarmConfig(DefaultConfig):
82
83     # Critical setup  ---------------------------------------------------
84
85     # Misconfiguration here will render your wiki unusable. Check that
86     # all directories are accessible by the web server or moin server.
87
88     # If you encounter problems, try to set data_dir and data_underlay_dir
89     # to absolute paths.
90
91     # Where your mutable wiki pages are. You want to make regular
92     # backups of this directory.
93     #data_dir = './data/'
94     # Will be set by individual configs
95
96     # Where read-only system and help page are. You might want to share
97     # this directory between several wikis. When you update MoinMoin,
98     # you can safely replace the underlay directory with a new one. This
99     # directory is part of MoinMoin distribution, you don't have to
100     # backup it.
101     data_underlay_dir = data_dir_root + '/underlay/'
102
103     # Override the default data_dir/plugin path for plugins, which doesn't
104     # make sense. We don't want to have per-wiki plugins anyway and stuffing
105     # code in the datadir is weird.
106     plugin_dir = os.path.join(os.path.dirname(__file__), os.path.pardir, 'plugin')
107
108     # The URL prefix we use to access the static stuff (img, css, js).
109     # NOT touching this is maybe the best way to handle this setting as moin
110     # uses a good internal default (something like '/moin_static163' for moin
111     # version 1.6.3).
112     # For Twisted and standalone server, the default will automatically work.
113     # For others, you should make a matching server config (e.g. an Apache
114     # Alias definition pointing to the directory with the static stuff).
115     url_prefix_static = '/wipi/static'
116
117
118     # Security ----------------------------------------------------------
119
120     # This is checked by some rather critical and potentially harmful actions,
121     # like despam or PackageInstaller action:
122     #superuser = [u"YourName", ]
123
124     # IMPORTANT: grant yourself admin rights! replace YourName with
125     # your user name. See HelpOnAccessControlLists for more help.
126     # All acl_rights_xxx options must use unicode [Unicode]
127     #acl_rights_before = u"YourName:read,write,delete,revert,admin"
128
129     # Link spam protection for public wikis (uncomment to enable).
130     # Needs a reliable internet connection.
131     #from MoinMoin.security.antispam import SecurityPolicy
132
133         
134     acl_hierarchic = True
135
136     # Give users all rights, but don't give any rights to anonymous users
137     acl_rights_default = u""
138     acl_rights_before = u"Known:read,write,delete,revert,admin"
139
140     # Mail --------------------------------------------------------------
141
142     # Configure to enable subscribing to pages (disabled by default) or
143     # sending forgotten passwords.
144
145     # SMTP server, e.g. "mail.provider.com" (empty or None to disable mail)
146     #mail_smarthost = ""
147
148     # The return address, e.g u"Jürgen Wiki <noreply@mywiki.org>" [Unicode]
149     #mail_from = u""
150
151     # "user pwd" if you need to use SMTP AUTH
152     #mail_login = ""
153
154
155     # User interface ----------------------------------------------------
156
157     # Add your wikis important pages at the end. It is not recommended to
158     # remove the default links.  Leave room for user links - don't use
159     # more than 6 short items.
160     # You MUST use Unicode strings here, but you need not use localized
161     # page names for system and help pages, those will be used automatically
162     # according to the user selected language. [Unicode]
163     navi_bar = [
164         # If you want to show your page_front_page here:
165         #u'%(page_front_page)s',
166         u'RecentChanges',
167         u'FindPage',
168         u'HelpContents',
169     ]
170
171     # The default theme anonymous or new users get
172     theme_default = 'modern'
173
174
175     # Language options --------------------------------------------------
176
177     # See http://moinmo.in/ConfigMarket for configuration in
178     # YOUR language that other people contributed.
179
180     # The main wiki language, set the direction of the wiki pages
181     language_default = 'en'
182
183     # You must use Unicode strings here [Unicode]
184     page_category_regex = u'^Category[A-Z]'
185     page_dict_regex = u'[a-z]Dict$'
186     page_group_regex = u'[a-z]Group$'
187     page_template_regex = u'[a-z]Template$'
188
189     # Content options ---------------------------------------------------
190
191     # Show users hostnames in RecentChanges
192     show_hosts = 1
193
194     # Show the interwiki name (and link it to page_front_page) in the Theme,
195     # nice for farm setups or when your logo does not show the wiki's name.
196     show_interwiki = 1
197     logo_string = u''
198
199     # Enable graphical charts, requires gdchart.
200     #chart_options = {'width': 600, 'height': 300}
201
202     # The GUI WYSISYG editor is not installed with Debian.
203     # See /usr/share/doc/$(cdbs_curpkg)/README.Debian for more info
204     editor_force = True
205     editor_default = 'text'  # internal default, just for completeness
206
207     # Authentication
208     from auth.mysql_login import mysql_login # This comes from plugin
209     from dbsettings import phpbb_dbhost, phpbb_dbuser, phpbb_dbpass, phpbb_dbname
210     phpbb = mysql_login(
211         name    = 'phpbb',
212         verbose = True,
213         dbhost  = phpbb_dbhost,
214         dbuser  = phpbb_dbuser,
215         dbpass  = phpbb_dbpass,
216         dbname  = phpbb_dbname,
217         hint    = "Hier kunnen bestuursleden van Evolution Events inloggen om wijzigingen te maken."
218     )
219     auth = [phpbb]
220
221     user_autocreate = True
222     
223 # vim: set ts=8 sts=4 sw=4 expandtab: