]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/Portland/themeinfo.php
fix revision can be empty, replace Sep by SEP
[SourceForge/phpwiki.git] / themes / Portland / themeinfo.php
1 <?php
2 rcs_id('$Id: themeinfo.php,v 1.12 2005-01-20 10:09:27 rurban 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, 'rel' => 'nofollow'), '?'));
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 $WikiTheme = 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 $WikiTheme->setDefaultCSS('Portland', 'portland.css');
59 $WikiTheme->addAlternateCSS(_("Printer"), 'phpwiki-printer.css', 'print, screen');
60 $WikiTheme->addAlternateCSS(_("Modern"), 'phpwiki-modern.css');
61 $WikiTheme->addAlternateCSS('PhpWiki', 'phpwiki.css');
62
63 /**
64  * The logo image appears on every page and links to the HomePage.
65  */
66 $WikiTheme->addImageAlias('logo', WIKI_NAME . 'logo.png');
67
68 /**
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
71  * be omitted.
72  */
73 $WikiTheme->addImageAlias('signature', WIKI_NAME . "Signature.png");
74 // Uncomment this next line to disable the signature.
75 //$WikiTheme->addImageAlias('signature', false);
76
77 /*
78  * Link icons.
79  */
80 //$WikiTheme->setLinkIcon('http');
81 //$WikiTheme->setLinkIcon('https');
82 //$WikiTheme->setLinkIcon('ftp');
83 //$WikiTheme->setLinkIcon('mailto');
84 //$WikiTheme->setLinkIcon('interwiki');
85 //$WikiTheme->setLinkIcon('*', 'url');
86
87 $WikiTheme->setButtonSeparator(' ');
88
89 /**
90  * WikiWords can automatically be split by inserting spaces between
91  * the words. The default is to leave WordsSmashedTogetherLikeSo.
92  */
93 $WikiTheme->setAutosplitWikiWords(false);
94
95 /*
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
101  * user's time zone.
102  */
103 $WikiTheme->setDateFormat("%B %d, %Y", false);
104
105
106 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
107 // (c-file-style: "gnu")
108 // Local Variables:
109 // mode: php
110 // tab-width: 8
111 // c-basic-offset: 4
112 // c-hanging-comment-ender-p: nil
113 // indent-tabs-mode: nil
114 // End:   
115 ?>