3 rcs_id('$Id: themeinfo.php,v 1.35 2002-01-22 07:14:57 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
16 // Button Localization:
18 // English "C" English - all present, only some with alpha shadows
19 // Dutch "nl" Nederlands - some
20 // Spanish "es" Español - some
21 // French "fr" Français - none
22 // German "de" Deutsch - most
23 // Swedish "sv" Svenska - none
24 // Italian "it" Italiano - none
26 // More translations are needed in po files before the localized
27 // button images can be completed.
32 * Most of the images you will see a white area around the outside.
33 * Once the icons for the buttons have been finalized, the alpha
34 * channel will be added to eliminate the white parts.
36 * The button toolbars use tables for positioning. Yuck. (It will do
39 * The CSS is still mostly the same as phpwiki.css. I'd like to change
40 * it a bit but have no specific plans yet. Just a general feeling
41 * that it should look and feel like a Mac interface: with subtle
42 * effects and a fine color scheme. Since I'm sick of the stripes
43 * Mr. Jobs thoughtfully plastered all over my screen, I've chosen a
44 * brushed paper (or stucco?) texture effect very close to white. If
45 * your monitor isn't calibrated well you might not even see it.
47 * Send me some feedback, do you like the icons used in the buttons?
49 * Automatic button generation for localized buttons isn't going to
50 * happen for this theme--there is a gradient across the glass surface
51 * of the button that only Mac OS X Aqua can generate. Chopping a
52 * button up and stamping it with localized words means a lot of
53 * tweaking to the blank button pieces to get the seams invisible, so
54 * a more authentic Mac OS X user experience is achived by producing
55 * the buttons by hand.
57 * The defaut link icons I want to move into this theme, and come up
58 * with some new linkicons for the default look. (Any ideas,
63 require_once('lib/Theme.php');
65 class Theme_MacOSX extends Theme {
67 // FIXME: this is a hack which will not be needed once
68 // we have dynamic CSS.
69 $css = Theme::getCSS();
70 $css[] = HTML::style(array('type' => 'text/css'),
71 new RawXml(sprintf("<!--\nbody {background-image: url(%s);}\n-->\n",
72 $this->getImageURL('bgpaper8'))));
73 //for non-browse pages, like former editpage, message etc.
74 //$this->getImageURL('bggranular')));
78 function getRecentChangesFormatter ($format) {
79 include_once($this->file('lib/RecentChanges.php'));
80 if (preg_match('/^rss/', $format))
81 return false; // use default
82 return '_MacOSX_RecentChanges_Formatter';
85 function getPageHistoryFormatter ($format) {
86 include_once($this->file('lib/RecentChanges.php'));
87 if (preg_match('/^rss/', $format))
88 return false; // use default
89 return '_MacOSX_PageHistory_Formatter';
92 function linkUnknownWikiWord($wikiword, $linktext = '') {
93 $url = WikiURL($wikiword, array('action' => 'edit'));
94 //$link = HTML::span(HTML::a(array('href' => $url), '?'));
95 $link = HTML::span($this->makeButton('?', $url));
98 if (!empty($linktext)) {
99 $link->unshiftContent(HTML::u($linktext));
100 $link->setAttr('class', 'named-wikiunknown');
103 $link->unshiftContent(HTML::u($this->maybeSplitWikiWord($wikiword)));
104 $link->setAttr('class', 'wikiunknown');
111 $Theme = new Theme_MacOSX('MacOSX');
113 // CSS file defines fonts, colors and background images for this
114 // style. The companion '*-heavy.css' file isn't defined, it's just
115 // expected to be in the same directory that the base style is in.
116 $Theme->setDefaultCSS("MacOSX", "MacOSX.css");
117 $Theme->addAlternateCSS(_("Printer"), 'phpwiki-printer.css', 'print, screen');
118 $Theme->addAlternateCSS(_("Modern"), 'phpwiki-modern.css');
119 $Theme->addAlternateCSS('PhpWiki', 'phpwiki.css');
122 * The logo image appears on every page and links to the HomePage.
124 //$Theme->addImageAlias('logo', 'logo.png');
127 * The Signature image is shown after saving an edited page. If this
128 * is not set, any signature defined in index.php will be used. If it
129 * is not defined by index.php or in here then the "Thank you for
130 * editing..." screen will be omitted.
132 //$Theme->addImageAlias('signature', 'signature.png');
137 $Theme->setLinkIcon('http');
138 $Theme->setLinkIcon('https');
139 $Theme->setLinkIcon('ftp');
140 $Theme->setLinkIcon('mailto');
141 $Theme->setLinkIcon('interwiki');
142 $Theme->setLinkIcon('*', 'url');
144 $Theme->setButtonSeparator(' ');
146 $Theme->addButtonAlias('?', 'uww');
147 $Theme->addButtonAlias(_("Lock Page"), "Lock Page");
148 $Theme->addButtonAlias(_("Unlock Page"), "Unlock Page");
149 $Theme->addButtonAlias(_("Page Locked"), "Page Locked");
151 * WikiWords can automatically be split by inserting spaces between
152 * the words. The default is to leave WordsSmashedTogetherLikeSo.
154 //$Theme->setAutosplitWikiWords(false);
157 * You may adjust the formats used for formatting dates and times
158 * below. (These examples give the default formats.)
159 * Formats are given as format strings to PHP strftime() function See
160 * http://www.php.net/manual/en/function.strftime.php for details.
162 //$Theme->setDateTimeFormat("%B %e, %Y"); // may contain time of day
163 //$Theme->setDateFormat("%B %e, %Y"); // must not contain time
164 $Theme->setDateTimeFormat("%A, %B %e, %Y. %l:%M:%S %p %Z"); // may contain time of day
165 $Theme->setDateFormat("%A, %B %e, %Y"); // must not contain time
168 $ToolbarImages = array(
169 'RecentChanges' => array(
170 '1 day' => "themes/$theme/buttons/en/1+day.png",
171 '2 days' => "themes/$theme/buttons/en/2+days.png",
172 '3 days' => "themes/$theme/buttons/en/3+days.png",
173 '4 days' => "themes/$theme/buttons/en/4+days.png",
174 '7 days' => "themes/$theme/buttons/en/7+days.png",
175 '30 days' => "themes/$theme/buttons/en/30+days.png",
176 '90 days' => "themes/$theme/buttons/en/90+days.png",
177 '...' => "themes/$theme/buttons/en/alltime.png")
181 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
182 // (c-file-style: "gnu")
187 // c-hanging-comment-ender-p: nil
188 // indent-tabs-mode: nil