]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/MacOSX/themeinfo.php
New property in $Theme for customizing the button separator " | ".
[SourceForge/phpwiki.git] / themes / MacOSX / themeinfo.php
1 <?php
2
3 rcs_id('$Id: themeinfo.php,v 1.22 2002-01-18 06:11:39 carstenklapp Exp $');
4
5 /**
6  * A PhpWiki theme inspired by the Aqua appearance of Mac OS X.
7  * 
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
13  * shadows.
14  *
15  * Known Problems:
16  *
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.
20  *
21  * The button toolbars use tables for positioning. Yuck. (It will do
22  * for now).
23  *
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).
30  *
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
33  * title.
34  *
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.
42  *
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
45  * along anyway.
46  * 
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.
55  *
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?)
58  *
59  * */
60
61 // To activate this theme, specify this setting in index.php:
62 //$theme="MacOSX";
63 // To deactivate themes, comment out all the $theme=lines in index.php.
64 require_once('lib/Theme.php');
65
66
67 class Theme_MacOSX extends Theme {
68     function getCSS() {
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')));
75         return $css;
76     }
77
78     function getRecentChangesFormatter ($format) {
79         $this->requireFile('lib/RecentChanges.php');
80         if ($format == 'rss')
81             return false;       // use default
82         return '_MacOSX_RecentChanges_Formatter';
83     }
84
85     function getPageHistoryFormatter ($format) {
86         $this->requireFile('lib/RecentChanges.php');
87         if ($format == 'rss')
88             return false;       // use default
89         return '_MacOSX_PageHistory_Formatter';
90     }
91 }
92
93 $Theme = new Theme_MacOSX('MacOSX');
94
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');
100
101 /*
102  * Link icons.
103  */
104 $Theme->setLinkIcon('http');
105 $Theme->setLinkIcon('https');
106 $Theme->setLinkIcon('ftp');
107 $Theme->setLinkIcon('mailto');
108 $Theme->setLinkIcon('interwiki');
109 $Theme->setLinkIcon('*', 'url');
110
111 $Theme->setButtonSep(' ');
112
113 // Controls whether the '?' appears before or after UnknownWikiWords.
114 // The PhpWiki default is for the '?' to appear before.
115 define('WIKIMARK_AFTER', true);
116
117 /*
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")
128 );
129 */
130
131 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
132 // (c-file-style: "gnu")
133 // Local Variables:
134 // mode: php
135 // tab-width: 8
136 // c-basic-offset: 4
137 // c-hanging-comment-ender-p: nil
138 // indent-tabs-mode: nil
139 // End:   
140 ?>