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