3 rcs_id('$Id: themeinfo.php,v 1.22 2002-01-18 06:11:39 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
17 * Most of the images you will see a white area around the outside.
18 * Once the icons for the buttons have been finalized, the alpha
19 * channel will be added to eliminate the white parts.
21 * The button toolbars use tables for positioning. Yuck. (It will do
24 * Only English buttons are available. Full localization is still a
25 * ways off. Work is in progress to modularize & tokenize the normal
26 * templates and (somehow) some cool toolbar functions are going to
27 * result from it. This should make editing the MacOSX theme template
28 * files much easier as well as providing a generic localization
29 * method for any other toolbars (whether image or text).
31 * There is an image for a BackLinks button but it's not used yet
32 * either. For now BackLinks are still accessed by clicking in the
35 * The CSS is still mostly the same as phpwiki.css. I'd like to change
36 * it a bit but have no specific plans yet. Just a general feeling
37 * that it should look and feel like a Mac interface: with subtle
38 * effects and a fine color scheme. Since I'm sick of the stripes
39 * Mr. Jobs thoughtfully plastered all over my screen, I've chosen a
40 * brushed paper (or stucco?) texture effect very close to white. If
41 * your monitor isn't calibrated well you might not even see it.
43 * I probably won't be submitting anything else for this theme for a
44 * bit. Not until the default toolbar stuff and templates are further
47 * Send me some feedback, do you like the icons used in the buttons?
48 * Got any ideas for code to pick out the localized buttons from the
49 * right directory? Automatic button generation for localized buttons
50 * isn't going to happen for this theme--there is a gradient across
51 * the glass surface of the button that only Mac OS X Aqua can
52 * generate. Chopping a button up and stamping it with localized words
53 * means a lot of tweaking to the blank button pieces to get the seams
54 * invisible. So it will be a nicer effect to produce them by hand.
56 * The current link icons I want to move into this theme, and come up
57 * with some new linkicons for the default look. (Comments, feedback?)
61 // To activate this theme, specify this setting in index.php:
63 // To deactivate themes, comment out all the $theme=lines in index.php.
64 require_once('lib/Theme.php');
67 class Theme_MacOSX extends Theme {
69 // FIXME: this is a hack which will not be needed once
70 // we have dynamic CSS.
71 $css = Theme::getCSS();
72 $css .= Element('style', array('type' => 'text/css'),
73 sprintf("<!--\nbody {background-image: url(%s);}\n-->\n",
74 $this->getImageURL('bggranular')));
78 function getRecentChangesFormatter ($format) {
79 $this->requireFile('lib/RecentChanges.php');
81 return false; // use default
82 return '_MacOSX_RecentChanges_Formatter';
85 function getPageHistoryFormatter ($format) {
86 $this->requireFile('lib/RecentChanges.php');
88 return false; // use default
89 return '_MacOSX_PageHistory_Formatter';
93 $Theme = new Theme_MacOSX('MacOSX');
95 // CSS file defines fonts, colors and background images for this
96 // style. The companion '*-heavy.css' file isn't defined, it's just
97 // expected to be in the same directory that the base style is in.
98 $Theme->setDefaultCSS("MacOSX", "MacOSX.css");
99 $Theme->addAlternateCSS(_("Printer"), 'phpwiki-printer.css', 'print, screen');
104 $Theme->setLinkIcon('http');
105 $Theme->setLinkIcon('https');
106 $Theme->setLinkIcon('ftp');
107 $Theme->setLinkIcon('mailto');
108 $Theme->setLinkIcon('interwiki');
109 $Theme->setLinkIcon('*', 'url');
111 $Theme->setButtonSep(' ');
113 // Controls whether the '?' appears before or after UnknownWikiWords.
114 // The PhpWiki default is for the '?' to appear before.
115 define('WIKIMARK_AFTER', true);
118 $ToolbarImages = array(
119 'RecentChanges' => array(
120 '1 day' => "themes/$theme/buttons/en/1+day.png",
121 '2 days' => "themes/$theme/buttons/en/2+days.png",
122 '3 days' => "themes/$theme/buttons/en/3+days.png",
123 '4 days' => "themes/$theme/buttons/en/4+days.png",
124 '7 days' => "themes/$theme/buttons/en/7+days.png",
125 '30 days' => "themes/$theme/buttons/en/30+days.png",
126 '90 days' => "themes/$theme/buttons/en/90+days.png",
127 '...' => "themes/$theme/buttons/en/alltime.png")
131 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
132 // (c-file-style: "gnu")
137 // c-hanging-comment-ender-p: nil
138 // indent-tabs-mode: nil