From ed396dcb49f38ea4d9c9d71c7cae810926730311 Mon Sep 17 00:00:00 2001 From: carstenklapp Date: Wed, 26 Dec 2001 14:00:44 +0000 Subject: [PATCH] changed CSS_URL from constant into a variable for themes git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@888 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- index.php | 55 +++++++++++++++++++++--------------- lib/Template.php | 6 ++-- themes/default/themeinfo.php | 2 +- 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/index.php b/index.php index 95fd3bbbd..30e476d24 100644 --- a/index.php +++ b/index.php @@ -32,14 +32,14 @@ // You shouldn't have to change this unless you see a WikiFatalError: // lib/FileFinder.php:82: Fatal[256]: DB.php: file not found // -//ini_set('include_path', '.:/where/you/installed/phpwiki'); +#ini_set('include_path', '.:/where/you/installed/phpwiki'); ///////////////////////////////////////////////////////////////////// // Part Null: Don't touch this! define ('PHPWIKI_VERSION', '1.3.2-jeffs-hacks'); require "lib/prepend.php"; -rcs_id('$Id: index.php,v 1.42 2001-12-21 03:15:22 carstenklapp Exp $'); +rcs_id('$Id: index.php,v 1.43 2001-12-26 14:00:37 carstenklapp Exp $'); ///////////////////////////////////////////////////////////////////// // @@ -96,7 +96,7 @@ define('ALLOW_BOGO_LOGIN', true); // (whatever user your httpd runs as must have read/write permission // in this directory): -// ini_set('session.save_path', 'some_other_directory'); +#ini_set('session.save_path', 'some_other_directory'); ///////////////////////////////////////////////////////////////////// @@ -113,7 +113,7 @@ define('ALLOW_BOGO_LOGIN', true); // $DBParams = array( // Select the database type: - //'dbtype' => 'SQL', + #'dbtype' => 'SQL', 'dbtype' => 'dba', // For SQL based backends, specify the database as a DSN @@ -127,8 +127,8 @@ $DBParams = array( // // FIXME: My version Pear::DB seems to be broken enough that there is // no way to connect to a mysql server over a socket right now. - //'dsn' => 'mysql://guest@:/var/lib/mysql/mysql.sock/test', - //'dsn' => 'mysql://guest@localhost/test', + #'dsn' => 'mysql://guest@:/var/lib/mysql/mysql.sock/test', + #'dsn' => 'mysql://guest@localhost/test', 'dsn' => 'pgsql://localhost/test', // Used by all DB types: @@ -139,15 +139,15 @@ $DBParams = array( * because we aren't doing on the fly sql generation during the * installation. */ - //'prefix' => 'phpwiki_', + #'prefix' => 'phpwiki_', // Used by 'dba' 'directory' => "/tmp", 'dba_handler' => 'gdbm', // Either of 'gdbm' or 'db2' work great for me. - //'dba_handler' => 'db2', - //'dba_handler' => 'db3', // doesn't work at all for me.... + #'dba_handler' => 'db2', + #'dba_handler' => 'db3', // doesn't work at all for me.... 'timeout' => 20, - //'timeout' => 5 + #'timeout' => 5 ); ///////////////////////////////////////////////////////////////////// @@ -236,7 +236,7 @@ $ExpireParams['author'] = array('max_age' => 365, // as a valid locale before gettext() will work, i.e., use 'de_DE', // 'nl_NL'. $LANG='C'; -//$LANG='nl_NL'; +#$LANG='nl_NL'; // Setting the LANG environment variable (accomplished above) may or // may not be sufficient to cause PhpWiki to produce dates in your @@ -265,14 +265,14 @@ $LANG='C'; // Note that if you use the stock phpwiki style sheet, 'phpwiki.css', // you should make sure that it's companion 'phpwiki-heavy.css' // is installed in the same directory that the base style file is. -define("CSS_URL", "phpwiki.css"); +$CSS_URL = "phpwiki.css"; // logo image (path relative to index.php) $logo = "images/wikibase.png"; // Signature image which is shown after saving an edited page // If this is left blank (or unset), the signature will be omitted. -//$SignatureImg = "images/signature.png"; +#$SignatureImg = "images/signature.png"; // this turns on url indicator icons, inserted before embedded links // '*' icon is shown when the link type has no icon listed here, @@ -314,10 +314,18 @@ $templates = array("BROWSE" => "templates/browse.html", // The themeinfo file can be used to override default settings above this line // (i.e. templates, logo, signature etc.) -$theme=""; -if ( !$theme == "" ) { - if ( file_exists( "themes/$theme/themeinfo.php" ) ) { +// comment out the $theme= lines to revert to the standard interface +// which defaults to /templates and /images +#$theme="default"; +#$theme="MacOSX"; +#$theme="WikiTrek"; +if (!empty($theme)) { + if (file_exists("themes/$theme/themeinfo.php")) { include "themes/$theme/themeinfo.php"; + } else { + //FIXME: gettext doesn't work in index.php or themeinfo.php + trigger_error(sprintf(("Unable to open file '%s' for reading"), + "themes/$theme/themeinfo.php"), E_USER_NOTICE); } } @@ -358,7 +366,7 @@ $InlineImages = "png|jpg|gif"; // Uncomment this to automatically split WikiWords by inserting spaces. // The default is to leave WordsSmashedTogetherLikeSo in the body text. -//define("autosplit_wikiwords", 1); +#define("autosplit_wikiwords", 1); // Perl regexp for WikiNames ("bumpy words") // (?qreplace('BROWSE', WikiURL('')); - $this->qreplace('CSS_URL', DataURL(CSS_URL)); + $this->qreplace('CSS_URL', DataURL($CSS_URL)); $this->qreplace('WIKI_NAME', WIKI_NAME); if (isset($user)) diff --git a/themes/default/themeinfo.php b/themes/default/themeinfo.php index 4182e1ac2..58495a8af 100644 --- a/themes/default/themeinfo.php +++ b/themes/default/themeinfo.php @@ -17,7 +17,7 @@ // Note that if you use the stock phpwiki style sheet, 'phpwiki.css', // you should make sure that it's companion 'phpwiki-heavy.css' // is installed in the same directory that the base style file is. -define('CSS_URL', "themes/$theme/phpwiki.css"); +$CSS_URL = "themes/$theme/phpwiki.css"; // logo image $logo = "themes/$theme/wikibase.png"; -- 2.45.0