Add deadfoxjunction wipi configuration.
[matthijs/projects/wipi.git] / conf / farmconfig.py
index f8c657d29563bbaf6f0304c98655daf2f0710814..2eb76223dd71a33f4ff54fea84400aebc89d438f 100644 (file)
@@ -45,11 +45,15 @@ wikis = [
 
     # wikiname,     url regular expression (no protocol)
     # ---------------------------------------------------------------
+    ("extinction", r"extinction.evolution-events.nl/wipi"),
     ("exodus", r"exodus.evolution-events.nl/wipi"),
-
-    # for multiple wikis, do something like this:
-    #("moinmoin",    r"^moinmo.in/.*$"),
-    #("moinmaster",  r"^master.moinmo.in/.*$"),
+    ("deadfoxjunction", r"deadfoxjunction.evolution-events.nl/wipi"),
+    # Pretend we're also available at /. In reality, only the /Site pages are
+    # available there due to lighttpd rewriting. Due to proper setting of
+    # script-name by lighttpd and the url_mappings setting below all links
+    # still work too!
+    ("exodus", r"exodus.evolution-events.nl"),
+    ("deadfoxjunction", r"deadfoxjunction.evolution-events.nl"),
 ]
 
 
@@ -73,7 +77,7 @@ from MoinMoin.config.multiconfig import DefaultConfig
 # Local setting, defined by matthijs for easy moving of data. It didn't work
 # to define this in the FarmConfig class, so just put it here..
 import os
-data_dir_root = os.path.join(os.path.dirname(__file__), os.path.pardir, 'data')
+data_dir_root = os.path.join(os.environ['SITE_DIR'], 'data', 'wipi')
 
 class FarmConfig(DefaultConfig):
 
@@ -97,6 +101,11 @@ class FarmConfig(DefaultConfig):
     # backup it.
     data_underlay_dir = data_dir_root + '/underlay/'
 
+    # Override the default data_dir/plugin path for plugins, which doesn't
+    # make sense. We don't want to have per-wiki plugins anyway and stuffing
+    # code in the datadir is weird.
+    plugin_dir = os.path.join(os.path.dirname(__file__), os.path.pardir, 'plugin')
+
     # The URL prefix we use to access the static stuff (img, css, js).
     # NOT touching this is maybe the best way to handle this setting as moin
     # uses a good internal default (something like '/moin_static163' for moin
@@ -199,14 +208,22 @@ class FarmConfig(DefaultConfig):
     # Authentication
     from auth.mysql_login import mysql_login # This comes from plugin
     from dbsettings import phpbb_dbhost, phpbb_dbuser, phpbb_dbpass, phpbb_dbname
-    from MoinMoin.auth import moin_session
     phpbb = mysql_login(
+        name    = 'phpbb',
         verbose = True,
         dbhost  = phpbb_dbhost,
         dbuser  = phpbb_dbuser,
         dbpass  = phpbb_dbpass,
         dbname  = phpbb_dbname,
+        hint    = "Hier kunnen bestuursleden van Evolution Events inloggen om wijzigingen te maken."
     )
-    auth = [phpbb, moin_session]
+    auth = [phpbb]
 
     user_autocreate = True
+
+    # All urls that would be generated below /wipi/Site can be pointed to
+    # /Site instead, since lighttpd maps /Site to the wipis as well.
+    url_mappings = {'/wipi/Site' : '/Site'}
+
+    
+# vim: set ts=8 sts=4 sw=4 expandtab: