2 rcs_id('$Id: themeinfo.php,v 1.9 2003-03-24 22:57:23 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 = '') {
13 if (isa($wikiword, 'WikiPageName')) {
14 $default_text = $wikiword->shortName;
15 $wikiword = $wikiword->name;
18 $default_text = $wikiword;
21 $url = WikiURL($wikiword, array('action' => 'create'));
22 $link = HTML::span(HTML::a(array('href' => $url), '?'));
24 if (!empty($linktext)) {
25 $link->unshiftContent(HTML::u($linktext));
26 $link->setAttr('class', 'named-wikiunknown');
29 $link->unshiftContent(HTML::u($this->maybeSplitWikiWord($default_text)));
30 $link->setAttr('class', 'wikiunknown');
32 if ($request->getArg('frame'))
33 $link->setAttr('target', '_top');
37 function getRecentChangesFormatter ($format) {
38 include_once($this->file('lib/RecentChanges.php'));
39 if (preg_match('/^rss|^sidebar/', $format))
40 return false; // use default
41 return '_Portland_RecentChanges_Formatter';
44 function getPageHistoryFormatter ($format) {
45 include_once($this->file('lib/RecentChanges.php'));
46 if (preg_match('/^rss|^sidebar/', $format))
47 return false; // use default
48 return '_Portland_PageHistory_Formatter';
52 $Theme = new Theme_Portland('Portland');
54 // CSS file defines fonts, colors and background images for this
55 // style. The companion '*-heavy.css' file isn't defined, it's just
56 // expected to be in the same directory that the base style is in.
58 $Theme->setDefaultCSS('Portland', 'portland.css');
59 $Theme->addAlternateCSS(_("Printer"), 'phpwiki-printer.css', 'print, screen');
60 $Theme->addAlternateCSS(_("Modern"), 'phpwiki-modern.css');
61 $Theme->addAlternateCSS('PhpWiki', 'phpwiki.css');
64 * The logo image appears on every page and links to the HomePage.
66 //$Theme->addImageAlias('logo', 'logo.png');
69 * The Signature image is shown after saving an edited page. If this
70 * is not set, any signature defined in index.php will be used. If it
71 * is not defined by index.php or in here then the "Thank you for
72 * editing..." screen will be omitted.
74 $Theme->addImageAlias('signature', 'signature.png');
79 //$Theme->setLinkIcon('http');
80 //$Theme->setLinkIcon('https');
81 //$Theme->setLinkIcon('ftp');
82 //$Theme->setLinkIcon('mailto');
83 //$Theme->setLinkIcon('interwiki');
84 //$Theme->setLinkIcon('*', 'url');
86 $Theme->setButtonSeparator(' ');
89 * WikiWords can automatically be split by inserting spaces between
90 * the words. The default is to leave WordsSmashedTogetherLikeSo.
92 $Theme->setAutosplitWikiWords(false);
95 * You may adjust the formats used for formatting dates and times
96 * below. (These examples give the default formats.)
97 * Formats are given as format strings to PHP strftime() function See
98 * http://www.php.net/manual/en/function.strftime.php for details.
99 * Do not include the server's zone (%Z), times are converted to the
102 $Theme->setDateFormat("%B %d, %Y", false);
105 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
106 // (c-file-style: "gnu")
111 // c-hanging-comment-ender-p: nil
112 // indent-tabs-mode: nil