2 // Avoid direct call to this file.
3 // PHPWIKI_VERSION is defined in lib/prepend.php
4 if (!defined('PHPWIKI_VERSION')) {
10 * This file defines an appearance ("theme") of PhpWiki similar to the Portland Pattern Repository.
13 require_once 'lib/WikiTheme.php';
15 class WikiTheme_Portland extends WikiTheme {
17 function linkUnknownWikiWord($wikiword, $linktext = '') {
19 if (isa($wikiword, 'WikiPageName')) {
20 $default_text = $wikiword->shortName;
21 $wikiword = $wikiword->name;
24 $default_text = $wikiword;
27 $url = WikiURL($wikiword, array('action' => 'create'));
28 $link = HTML::span(HTML::a(array('href' => $url, 'rel' => 'nofollow'), '?'));
30 if (!empty($linktext)) {
31 $link->unshiftContent(HTML::u($linktext));
32 $link->setAttr('class', 'named-wikiunknown');
35 $link->unshiftContent(HTML::u($this->maybeSplitWikiWord($default_text)));
36 $link->setAttr('class', 'wikiunknown');
41 function getRecentChangesFormatter ($format) {
42 include_once($this->file('lib/RecentChanges.php'));
43 if (preg_match('/^rss|^sidebar/', $format))
44 return false; // use default
45 return '_Portland_RecentChanges_Formatter';
48 function getPageHistoryFormatter ($format) {
49 include_once($this->file('lib/RecentChanges.php'));
50 if (preg_match('/^rss|^sidebar/', $format))
51 return false; // use default
52 return '_Portland_PageHistory_Formatter';
56 // CSS file defines fonts, colors and background images for this
57 // style. The companion '*-heavy.css' file isn't defined, it's just
58 // expected to be in the same directory that the base style is in.
60 $this->setDefaultCSS('Portland', 'portland.css');
61 $this->addAlternateCSS(_("Printer"), 'phpwiki-printer.css', 'print, screen');
62 $this->addAlternateCSS(_("Modern"), 'phpwiki-modern.css');
63 $this->addAlternateCSS('PhpWiki', 'phpwiki.css');
66 * The logo image appears on every page and links to the HomePage.
68 $this->addImageAlias('logo', WIKI_NAME . 'logo.png');
71 * The Signature image is shown after saving an edited page. If this
72 * is set to false then the "Thank you for editing..." screen will
75 $this->addImageAlias('signature', WIKI_NAME . "Signature.png");
76 // Uncomment this next line to disable the signature.
77 //$this->addImageAlias('signature', false);
83 $this->setButtonSeparator(' ');
86 * WikiWords can automatically be split by inserting spaces between
87 * the words. The default is to leave WordsSmashedTogetherLikeSo.
89 $this->setAutosplitWikiWords(false);
92 * You may adjust the formats used for formatting dates and times
93 * below. (These examples give the default formats.)
94 * Formats are given as format strings to PHP strftime() function See
95 * http://www.php.net/manual/en/function.strftime.php for details.
96 * Do not include the server's zone (%Z), times are converted to the
99 $this->setDateFormat("%B %d, %Y", false);
104 $WikiTheme = new WikiTheme_Portland('Portland');
110 // c-hanging-comment-ender-p: nil
111 // indent-tabs-mode: nil