]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - wiki_config.php3
New function rcs_id(): we don't want any garbage emitted when generating zip files.
[SourceForge/phpwiki.git] / wiki_config.php3
1 <?
2 if (!function_exists('rcs_id')) 
3   function rcs_id($id) { echo "<!-- $id -->\n"; };
4
5 rcs_id('$Id: wiki_config.php3,v 1.16 2000-07-07 19:53:50 dairiki Exp $');
6
7    /*
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.
14    */
15
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/";
21
22
23    if (preg_match("#(.*?)([^/]*$)#", $REQUEST_URI, $matches)) {
24       $ServerAddress = "http://$SERVER_NAME:$SERVER_PORT" . $matches[1];
25    } else {
26       $ServerAddress = "http://$SERVER_NAME:$SERVER_PORT$REQUEST_URI";
27    }
28
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
32
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
36
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
40
41
42    // DBM settings (default)
43    include "wiki_dbmlib.php3";
44    $WikiDataBase = "/tmp/wikidb"; // must be server-writable!
45    $ArchiveDataBase = "/tmp/wikiarchive"; // see above!
46
47 /*
48    // MySQL settings (thanks Arno Hollosi! <ahollosi@iname.com>)
49    // Comment out the lines above (for the DBM) if you use these
50
51    include "wiki_mysql.php3";
52    $WikiDataBase = "wiki";
53    $ArchiveDataBase = "archive";
54    $mysql_server = 'localhost';
55    $mysql_user = 'root';
56    $mysql_pwd = '';
57    $mysql_db = 'wiki';
58 */
59
60 /*
61    // PostgreSQL settings. 
62    include "wiki_pgsql.php3";
63    $WikiDataBase = "wiki";
64    $ArchiveDataBase = "archive";
65    $pg_dbhost    = "localhost";
66    $pg_dbport    = "5432";
67 */
68
69
70 /*
71    // MiniSQL (mSQL) settings.
72    include "wiki_msql.php3";
73    $msql_db = "wiki";
74    // should be the same as wikipages.line
75    define("MSQL_MAX_LINE_LENGTH", 128);
76    $WikiDataBase = array();
77    $ArchiveDataBase = array();
78
79    $WikiDataBase['table']         = "wiki";
80    $WikiDataBase['page_table']    = "wikipages";
81    $ArchiveDataBase['table']      = "archive";
82    $ArchiveDataBase['page_table'] = "archivepages";
83    // end mSQL settings
84 */
85
86    $ScriptName = "index.php3";
87
88
89    // Template files (filenames are relative to script position)
90    $templates = array(
91         "BROWSE" =>    "templates/browse.html",
92         "EDITPAGE" =>  "templates/editpage.html",
93         "EDITLINKS" => "templates/editlinks.html",
94         "MESSAGE" =>   "templates/message.html"
95         );
96
97    $SignatureImg = "$ServerAddress/signature.png";
98    $logo = "wikibase.png";
99
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
104
105    // allowed protocols for links - be careful not to allow "javascript:"
106    $AllowedProtocols = "http|https|mailto|ftp|news|gopher";
107    
108    // you shouldn't have to edit anyting below this line
109
110    $ScriptUrl = $ServerAddress . $ScriptName;
111    $LogoImage = "<img src='${ServerAddress}$logo' border='0'>";
112    $LogoImage = "<a href='$ScriptUrl'>$LogoImage</a>";
113
114    $FieldSeparator = "\263";
115
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);
120
121
122    // number of user-defined external links, i.e. "[1]"
123    define("NUM_LINKS", 12);
124
125    // try this many times if the dbm is unavailable
126    define("MAX_DBM_ATTEMPTS", 20);
127
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);
132
133    // constants for flags in $pagehash
134    define("FLAG_PAGE_LOCKED", 1);
135 ?>