From: Reini U. <ru...@us...> - 2007-07-01 09:36:11
|
Update of /cvsroot/phpwiki/phpwiki/themes/shamino_com In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28390/themes/shamino_com Modified Files: themeinfo.php Log Message: themes are now easier derivable classes from other themes. removed global code setters, switched to $WikiTheme->load() in main Index: themeinfo.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/themes/shamino_com/themeinfo.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -2 -b -p -d -r1.1 -r1.2 --- themeinfo.php 19 Dec 2004 17:34:19 -0000 1.1 +++ themeinfo.php 1 Jul 2007 09:36:10 -0000 1.2 @@ -38,30 +38,28 @@ class Theme_shamino_com extends Theme { return $this->makeButton($label, WikiURL($pagename, $attr), $class); } -} - -$WikiTheme = new Theme_shamino_com('shamino_com'); -// CSS file defines fonts, colors and background images for this -// style. The companion '*-heavy.css' file isn't defined, it's just -// expected to be in the same directory that the base style is in. + function load() { + // CSS file defines fonts, colors and background images for this + // style. The companion '*-heavy.css' file isn't defined, it's just + // expected to be in the same directory that the base style is in. -// This should result in phpwiki-printer.css being used when -// printing or print-previewing with style "PhpWiki" or "MacOSX" selected. -$WikiTheme->setDefaultCSS('PhpWiki', + // This should result in phpwiki-printer.css being used when + // printing or print-previewing with style "PhpWiki" or "MacOSX" selected. + $this->setDefaultCSS('PhpWiki', array('' => 'shamino_com.css', 'print' => 'phpwiki-printer.css')); -// This allows one to manually select "Printer" style (when browsing page) -// to see what the printer style looks like. -$WikiTheme->addAlternateCSS(_("Printer"), 'phpwiki-printer.css', 'print, screen'); -$WikiTheme->addAlternateCSS(_("Top & bottom toolbars"), 'phpwiki-topbottombars.css'); -$WikiTheme->addAlternateCSS(_("Modern"), 'phpwiki-modern.css'); + // This allows one to manually select "Printer" style (when browsing page) + // to see what the printer style looks like. + $this->addAlternateCSS(_("Printer"), 'phpwiki-printer.css', 'print, screen'); + $this->addAlternateCSS(_("Top & bottom toolbars"), 'phpwiki-topbottombars.css'); + $this->addAlternateCSS(_("Modern"), 'phpwiki-modern.css'); -/** + /** * The logo image appears on every page and links to the HomePage. */ -//$WikiTheme->addImageAlias('logo', WIKI_NAME . 'Logo.png'); + //$this->addImageAlias('logo', WIKI_NAME . 'Logo.png'); -/** + /** * The Signature image is shown after saving an edited page. If this * is set to false then the "Thank you for editing..." screen will @@ -69,28 +67,28 @@ $WikiTheme->addAlternateCSS(_("Modern"), */ -//$WikiTheme->addImageAlias('signature', WIKI_NAME . "Signature.png"); -// Uncomment this next line to disable the signature. -$WikiTheme->addImageAlias('signature', false); + //$this->addImageAlias('signature', WIKI_NAME . "Signature.png"); + // Uncomment this next line to disable the signature. + $this->addImageAlias('signature', false); -/* + /* * Link icons. */ -//$WikiTheme->setLinkIcon('http'); -//$WikiTheme->setLinkIcon('https'); -//$WikiTheme->setLinkIcon('ftp'); -//$WikiTheme->setLinkIcon('mailto'); -//$WikiTheme->setLinkIcon('interwiki'); -//$WikiTheme->setLinkIcon('wikiuser'); -//$WikiTheme->setLinkIcon('*', 'url'); + //$this->setLinkIcon('http'); + //$this->setLinkIcon('https'); + //$this->setLinkIcon('ftp'); + //$this->setLinkIcon('mailto'); + //$this->setLinkIcon('interwiki'); + //$this->setLinkIcon('wikiuser'); + //$this->setLinkIcon('*', 'url'); -//$WikiTheme->setButtonSeparator("\n | "); + //$this->setButtonSeparator("\n | "); -/** + /** * WikiWords can automatically be split by inserting spaces between * the words. The default is to leave WordsSmashedTogetherLikeSo. */ -//$WikiTheme->setAutosplitWikiWords(false); + //$this->setAutosplitWikiWords(false); -/** + /** * Layout improvement with dangling links for mostly closed wiki's: * If false, only users with edit permissions will be presented the @@ -99,7 +97,7 @@ $WikiTheme->addImageAlias('signature', f * the PrintLoginForm on a click. */ -$WikiTheme->setAnonEditUnknownLinks(false); + $this->setAnonEditUnknownLinks(false); -/* + /* * You may adjust the formats used for formatting dates and times * below. (These examples give the default formats.) @@ -109,12 +107,17 @@ $WikiTheme->setAnonEditUnknownLinks(fals * user's time zone. */ -$WikiTheme->setDateFormat("%B %d, %Y"); -$WikiTheme->setTimeFormat("%H:%M"); + $this->setDateFormat("%B %d, %Y"); + $this->setTimeFormat("%H:%M"); -/* + /* * To suppress times in the "Last edited on" messages, give a * give a second argument of false: */ -//$WikiTheme->setDateFormat("%B %d, %Y", false); + //$this->setDateFormat("%B %d, %Y", false); + } +} + +$WikiTheme = new Theme_shamino_com('shamino_com'); + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |