]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/Hawaiian/themeinfo.php
themes are now easier derivable classes from other themes.
[SourceForge/phpwiki.git] / themes / Hawaiian / themeinfo.php
1 <?php
2
3 rcs_id('$Id: themeinfo.php,v 1.27 2007-07-01 09:36:10 rurban Exp $');
4
5 /**
6  * WikiWiki Hawaiian theme for PhpWiki.
7  */
8
9 require_once('lib/Theme.php');
10
11 class Theme_Hawaiian extends Theme {
12     function getCSS() {
13         // FIXME: this is a hack which will not be needed once
14         //        we have dynamic CSS.
15         $css = Theme::getCSS();
16         $css->pushcontent(HTML::style(array('type' => 'text/css'),
17                              new RawXml(sprintf("<!--\nbody {background-image: url(%s);}\n-->",
18                                                 $this->getImageURL('uhhbackground.jpg')))));
19         return $css;
20     }
21
22     function load() {
23         // CSS file defines fonts, colors and background images for this
24         // style.  The companion '*-heavy.css' file isn't defined, it's just
25         // expected to be in the same directory that the base style is in.
26
27         $this->setDefaultCSS('Hawaiian', 'Hawaiian.css');
28         $this->addAlternateCSS(_("Printer"), 'phpwiki-printer.css', 'print, screen');
29         $this->addAlternateCSS(_("Modern"), 'phpwiki-modern.css');
30         $this->addAlternateCSS('PhpWiki', 'phpwiki.css');
31
32         /**
33          * The logo image appears on every page and links to the HomePage.
34          */
35         $this->addImageAlias('logo', 'PalmBeach.jpg');
36         $this->addImageAlias('logo', WIKI_NAME . 'Logo.png');
37
38         /**
39          * The Signature image is shown after saving an edited page. If this
40          * is set to false then the "Thank you for editing..." screen will
41          * be omitted.
42          */
43         //$this->addImageAlias('signature', 'SubmersiblePiscesV.jpg');
44         $this->addImageAlias('signature', 'WaterFall.jpg');
45         $this->addImageAlias('signature', WIKI_NAME . "Signature.png");
46         // Uncomment this next line to disable the signature.
47         //$this->addImageAlias('signature', false);
48
49         // If you want to see more than just the waterfall let a random
50         // picture be chosen for the signature image:
51         //include_once($this->file('lib/random.php'));
52         include_once("themes/$this->_name/lib/random.php");
53         $imgSet = new randomImage($this->file("images/pictures"));
54         $imgFile = "pictures/" . $imgSet->filename;
55         $this->addImageAlias('signature', $imgFile);
56
57         //To test out the randomization just use logo instead of signature
58         //$this->addImageAlias('logo', $imgFile);
59
60         /*
61          * Link Icons
62          */
63         $this->setLinkIcon('interwiki');
64         $this->setLinkIcon('*', 'flower.png');
65
66         $this->setButtonSeparator(' ');
67
68         /**
69          * WikiWords can automatically be split by inserting spaces between
70          * the words. The default is to leave WordsSmashedTogetherLikeSo.
71          */
72         $this->setAutosplitWikiWords(true);
73
74         /*
75          * You may adjust the formats used for formatting dates and times
76          * below.  (These examples give the default formats.)
77          * Formats are given as format strings to PHP strftime() function See
78          * http://www.php.net/manual/en/function.strftime.php for details.
79          * Do not include the server's zone (%Z), times are converted to the
80          * user's time zone.
81          */
82         //$this->setDateFormat("%B %d, %Y");        // must not contain time
83
84     }
85 }
86
87 $WikiTheme = new Theme_Hawaiian('Hawaiian');
88
89 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
90 // (c-file-style: "gnu")
91 // Local Variables:
92 // mode: php
93 // tab-width: 8
94 // c-basic-offset: 4
95 // c-hanging-comment-ender-p: nil
96 // indent-tabs-mode: nil
97 // End:   
98 ?>