5 * This file defines an appearance ("theme") of PhpWiki similar to the Portland Pattern Repository.
8 require_once('lib/WikiTheme.php');
10 class WikiTheme_Portland extends WikiTheme {
12 function linkUnknownWikiWord($wikiword, $linktext = '') {
14 if (isa($wikiword, 'WikiPageName')) {
15 $default_text = $wikiword->shortName;
16 $wikiword = $wikiword->name;
19 $default_text = $wikiword;
22 $url = WikiURL($wikiword, array('action' => 'create'));
23 $link = HTML::span(HTML::a(array('href' => $url, 'rel' => 'nofollow'), '?'));
25 if (!empty($linktext)) {
26 $link->unshiftContent(HTML::u($linktext));
27 $link->setAttr('class', 'named-wikiunknown');
30 $link->unshiftContent(HTML::u($this->maybeSplitWikiWord($default_text)));
31 $link->setAttr('class', 'wikiunknown');
33 if ($request->getArg('frame'))
34 $link->setAttr('target', '_top');
38 function getRecentChangesFormatter ($format) {
39 include_once($this->file('lib/RecentChanges.php'));
40 if (preg_match('/^rss|^sidebar/', $format))
41 return false; // use default
42 return '_Portland_RecentChanges_Formatter';
45 function getPageHistoryFormatter ($format) {
46 include_once($this->file('lib/RecentChanges.php'));
47 if (preg_match('/^rss|^sidebar/', $format))
48 return false; // use default
49 return '_Portland_PageHistory_Formatter';
53 // CSS file defines fonts, colors and background images for this
54 // style. The companion '*-heavy.css' file isn't defined, it's just
55 // expected to be in the same directory that the base style is in.
57 $this->setDefaultCSS('Portland', 'portland.css');
58 $this->addAlternateCSS(_("Printer"), 'phpwiki-printer.css', 'print, screen');
59 $this->addAlternateCSS(_("Modern"), 'phpwiki-modern.css');
60 $this->addAlternateCSS('PhpWiki', 'phpwiki.css');
63 * The logo image appears on every page and links to the HomePage.
65 $this->addImageAlias('logo', WIKI_NAME . 'logo.png');
68 * The Signature image is shown after saving an edited page. If this
69 * is set to false then the "Thank you for editing..." screen will
72 $this->addImageAlias('signature', WIKI_NAME . "Signature.png");
73 // Uncomment this next line to disable the signature.
74 //$this->addImageAlias('signature', false);
79 //$this->setLinkIcon('http');
80 //$this->setLinkIcon('https');
81 //$this->setLinkIcon('ftp');
82 //$this->setLinkIcon('mailto');
83 //$this->setLinkIcon('interwiki');
84 //$this->setLinkIcon('*', 'url');
86 $this->setButtonSeparator(' ');
89 * WikiWords can automatically be split by inserting spaces between
90 * the words. The default is to leave WordsSmashedTogetherLikeSo.
92 $this->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 $this->setDateFormat("%B %d, %Y", false);
107 $WikiTheme = new WikiTheme_Portland('Portland');
110 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
111 // (c-file-style: "gnu")
116 // c-hanging-comment-ender-p: nil
117 // indent-tabs-mode: nil