3 rcs_id('$Id: themeinfo.php,v 1.46 2002-03-08 20:31:14 carstenklapp Exp $');
6 * A PhpWiki theme inspired by the Aqua appearance of Mac OS X.
8 * The images used with this theme depend on the PNG alpha channel to
9 * blend in with whatever background color or texture is on the page.
10 * When viewed with an older browser, the images may be incorrectly
11 * rendered with a thick solid black border. When viewed with a modern
12 * browser, the images will display with nice edges and blended
15 * The defaut link icons I want to move into this theme, and come up
16 * with some new linkicons for the default look. (Any ideas,
19 * Do you like the icons used in the buttons?
21 * See buttons/README for more info on the buttons.
23 * The background image is a subtle brushed paper texture or stucco
24 * effect very close to white. If your monitor isn't calibrated well
28 require_once('lib/Theme.php');
30 class Theme_MacOSX extends Theme {
32 // FIXME: this is a hack which will not be needed once
33 // we have dynamic CSS.
34 $css = Theme::getCSS();
35 $css->pushcontent(HTML::style(array('type' => 'text/css'),
36 new RawXml(sprintf("<!--\nbody {background-image: url(%s);}\n-->\n",
37 $this->getImageURL('bgpaper8')))));
38 //for non-browse pages, like former editpage, message etc.
39 //$this->getImageURL('bggranular')));
43 function getRecentChangesFormatter ($format) {
44 include_once($this->file('lib/RecentChanges.php'));
45 if (preg_match('/^rss|^sidebar/', $format))
46 return false; // use default
47 return '_MacOSX_RecentChanges_Formatter';
50 function getPageHistoryFormatter ($format) {
51 include_once($this->file('lib/RecentChanges.php'));
52 if (preg_match('/^rss|^sidebar/', $format))
53 return false; // use default
54 return '_MacOSX_PageHistory_Formatter';
57 function linkUnknownWikiWord($wikiword, $linktext = '') {
58 $url = WikiURL($wikiword, array('action' => 'edit'));
59 //$link = HTML::span(HTML::a(array('href' => $url), '?'));
60 $link = HTML::span($this->makeButton('?', $url));
63 if (!empty($linktext)) {
64 $link->unshiftContent(HTML::u($linktext));
65 $link->setAttr('class', 'named-wikiunknown');
68 $link->unshiftContent(HTML::u($this->maybeSplitWikiWord($wikiword)));
69 $link->setAttr('class', 'wikiunknown');
76 $Theme = new Theme_MacOSX('MacOSX');
78 // CSS file defines fonts, colors and background images for this
79 // style. The companion '*-heavy.css' file isn't defined, it's just
80 // expected to be in the same directory that the base style is in.
81 $Theme->setDefaultCSS("MacOSX", "MacOSX.css");
82 $Theme->addAlternateCSS(_("Printer"), 'phpwiki-printer.css', 'print, screen');
83 $Theme->addAlternateCSS(_("Modern"), 'phpwiki-modern.css');
86 * The logo image appears on every page and links to the HomePage.
88 //$Theme->addImageAlias('logo', 'logo.png');
91 * The Signature image is shown after saving an edited page. If this
92 * is not set, any signature defined in index.php will be used. If it
93 * is not defined by index.php or in here then the "Thank you for
94 * editing..." screen will be omitted.
96 $Theme->addImageAlias('signature', 'signature.png');
101 $Theme->setLinkIcon('http');
102 $Theme->setLinkIcon('https');
103 $Theme->setLinkIcon('ftp');
104 $Theme->setLinkIcon('mailto');
105 $Theme->setLinkIcon('interwiki');
106 $Theme->setLinkIcon('*', 'url');
108 $Theme->setButtonSeparator(""); //use no separator instead of default
110 $Theme->addButtonAlias('?', 'uww');
111 $Theme->addButtonAlias(_("Lock Page"), "Lock Page");
112 $Theme->addButtonAlias(_("Unlock Page"), "Unlock Page");
113 $Theme->addButtonAlias(_("Page Locked"), "Page Locked");
114 $Theme->addButtonAlias("...", "alltime");
117 * WikiWords can automatically be split by inserting spaces between
118 * the words. The default is to leave WordsSmashedTogetherLikeSo.
120 //$Theme->setAutosplitWikiWords(false);
123 * You may adjust the formats used for formatting dates and times
124 * below. (These examples give the default formats.)
125 * Formats are given as format strings to PHP strftime() function See
126 * http://www.php.net/manual/en/function.strftime.php for details.
127 * Do not include the server's zone (%Z), times are converted to the
130 $Theme->setDateFormat("%A, %B %e, %Y"); // must not contain time
131 $Theme->setTimeFormat("%l:%M:%S %p");
133 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
134 // (c-file-style: "gnu")
139 // c-hanging-comment-ender-p: nil
140 // indent-tabs-mode: nil