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