2 // Avoid direct call to this file.
3 // PHPWIKI_VERSION is defined in lib/prepend.php
4 if (!defined('PHPWIKI_VERSION')) {
10 * The new mediawiki (Wikipedia.org) default style.
11 * Mediawiki 'monobook' style sheet for CSS2-capable browsers.
12 * Copyright Gabriel Wicke - http://www.aulinx.de/
13 * See main.css for more.
15 * Problems with IE: signin is at the left.
18 require_once 'lib/WikiTheme.php';
19 require_once 'themes/wikilens/themeinfo.php';
21 class WikiTheme_MonoBook extends WikiTheme_Wikilens
23 /* this adds selected to the class */
24 function makeActionButton($action, $label = false, $page_or_rev = false, $options = false)
26 extract($this->_get_name_and_rev($page_or_rev));
28 if (is_array($action)) {
30 $action = isset($attr['action']) ? $attr['action'] : 'browse';
32 $attr['action'] = $action;
34 $class = is_safe_action($action) ? /*'named-wiki'*/
36 /* if selected action is current then prepend selected */
38 if ($request->getArg("action") == $action)
39 $class = "selected $class";
40 //$class = "selected";
41 if (!empty($options['class']))
42 $class = $options['class'];
44 $label = $this->_labelForAction($action);
47 $attr['version'] = $version;
49 if ($action == 'browse')
50 unset($attr['action']);
52 return $this->makeButton($label, WikiURL($pagename, $attr), $class, $options);
57 $this->addMoreHeaders(JavaScript("var ta;\nvar skin = '" . $this->_name . "';\n"));
58 $this->addMoreHeaders(JavaScript('', array('src' => $this->_findData("wikibits.js"))));
59 $this->addMoreAttr('body', "class-ns-0", HTML::raw('class="ns-0"'));
61 // CSS file defines fonts, colors and background images for this
62 // style. The companion '*-heavy.css' file isn't defined, it's just
63 // expected to be in the same directory that the base style is in.
65 // This should result in phpwiki-printer.css being used when
66 // printing or print-previewing with style "PhpWiki" or "MacOSX" selected.
67 $this->setDefaultCSS('PhpWiki',
68 array('' => 'monobook.css',
69 'print' => 'commonPrint.css'));
71 // This allows one to manually select "Printer" style (when browsing page)
72 // to see what the printer style looks like.
73 $this->addAlternateCSS(_("Printer"), 'commonPrint.css');
74 $this->addAlternateCSS(_("Top & bottom toolbars"), 'phpwiki-topbottombars.css');
75 $this->addAlternateCSS(_("Modern"), 'phpwiki-modern.css');
78 * The logo image appears on every page and links to the HomePage.
80 $this->addImageAlias('logo', 'MonoBook-Logo.png');
81 //$this->addImageAlias('logo', WIKI_NAME . 'Logo.png');
84 * The Signature image is shown after saving an edited page. If this
85 * is set to false then the "Thank you for editing..." screen will
89 $this->addImageAlias('signature', "Signature.png");
90 // Uncomment this next line to disable the signature.
91 $this->addImageAlias('signature', false);
96 $this->setLinkIcon('wikiuser');
99 * WikiWords can automatically be split by inserting spaces between
100 * the words. The default is to leave WordsSmashedTogetherLikeSo.
102 //$this->setAutosplitWikiWords(false);
105 * Layout improvement with dangling links for mostly closed wiki's:
106 * If false, only users with edit permissions will be presented the
107 * special wikiunknown class with "?" and Tooltip.
108 * If true (default), any user will see the ?, but will be presented
109 * the PrintLoginForm on a click.
111 $this->setAnonEditUnknownLinks(false);
114 * You may adjust the formats used for formatting dates and times
115 * below. (These examples give the default formats.)
116 * Formats are given as format strings to PHP strftime() function See
117 * http://www.php.net/manual/en/function.strftime.php for details.
118 * Do not include the server's zone (%Z), times are converted to the
121 $this->setDateFormat("%B %d, %Y");
122 $this->setTimeFormat("%H:%M");
125 * To suppress times in the "Last edited on" messages, give a
126 * give a second argument of false:
128 //$this->setDateFormat("%B %d, %Y", false);
132 $WikiTheme = new WikiTheme_MonoBook('MonoBook');