1 <!-- $Id: wiki_config.php3,v 1.15 2000-07-04 22:32:17 ahollosi Exp $ -->
4 Constants and settings. Edit the values below for
5 your site. You need two image files, a banner and
6 a signature. The dbm file MUST be writable by the
7 web server or this won't work. If you configure your
8 server to allow index.php3 as an index file, you
9 can just give the URL without the script name.
12 // You should set the $ServerAddress below, and comment out
13 // the if/else that follows. The if/else sets the server address
14 // dynamically, and you can save some cycles on the server by
15 // setting $ServerAddress yourself.
16 //$ServerAddress = "http://127.0.0.1:8080/phpwiki/";
19 if (preg_match("#(.*?)([^/]*$)#", $REQUEST_URI, $matches)) {
20 $ServerAddress = "http://$SERVER_NAME:$SERVER_PORT" . $matches[1];
22 $ServerAddress = "http://$SERVER_NAME:$SERVER_PORT$REQUEST_URI";
25 // if you are using MySQL instead of a DBM to store your
26 // Wiki pages, use wiki_mysql.php3 instead of wiki_dbmlib.php3
27 // See INSTALL.mysql for details on using MySQL
29 // if you are using Postgressl instead of a DBM to store your
30 // Wiki pages, use wiki_pgsql.php3 instead of wiki_dbmlib.php3
31 // See INSTALL.pgsql for details on using Postgresql
33 // if you are using mSQL instead of a DBM to store your
34 // Wiki pages, use wiki_msql.php3 instead of wiki_dbmlib.php3
35 // See INSTALL.mysql for details on using mSQL
38 // DBM settings (default)
39 include "wiki_dbmlib.php3";
40 $WikiDataBase = "/tmp/wikidb"; // must be server-writable!
41 $ArchiveDataBase = "/tmp/wikiarchive"; // see above!
44 // MySQL settings (thanks Arno Hollosi! <ahollosi@iname.com>)
45 // Comment out the lines above (for the DBM) if you use these
47 include "wiki_mysql.php3";
48 $WikiDataBase = "wiki";
49 $ArchiveDataBase = "archive";
50 $mysql_server = 'localhost';
57 // PostgreSQL settings.
58 include "wiki_pgsql.php3";
59 $WikiDataBase = "wiki";
60 $ArchiveDataBase = "archive";
61 $pg_dbhost = "localhost";
67 // MiniSQL (mSQL) settings.
68 include "wiki_msql.php3";
70 // should be the same as wikipages.line
71 define("MSQL_MAX_LINE_LENGTH", 128);
72 $WikiDataBase = array();
73 $ArchiveDataBase = array();
75 $WikiDataBase['table'] = "wiki";
76 $WikiDataBase['page_table'] = "wikipages";
77 $ArchiveDataBase['table'] = "archive";
78 $ArchiveDataBase['page_table'] = "archivepages";
82 $ScriptName = "index.php3";
85 // Template files (filenames are relative to script position)
87 "BROWSE" => "templates/browse.html",
88 "EDITPAGE" => "templates/editpage.html",
89 "EDITLINKS" => "templates/editlinks.html",
90 "MESSAGE" => "templates/message.html"
93 $SignatureImg = "$ServerAddress/signature.png";
94 $logo = "wikibase.png";
96 // date & time formats used to display modification times, etc.
97 // formats are given as format strings to PHP date() function
98 $datetimeformat = "F j, Y"; // may contain time of day
99 $dateformat = "F j, Y"; // must not contain time
101 // allowed protocols for links - be careful not to allow "javascript:"
102 $AllowedProtocols = "http|https|mailto|ftp|news|gopher";
104 // you shouldn't have to edit anyting below this line
106 $ScriptUrl = $ServerAddress . $ScriptName;
107 $LogoImage = "<img src='${ServerAddress}$logo' border='0'>";
108 $LogoImage = "<a href='$ScriptUrl'>$LogoImage</a>";
110 $FieldSeparator = "\263";
112 // Apache won't show REMOTE_HOST unless the admin configured it
113 // properly. We'll be nice and see if it's there.
114 empty($REMOTE_HOST) ?
115 ($remoteuser = $REMOTE_ADDR) : ($remoteuser = $REMOTE_HOST);
118 // number of user-defined external links, i.e. "[1]"
119 define("NUM_LINKS", 12);
121 // try this many times if the dbm is unavailable
122 define("MAX_DBM_ATTEMPTS", 20);
124 // constants used for HTML output. List tags like UL and
125 // OL have a depth of one, PRE has a depth of 0.
126 define("ZERO_DEPTH", 0);
127 define("SINGLE_DEPTH", 1);
129 // constants for flags in $pagehash
130 define("FLAG_PAGE_LOCKED", 1);