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