]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/shamino_com/themeinfo.php
Reformat code
[SourceForge/phpwiki.git] / themes / shamino_com / 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  * A minimalistic design by walter rafelsberger
11  * See http://www.shamino.com/wiki/
12  *
13  * Tiny actionbar: PageInfo, Edit and
14  *   all other Actionbars buttons in info.tmpl,
15  * Signin implictly after Edit.
16  * tiny navbar: without buttons, just links
17  * no logo
18  */
19
20 require_once 'lib/WikiTheme.php';
21
22 class WikiTheme_shamino_com extends WikiTheme
23 {
24
25     function makeActionButton($action, $label = false, $page_or_rev = false)
26     {
27         extract($this->_get_name_and_rev($page_or_rev));
28
29         if (is_array($action)) {
30             $attr = $action;
31             $action = isset($attr['action']) ? $attr['action'] : 'browse';
32         } else
33             $attr['action'] = $action;
34
35         $class = is_safe_action($action) ? 'named-wiki' : 'wikiadmin';
36         if (!$label)
37             $label = $this->_labelForAction($action);
38
39         if ($version)
40             $attr['version'] = $version;
41
42         if ($action == 'browse')
43             unset($attr['action']);
44
45         return $this->makeButton($label, WikiURL($pagename, $attr), $class);
46     }
47
48     function load()
49     {
50         // CSS file defines fonts, colors and background images for this
51         // style.  The companion '*-heavy.css' file isn't defined, it's just
52         // expected to be in the same directory that the base style is in.
53
54         // This should result in phpwiki-printer.css being used when
55         // printing or print-previewing with style "PhpWiki" or "MacOSX" selected.
56         $this->setDefaultCSS('PhpWiki', array('' => 'shamino_com.css', 'print' => 'phpwiki-printer.css'));
57
58         // This allows one to manually select "Printer" style (when browsing page)
59         // to see what the printer style looks like.
60         $this->addAlternateCSS(_("Printer"), 'phpwiki-printer.css', 'print, screen');
61         $this->addAlternateCSS(_("Top & bottom toolbars"), 'phpwiki-topbottombars.css');
62         $this->addAlternateCSS(_("Modern"), 'phpwiki-modern.css');
63
64         /**
65          * The logo image appears on every page and links to the HomePage.
66          */
67         //$this->addImageAlias('logo', WIKI_NAME . 'Logo.png');
68
69         /**
70          * The Signature image is shown after saving an edited page. If this
71          * is set to false then the "Thank you for editing..." screen will
72          * be omitted.
73          */
74
75         //$this->addImageAlias('signature', WIKI_NAME . "Signature.png");
76         // Uncomment this next line to disable the signature.
77         $this->addImageAlias('signature', false);
78
79         /**
80          * WikiWords can automatically be split by inserting spaces between
81          * the words. The default is to leave WordsSmashedTogetherLikeSo.
82          */
83         //$this->setAutosplitWikiWords(false);
84
85         /**
86          * Layout improvement with dangling links for mostly closed wiki's:
87          * If false, only users with edit permissions will be presented the
88          * special wikiunknown class with "?" and Tooltip.
89          * If true (default), any user will see the ?, but will be presented
90          * the PrintLoginForm on a click.
91          */
92         $this->setAnonEditUnknownLinks(false);
93
94         /*
95          * You may adjust the formats used for formatting dates and times
96          * below.  (These examples give the default formats.)
97          * Formats are given as format strings to PHP strftime() function See
98          * http://www.php.net/manual/en/function.strftime.php for details.
99          * Do not include the server's zone (%Z), times are converted to the
100          * user's time zone.
101          */
102         $this->setDateFormat("%B %d, %Y");
103         $this->setTimeFormat("%H:%M");
104
105         /*
106          * To suppress times in the "Last edited on" messages, give a
107          * give a second argument of false:
108          */
109         //$this->setDateFormat("%B %d, %Y", false);
110     }
111 }
112
113 $WikiTheme = new WikiTheme_shamino_com('shamino_com');
114
115 // Local Variables:
116 // mode: php
117 // tab-width: 8
118 // c-basic-offset: 4
119 // c-hanging-comment-ender-p: nil
120 // indent-tabs-mode: nil
121 // End: