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