]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - wiki_config.php3
fixed sloppy coding: had omitted an "
[SourceForge/phpwiki.git] / wiki_config.php3
1 <!-- $Id: wiki_config.php3,v 1.15 2000-07-04 22:32:17 ahollosi Exp $ -->
2 <?
3    /*
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.
10    */
11
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/";
17
18
19    if (preg_match("#(.*?)([^/]*$)#", $REQUEST_URI, $matches)) {
20       $ServerAddress = "http://$SERVER_NAME:$SERVER_PORT" . $matches[1];
21    } else {
22       $ServerAddress = "http://$SERVER_NAME:$SERVER_PORT$REQUEST_URI";
23    }
24
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
28
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
32
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
36
37
38    // DBM settings (default)
39    include "wiki_dbmlib.php3";
40    $WikiDataBase = "/tmp/wikidb"; // must be server-writable!
41    $ArchiveDataBase = "/tmp/wikiarchive"; // see above!
42
43 /*
44    // MySQL settings (thanks Arno Hollosi! <ahollosi@iname.com>)
45    // Comment out the lines above (for the DBM) if you use these
46
47    include "wiki_mysql.php3";
48    $WikiDataBase = "wiki";
49    $ArchiveDataBase = "archive";
50    $mysql_server = 'localhost';
51    $mysql_user = 'root';
52    $mysql_pwd = '';
53    $mysql_db = 'wiki';
54 */
55
56 /*
57    // PostgreSQL settings. 
58    include "wiki_pgsql.php3";
59    $WikiDataBase = "wiki";
60    $ArchiveDataBase = "archive";
61    $pg_dbhost    = "localhost";
62    $pg_dbport    = "5432";
63 */
64
65
66 /*
67    // MiniSQL (mSQL) settings.
68    include "wiki_msql.php3";
69    $msql_db = "wiki";
70    // should be the same as wikipages.line
71    define("MSQL_MAX_LINE_LENGTH", 128);
72    $WikiDataBase = array();
73    $ArchiveDataBase = array();
74
75    $WikiDataBase['table']         = "wiki";
76    $WikiDataBase['page_table']    = "wikipages";
77    $ArchiveDataBase['table']      = "archive";
78    $ArchiveDataBase['page_table'] = "archivepages";
79    // end mSQL settings
80 */
81
82    $ScriptName = "index.php3";
83
84
85    // Template files (filenames are relative to script position)
86    $templates = array(
87         "BROWSE" =>    "templates/browse.html",
88         "EDITPAGE" =>  "templates/editpage.html",
89         "EDITLINKS" => "templates/editlinks.html",
90         "MESSAGE" =>   "templates/message.html"
91         );
92
93    $SignatureImg = "$ServerAddress/signature.png";
94    $logo = "wikibase.png";
95
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
100
101    // allowed protocols for links - be careful not to allow "javascript:"
102    $AllowedProtocols = "http|https|mailto|ftp|news|gopher";
103    
104    // you shouldn't have to edit anyting below this line
105
106    $ScriptUrl = $ServerAddress . $ScriptName;
107    $LogoImage = "<img src='${ServerAddress}$logo' border='0'>";
108    $LogoImage = "<a href='$ScriptUrl'>$LogoImage</a>";
109
110    $FieldSeparator = "\263";
111
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);
116
117
118    // number of user-defined external links, i.e. "[1]"
119    define("NUM_LINKS", 12);
120
121    // try this many times if the dbm is unavailable
122    define("MAX_DBM_ATTEMPTS", 20);
123
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);
128
129    // constants for flags in $pagehash
130    define("FLAG_PAGE_LOCKED", 1);
131 ?>