From: Reini U. <ru...@us...> - 2004-06-14 11:27:31
|
Update of /cvsroot/phpwiki/phpwiki/themes/Sidebar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11869/Sidebar Modified Files: clock.php themeinfo.php Log Message: renamed global $Theme to $WikiTheme (gforge nameclash) Index: clock.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/themes/Sidebar/clock.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -2 -b -p -d -r1.1 -r1.2 --- clock.php 26 Mar 2004 03:13:23 -0000 1.1 +++ clock.php 14 Jun 2004 11:26:50 -0000 1.2 @@ -1,4 +1,4 @@ <?php - $ora = isset($GLOBALS['Theme']) ? DATA_PATH . '/' . $GLOBALS['Theme']->_findFile("ora.swf") : "ora.swf"; + $ora = isset($GLOBALS['WikiTheme']) ? DATA_PATH . '/' . $GLOBALS['WikiTheme']->_findFile("ora.swf") : "ora.swf"; ?> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="160" height="160" align="middle"> Index: themeinfo.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/themes/Sidebar/themeinfo.php,v retrieving revision 1.15 retrieving revision 1.16 diff -u -2 -b -p -d -r1.15 -r1.16 --- themeinfo.php 3 Jun 2004 16:56:21 -0000 1.15 +++ themeinfo.php 14 Jun 2004 11:26:51 -0000 1.16 @@ -13,14 +13,14 @@ class Theme_Sidebar extends Theme { // hack for navbar.tmpl to hide the buttonseparator if ($name == "navbar") { - //$old = $Theme->getButtonSeparator(); + //$old = $WikiTheme->getButtonSeparator(); $this->setButtonSeparator(HTML::Raw('<br /> · ')); //$this->setButtonSeparator("\n"); - //$Theme->setButtonSeparator($old); + //$WikiTheme->setButtonSeparator($old); } if ($name == "actionbar" || $name == "signin") { - //$old = $Theme->getButtonSeparator(); + //$old = $WikiTheme->getButtonSeparator(); //$this->setButtonSeparator(HTML::br()); $this->setButtonSeparator(" "); - //$Theme->setButtonSeparator($old); + //$WikiTheme->setButtonSeparator($old); } return $this->_path . $this->_findFile("templates/$name.tmpl"); @@ -40,26 +40,26 @@ class Theme_Sidebar extends Theme { } } -$Theme = new Theme_Sidebar('Sidebar'); +$WikiTheme = new Theme_Sidebar('Sidebar'); $dbi = $GLOBALS['request']->getDbh(); // display flat calender dhtml under the clock -if ($dbi->isWikiPage($Theme->calendarBase())) { +if ($dbi->isWikiPage($WikiTheme->calendarBase())) { $jslang = @$GLOBALS['LANG']; - $Theme->addMoreHeaders($Theme->_CSSlink(0, - $Theme->_findFile('jscalendar/calendar-phpwiki.css'),'all')); - $Theme->addMoreHeaders("\n"); - $Theme->addMoreHeaders(JavaScript('', - array('src' => $Theme->_findData('jscalendar/calendar_stripped.js')))); - $Theme->addMoreHeaders("\n"); - if (!($langfile = $Theme->_findData("jscalendar/lang/calendar-$jslang.js"))) - $langfile = $Theme->_findData("jscalendar/lang/calendar-en.js"); - $Theme->addMoreHeaders(JavaScript('',array('src' => $langfile))); - $Theme->addMoreHeaders("\n"); - $Theme->addMoreHeaders(JavaScript('', - array('src' => $Theme->_findData('jscalendar/calendar-setup_stripped.js')))); - $Theme->addMoreHeaders("\n"); + $WikiTheme->addMoreHeaders($WikiTheme->_CSSlink(0, + $WikiTheme->_findFile('jscalendar/calendar-phpwiki.css'),'all')); + $WikiTheme->addMoreHeaders("\n"); + $WikiTheme->addMoreHeaders(JavaScript('', + array('src' => $WikiTheme->_findData('jscalendar/calendar_stripped.js')))); + $WikiTheme->addMoreHeaders("\n"); + if (!($langfile = $WikiTheme->_findData("jscalendar/lang/calendar-$jslang.js"))) + $langfile = $WikiTheme->_findData("jscalendar/lang/calendar-en.js"); + $WikiTheme->addMoreHeaders(JavaScript('',array('src' => $langfile))); + $WikiTheme->addMoreHeaders("\n"); + $WikiTheme->addMoreHeaders(JavaScript('', + array('src' => $WikiTheme->_findData('jscalendar/calendar-setup_stripped.js')))); + $WikiTheme->addMoreHeaders("\n"); require_once("lib/TextSearchQuery.php"); // get existing date entries for the current user: - $iter = $dbi->titleSearch(new TextSearchQuery($Theme->calendarBase().SUBPAGE_SEPARATOR)); + $iter = $dbi->titleSearch(new TextSearchQuery($WikiTheme->calendarBase().SUBPAGE_SEPARATOR)); $existing = array(); while ($page = $iter->next()) { @@ -69,5 +69,5 @@ if ($dbi->isWikiPage($Theme->calendarBas $js_exist = '{"'.join('":1,"',$existing).'":1}'; //var SPECIAL_DAYS = {"2004-05-11":1,"2004-05-12":1,"2004-06-01":1} - $Theme->addMoreHeaders(JavaScript(' + $WikiTheme->addMoreHeaders(JavaScript(' // this table holds the existing calender entries for the current user // calculated from the database @@ -97,14 +97,14 @@ function dateStatusHandler(date, y, m, d // expected to be in the same directory that the base style is in. -$Theme->setDefaultCSS(_("Sidebar"), 'sidebar.css'); -//$Theme->addAlternateCSS('PhpWiki', 'phpwiki.css'); -//$Theme->setDefaultCSS('PhpWiki', 'phpwiki.css'); -$Theme->addAlternateCSS(_("Printer"), 'phpwiki-printer.css', 'print, screen'); -$Theme->addAlternateCSS(_("Modern"), 'phpwiki-modern.css'); +$WikiTheme->setDefaultCSS(_("Sidebar"), 'sidebar.css'); +//$WikiTheme->addAlternateCSS('PhpWiki', 'phpwiki.css'); +//$WikiTheme->setDefaultCSS('PhpWiki', 'phpwiki.css'); +$WikiTheme->addAlternateCSS(_("Printer"), 'phpwiki-printer.css', 'print, screen'); +$WikiTheme->addAlternateCSS(_("Modern"), 'phpwiki-modern.css'); /** * The logo image appears on every page and links to the HomePage. */ -//$Theme->addImageAlias('logo', 'logo.png'); +//$WikiTheme->addImageAlias('logo', 'logo.png'); /** @@ -116,17 +116,17 @@ $Theme->addAlternateCSS(_("Modern"), 'ph // Comment this next line out to enable signature. -$Theme->addImageAlias('signature', false); +$WikiTheme->addImageAlias('signature', false); /* * Link icons. */ -$Theme->setLinkIcon('http'); -$Theme->setLinkIcon('https'); -$Theme->setLinkIcon('ftp'); -$Theme->setLinkIcon('mailto'); -$Theme->setLinkIcon('interwiki'); -$Theme->setLinkIcon('*', 'url'); +$WikiTheme->setLinkIcon('http'); +$WikiTheme->setLinkIcon('https'); +$WikiTheme->setLinkIcon('ftp'); +$WikiTheme->setLinkIcon('mailto'); +$WikiTheme->setLinkIcon('interwiki'); +$WikiTheme->setLinkIcon('*', 'url'); -//$Theme->setButtonSeparator(' | '); +//$WikiTheme->setButtonSeparator(' | '); /** @@ -134,5 +134,5 @@ $Theme->setLinkIcon('*', 'url'); * the words. The default is to leave WordsSmashedTogetherLikeSo. */ -$Theme->setAutosplitWikiWords(true); +$WikiTheme->setAutosplitWikiWords(true); /** @@ -142,5 +142,5 @@ $Theme->setAutosplitWikiWords(true); * cannot easily fix missing pages. */ -$Theme->setAnonEditUnknownLinks(false); +$WikiTheme->setAnonEditUnknownLinks(false); /* @@ -152,5 +152,5 @@ $Theme->setAnonEditUnknownLinks(false); * user's time zone. */ -//$Theme->setDateFormat("%B %d, %Y"); +//$WikiTheme->setDateFormat("%B %d, %Y"); |