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