]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - wiki_config.php3
Minor updates to the text.
[SourceForge/phpwiki.git] / wiki_config.php3
1 <!-- $Id: wiki_config.php3,v 1.13 2000-06-26 03:54:10 wainstead 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 as below, and comment out
13    // the if/else below.
14    $ServerAddress = "http://127.0.0.1:8080/phpwiki/";
15
16 /*
17    if (preg_match("#(.*?)([^/]*$)#", $REQUEST_URI, $matches)) {
18       $ServerAddress = "http://$SERVER_NAME:$SERVER_PORT" . $matches[1];
19    } else {
20       $ServerAddress = "http://$SERVER_NAME:$SERVER_PORT$REQUEST_URI";
21    }
22 */
23    // if you are using MySQL instead of a DBM to store your
24    // Wiki pages, use wiki_mysql.php3 instead of wiki_dbmlib.php3
25    // See INSTALL.mysql for details on using MySQL
26
27    // if you are using Postgressl instead of a DBM to store your
28    // Wiki pages, use wiki_pgsql.php3 instead of wiki_dbmlib.php3
29    // See INSTALL.pgsql for details on using Postgresql
30
31    // if you are using mSQL instead of a DBM to store your
32    // Wiki pages, use wiki_msql.php3 instead of wiki_dbmlib.php3
33    // See INSTALL.mysql for details on using mSQL
34
35
36    // DBM settings (default)
37    include "wiki_dbmlib.php3";
38    $WikiDataBase = "/tmp/wikidb"; // must be server-writable!
39    $ArchiveDataBase = "/tmp/wikiarchive"; // see above!
40
41 /*
42    // MySQL settings (thanks Arno Hollosi! <ahollosi@iname.com>)
43    // Comment out the lines above (for the DBM) if you use these
44
45    include "wiki_mysql.php3";
46    $WikiDataBase = "wiki";
47    $ArchiveDataBase = "archive";
48    $mysql_server = 'localhost';
49    $mysql_user = 'root';
50    $mysql_pwd = '';
51    $mysql_db = 'wiki';
52 */
53
54 /*
55    // PostgreSQL settings. 
56    include "wiki_pgsql.php3";
57    $WikiDataBase = "wiki";
58    $ArchiveDataBase = "archive";
59    $pg_dbhost    = "localhost";
60    $pg_dbport    = "5432";
61 */
62
63
64 /*
65    // MiniSQL (mSQL) settings.
66    include "wiki_msql.php3";
67    $msql_db = "wiki";
68    // should be the same as wikipages.line
69    define("MSQL_MAX_LINE_LENGTH", 512);
70    $WikiDataBase = array();
71    $ArchiveDataBase = array();
72
73    $WikiDataBase['table']         = "wiki";
74    $WikiDataBase['page_table']    = "wikipages";
75    $ArchiveDataBase['table']      = "archive";
76    $ArchiveDataBase['page_table'] = "archivepages";
77 */
78
79    $ScriptName = "index.php3";
80
81
82    // Template files (filenames are relative to script position)
83    $templates = array(
84         "BROWSE" =>    "templates/browse.html",
85         "EDITPAGE" =>  "templates/editpage.html",
86         "EDITLINKS" => "templates/editlinks.html",
87         "MESSAGE" =>   "templates/message.html"
88         );
89
90    $SignatureImg = "$ServerAddress/signature.png";
91    $logo = "wikibase.png";
92
93    // date & time formats used to display modification times, etc.
94    // formats are given as format strings to PHP date() function
95    $datetimeformat = "F j, Y";  // may contain time of day
96    $dateformat = "F j, Y";      // must not contain time
97
98    // allowed protocols for links - be careful not to allow "javascript:"
99    $AllowedProtocols = "http|https|mailto|ftp|news|gopher";
100    
101    // you shouldn't have to edit anyting below this line
102
103    $ScriptUrl = $ServerAddress . $ScriptName;
104    $LogoImage = "<img src='${ServerAddress}$logo' border='0'>";
105    $LogoImage = "<a href='$ScriptUrl'>$LogoImage</a>";
106
107    $FieldSeparator = "\263";
108
109    // Apache won't show REMOTE_HOST unless the admin configured it
110    // properly. We'll be nice and see if it's there.
111    empty($REMOTE_HOST) ?
112       ($remoteuser = $REMOTE_ADDR) : ($remoteuser = $REMOTE_HOST);
113
114
115    // number of user-defined external links, i.e. "[1]"
116    define("NUM_LINKS", 12);
117
118    // try this many times if the dbm is unavailable
119    define("MAX_DBM_ATTEMPTS", 20);
120
121    // constants used for HTML output. List tags like UL and 
122    // OL have a depth of one, PRE has a depth of 0.
123    define("ZERO_DEPTH", 0);
124    define("SINGLE_DEPTH", 1);
125
126 ?>