]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/smaller/themeinfo.php
include [all] Include and file path should be devided with single space. File path...
[SourceForge/phpwiki.git] / themes / smaller / 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  * tiny actionbar, only Edit (if signed in) and Info => PageInfo,
12  *   all other Actionbars buttons in info.tmpl
13  * old-style Sign In button
14  * navbar also shorter labels and without buttons, just links
15  */
16
17 require_once 'lib/WikiTheme.php';
18
19 class WikiTheme_smaller extends WikiTheme {
20
21     function makeActionButton ($action, $label = false, $page_or_rev = false) {
22         extract($this->_get_name_and_rev($page_or_rev));
23
24         if (is_array($action)) {
25             $attr = $action;
26             $action = isset($attr['action']) ? $attr['action'] : 'browse';
27         }
28         else
29             $attr['action'] = $action;
30
31         $class = is_safe_action($action) ? 'named-wiki' : 'wikiadmin';
32         if (!$label)
33             $label = $this->_labelForAction($action);
34
35         if ($version)
36             $attr['version'] = $version;
37
38         if ($action == 'browse')
39             unset($attr['action']);
40
41         return $this->makeButton($label, WikiURL($pagename, $attr), $class);
42     }
43 }
44
45 $WikiTheme = new WikiTheme_smaller('smaller');
46
47 // Local Variables:
48 // mode: php
49 // tab-width: 8
50 // c-basic-offset: 4
51 // c-hanging-comment-ender-p: nil
52 // indent-tabs-mode: nil
53 // End:
54 ?>