2 rcs_id('$Id: themeinfo.php,v 1.10 2003-12-05 01:31:50 carstenklapp 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', WIKI_NAME . 'logo.png');
69 * The Signature image is shown after saving an edited page. If this
70 * is set to false then the "Thank you for editing..." screen will
73 $Theme->addImageAlias('signature', WIKI_NAME . "Signature.png");
74 // Uncomment this next line to disable the signature.
75 //$Theme->addImageAlias('signature', false);
80 //$Theme->setLinkIcon('http');
81 //$Theme->setLinkIcon('https');
82 //$Theme->setLinkIcon('ftp');
83 //$Theme->setLinkIcon('mailto');
84 //$Theme->setLinkIcon('interwiki');
85 //$Theme->setLinkIcon('*', 'url');
87 $Theme->setButtonSeparator(' ');
90 * WikiWords can automatically be split by inserting spaces between
91 * the words. The default is to leave WordsSmashedTogetherLikeSo.
93 $Theme->setAutosplitWikiWords(false);
96 * You may adjust the formats used for formatting dates and times
97 * below. (These examples give the default formats.)
98 * Formats are given as format strings to PHP strftime() function See
99 * http://www.php.net/manual/en/function.strftime.php for details.
100 * Do not include the server's zone (%Z), times are converted to the
103 $Theme->setDateFormat("%B %d, %Y", false);
106 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
107 // (c-file-style: "gnu")
112 // c-hanging-comment-ender-p: nil
113 // indent-tabs-mode: nil