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