]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/SpaceWiki/themeinfo.php
Reformat code
[SourceForge/phpwiki.git] / themes / SpaceWiki / 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  * This theme is by design completely css-based so unfortunately it
11  * doesn't render properly or even the same across different browsers.
12  * A preview screen snapshot is included for comparison testing.
13  *
14  * The reverse coloring of this theme was chosen to provide an extreme
15  * example of a heavily customized PhpWiki, through which any
16  * potential visual problems can be identified and to eliminate any
17  * remaining non-structural html elements from the html templates.
18  */
19
20 require_once 'lib/WikiTheme.php';
21
22 class WikiTheme_SpaceWiki extends WikiTheme
23 {
24
25     function getRecentChangesFormatter($format)
26     {
27         include_once($this->file('lib/RecentChanges.php'));
28         if (preg_match('/^rss|^sidebar/', $format))
29             return false; // use default
30         return '_SpaceWiki_RecentChanges_Formatter';
31     }
32
33     function getPageHistoryFormatter($format)
34     {
35         include_once($this->file('lib/RecentChanges.php'));
36         if (preg_match('/^rss|^sidebar/', $format))
37             return false; // use default
38         return '_SpaceWiki_PageHistory_Formatter';
39     }
40
41     function load()
42     {
43         // CSS file defines fonts, colors and background images for this
44         // style.  The companion '*-heavy.css' file isn't defined, it's just
45         // expected to be in the same directory that the base style is in.
46
47         $this->setDefaultCSS('SpaceWiki', 'SpaceWiki.css');
48         $this->addAlternateCSS(_("Printer"), 'phpwiki-printer.css', 'print, screen');
49         $this->addAlternateCSS(_("Modern"), 'phpwiki-modern.css');
50         $this->addAlternateCSS('PhpWiki', 'phpwiki.css');
51
52         /**
53          * The logo image appears on every page and links to the HomePage.
54          */
55         //$this->addImageAlias('logo', 'logo.png');
56         $this->addImageAlias('logo', 'Ufp-logo.jpg');
57         $this->addImageAlias('logo', WIKI_NAME . 'Logo.png');
58
59         /**
60          * The Signature image is shown after saving an edited page. If this
61          * is set to false then the "Thank you for editing..." screen will
62          * be omitted.
63          */
64         $this->addImageAlias('signature', 'lights.png');
65         $this->addImageAlias('signature', WIKI_NAME . "Signature.png");
66         // Uncomment this next line to disable the signature.
67         //$this->addImageAlias('signature', false);
68
69         $this->addImageAlias('hr', 'hr.png');
70
71         $this->setButtonSeparator(" ");
72
73         /**
74          * WikiWords can automatically be split by inserting spaces between
75          * the words. The default is to leave WordsSmashedTogetherLikeSo.
76          */
77         //$this->setAutosplitWikiWords(false);
78
79         /**
80          * The "stardate" format here is really just metricdate.24hourtime. A
81          * "real" date2startdate conversion function might be fun but not very
82          * useful on a wiki.
83          */
84         $this->setTimeFormat("%H%M%S");
85         $this->setDateFormat("%Y%m%d"); // must not contain time
86
87     }
88 }
89
90 $WikiTheme = new WikiTheme_SpaceWiki('SpaceWiki');
91
92 // Local Variables:
93 // mode: php
94 // tab-width: 8
95 // c-basic-offset: 4
96 // c-hanging-comment-ender-p: nil
97 // indent-tabs-mode: nil
98 // End: