]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - wiki_config.php3
initial commit: README describes template placehodlers
[SourceForge/phpwiki.git] / wiki_config.php3
1 <!-- $Id: wiki_config.php3,v 1.8 2000-06-18 15:12:13 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://wcsb.org:8080/~swain/php/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    // DBM settings (default)
27    include "wiki_dbmlib.php3";
28    $WikiDataBase = "/tmp/wikidb"; // must be server-writable!
29    $ArchiveDataBase = "/tmp/wikiarchive"; // see above!
30
31    // MySQL settings (thanks Arno Hollosi! <ahollosi@iname.com>)
32    // Comment out the lines above (for the DBM) if you use these
33 /*
34    include "wiki_mysql.php3";
35    $WikiDataBase = "wiki";
36    $ArchiveDataBase = "archive";
37    $mysql_server = 'localhost';
38    $mysql_user = 'root';
39    $mysql_pwd = '';
40    $mysql_db = 'wiki';
41 */
42
43 /*
44    // PostgreSQL settings. 
45    include "wiki_pgsql.php3";
46    $WikiDataBase = "wiki";
47    $pg_dbhost    = "localhost";
48    $pg_dbport    = "5432";
49 */
50
51    $ScriptName = "index.php3";
52
53
54    // Template files (filenames are relative to script position)
55    $templates = array(
56         "BROWSE" => "templates/browse.html",
57         "EDITPAGE" => "templates/editpage.html",
58         "EDITLINKS" => "templates/editlinks.html",
59         "MESSAGE" => "templates/message.html"
60         );
61
62    $SignatureImg = "$ServerAddress/signature.png";
63    $logo = "wikibase.png";
64
65
66    // you shouldn't have to edit anyting below this line
67
68    $ScriptUrl = $ServerAddress . $ScriptName;
69    $LogoImage = "<img src='${ServerAddress}$logo' border='0'>";
70    $LogoImage = "<a href='$ScriptUrl'>$LogoImage</a>";
71
72    $FieldSeparator = "\263";
73
74    // allowed protocols for links - be careful not to allow "javscript:"
75    $AllowedProtocols = "http|https|mailto|ftp|news|gopher";
76    
77    // Apache won't show REMOTE_HOST unless the admin configured it
78    // properly. We'll be nice and see if it's there.
79    empty($REMOTE_HOST) ?
80       ($remoteuser = $REMOTE_ADDR) : ($remoteuser = $REMOTE_HOST);
81
82
83    // number of user-defined external links, i.e. "[1]"
84    define("NUM_LINKS", 12);
85
86    // try this many times if the dbm is unavailable
87    define("MAX_DBM_ATTEMPTS", 20);
88
89    // constants used for HTML output. List tags like UL and 
90    // OL have a depth of one, PRE has a depth of 0.
91    define("ZERO_DEPTH", 0);
92    define("SINGLE_DEPTH", 1);
93
94 ?>