2 rcs_id('$Id: themeinfo.php,v 1.6 2002-02-08 22:03:03 dairiki Exp $');
5 * This file defines an appearance ("theme") of PhpWiki similar to the Portland Pattern Repository.
8 require_once('lib/Theme.php');
10 class Theme_Portland extends Theme {
11 function linkUnknownWikiWord($wikiword, $linktext = '') {
12 $url = WikiURL($wikiword, array('action' => 'edit'));
13 $link = HTML::span(HTML::a(array('href' => $url), '?'));
15 if (!empty($linktext)) {
16 $link->unshiftContent(HTML::u($linktext));
17 $link->setAttr('class', 'named-wikiunknown');
20 $link->unshiftContent(HTML::u($this->maybeSplitWikiWord($wikiword)));
21 $link->setAttr('class', 'wikiunknown');
26 function getRecentChangesFormatter ($format) {
27 include_once($this->file('lib/RecentChanges.php'));
28 if (preg_match('/^rss/', $format))
29 return false; // use default
30 return '_Portland_RecentChanges_Formatter';
33 function getPageHistoryFormatter ($format) {
34 include_once($this->file('lib/RecentChanges.php'));
35 if (preg_match('/^rss/', $format))
36 return false; // use default
37 return '_Portland_PageHistory_Formatter';
41 $Theme = new Theme_Portland('Portland');
43 // CSS file defines fonts, colors and background images for this
44 // style. The companion '*-heavy.css' file isn't defined, it's just
45 // expected to be in the same directory that the base style is in.
47 $Theme->setDefaultCSS('Portland', 'portland.css');
48 $Theme->addAlternateCSS(_("Printer"), 'phpwiki-printer.css', 'print, screen');
49 $Theme->addAlternateCSS(_("Modern"), 'phpwiki-modern.css');
50 $Theme->addAlternateCSS('PhpWiki', 'phpwiki.css');
53 * The logo image appears on every page and links to the HomePage.
55 //$Theme->addImageAlias('logo', 'logo.png');
58 * The Signature image is shown after saving an edited page. If this
59 * is not set, any signature defined in index.php will be used. If it
60 * is not defined by index.php or in here then the "Thank you for
61 * editing..." screen will be omitted.
63 $Theme->addImageAlias('signature', 'signature.png');
68 //$Theme->setLinkIcon('http');
69 //$Theme->setLinkIcon('https');
70 //$Theme->setLinkIcon('ftp');
71 //$Theme->setLinkIcon('mailto');
72 //$Theme->setLinkIcon('interwiki');
73 //$Theme->setLinkIcon('*', 'url');
75 $Theme->setButtonSeparator(' ');
78 * WikiWords can automatically be split by inserting spaces between
79 * the words. The default is to leave WordsSmashedTogetherLikeSo.
81 $Theme->setAutosplitWikiWords(false);
84 * You may adjust the formats used for formatting dates and times
85 * below. (These examples give the default formats.)
86 * Formats are given as format strings to PHP strftime() function See
87 * http://www.php.net/manual/en/function.strftime.php for details.
88 * Do not include the server's zone (%Z), times are converted to the
91 $Theme->setDateFormat("%B %e, %Y", false);
94 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
95 // (c-file-style: "gnu")
100 // c-hanging-comment-ender-p: nil
101 // indent-tabs-mode: nil