]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/Portland/themeinfo.php
Cleanup/refactor time-zone offset preference and relative date
[SourceForge/phpwiki.git] / themes / Portland / themeinfo.php
1 <?php
2 rcs_id('$Id: themeinfo.php,v 1.6 2002-02-08 22:03:03 dairiki Exp $');
3
4 /*
5  * This file defines an appearance ("theme") of PhpWiki similar to the Portland Pattern Repository.
6  */
7
8 require_once('lib/Theme.php');
9
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), '?'));
14
15         if (!empty($linktext)) {
16             $link->unshiftContent(HTML::u($linktext));
17             $link->setAttr('class', 'named-wikiunknown');
18         }
19         else {
20             $link->unshiftContent(HTML::u($this->maybeSplitWikiWord($wikiword)));
21             $link->setAttr('class', 'wikiunknown');
22         }
23         
24         return $link;
25     }
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';
31     }
32
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';
38     }
39 }
40
41 $Theme = new Theme_Portland('Portland');
42
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.
46
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');
51
52 /**
53  * The logo image appears on every page and links to the HomePage.
54  */
55 //$Theme->addImageAlias('logo', 'logo.png');
56
57 /**
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.
62  */
63 $Theme->addImageAlias('signature', 'signature.png');
64
65 /*
66  * Link icons.
67  */
68 //$Theme->setLinkIcon('http');
69 //$Theme->setLinkIcon('https');
70 //$Theme->setLinkIcon('ftp');
71 //$Theme->setLinkIcon('mailto');
72 //$Theme->setLinkIcon('interwiki');
73 //$Theme->setLinkIcon('*', 'url');
74
75 $Theme->setButtonSeparator(' ');
76
77 /**
78  * WikiWords can automatically be split by inserting spaces between
79  * the words. The default is to leave WordsSmashedTogetherLikeSo.
80  */
81 $Theme->setAutosplitWikiWords(false);
82
83 /*
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
89  * user's time zone.
90  */
91 $Theme->setDateFormat("%B %e, %Y", false);
92
93
94 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
95 // (c-file-style: "gnu")
96 // Local Variables:
97 // mode: php
98 // tab-width: 8
99 // c-basic-offset: 4
100 // c-hanging-comment-ender-p: nil
101 // indent-tabs-mode: nil
102 // End:   
103 ?>