]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/Portland/themeinfo.php
Fixes for windows compatibility in strftime format strings.
[SourceForge/phpwiki.git] / themes / Portland / themeinfo.php
1 <?php
2 rcs_id('$Id: themeinfo.php,v 1.9 2003-03-24 22:57:23 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         global $request;
13         if (isa($wikiword, 'WikiPageName')) {
14             $default_text = $wikiword->shortName;
15             $wikiword = $wikiword->name;
16         }
17         else {
18             $default_text = $wikiword;
19         }
20         
21         $url = WikiURL($wikiword, array('action' => 'create'));
22         $link = HTML::span(HTML::a(array('href' => $url), '?'));
23
24         if (!empty($linktext)) {
25             $link->unshiftContent(HTML::u($linktext));
26             $link->setAttr('class', 'named-wikiunknown');
27         }
28         else {
29             $link->unshiftContent(HTML::u($this->maybeSplitWikiWord($default_text)));
30             $link->setAttr('class', 'wikiunknown');
31         }
32         if ($request->getArg('frame'))
33             $link->setAttr('target', '_top');
34         
35         return $link;
36     }
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';
42     }
43
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';
49     }
50 }
51
52 $Theme = new Theme_Portland('Portland');
53
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.
57
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');
62
63 /**
64  * The logo image appears on every page and links to the HomePage.
65  */
66 //$Theme->addImageAlias('logo', 'logo.png');
67
68 /**
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.
73  */
74 $Theme->addImageAlias('signature', 'signature.png');
75
76 /*
77  * Link icons.
78  */
79 //$Theme->setLinkIcon('http');
80 //$Theme->setLinkIcon('https');
81 //$Theme->setLinkIcon('ftp');
82 //$Theme->setLinkIcon('mailto');
83 //$Theme->setLinkIcon('interwiki');
84 //$Theme->setLinkIcon('*', 'url');
85
86 $Theme->setButtonSeparator(' ');
87
88 /**
89  * WikiWords can automatically be split by inserting spaces between
90  * the words. The default is to leave WordsSmashedTogetherLikeSo.
91  */
92 $Theme->setAutosplitWikiWords(false);
93
94 /*
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
100  * user's time zone.
101  */
102 $Theme->setDateFormat("%B %d, %Y", false);
103
104
105 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
106 // (c-file-style: "gnu")
107 // Local Variables:
108 // mode: php
109 // tab-width: 8
110 // c-basic-offset: 4
111 // c-hanging-comment-ender-p: nil
112 // indent-tabs-mode: nil
113 // End:   
114 ?>