]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/Portland/themeinfo.php
More infiltration of new object-based HTML generation.
[SourceForge/phpwiki.git] / themes / Portland / themeinfo.php
1 <?php
2 rcs_id('$Id: themeinfo.php,v 1.2 2002-01-21 06:55:47 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 }
27
28 $Theme = new Theme_Portland('Portland');
29
30 // CSS file defines fonts, colors and background images for this
31 // style.  The companion '*-heavy.css' file isn't defined, it's just
32 // expected to be in the same directory that the base style is in.
33
34 $Theme->setDefaultCSS('Portland', 'portland.css');
35 $Theme->addAlternateCSS(_("Printer"), 'phpwiki-printer.css', 'print, screen');
36 $Theme->addAlternateCSS(_("Modern"), 'phpwiki-modern.css');
37 $Theme->addAlternateCSS('PhpWiki', 'phpwiki.css');
38
39 /**
40  * The logo image appears on every page and links to the HomePage.
41  */
42 //$Theme->addImageAlias('logo', 'logo.png');
43
44 /**
45  * The Signature image is shown after saving an edited page. If this
46  * is not set, any signature defined in index.php will be used. If it
47  * is not defined by index.php or in here then the "Thank you for
48  * editing..." screen will be omitted.
49  */
50 $Theme->addImageAlias('signature', 'signature.png');
51
52 /*
53  * Link icons.
54  */
55 //$Theme->setLinkIcon('http');
56 //$Theme->setLinkIcon('https');
57 //$Theme->setLinkIcon('ftp');
58 //$Theme->setLinkIcon('mailto');
59 //$Theme->setLinkIcon('interwiki');
60 //$Theme->setLinkIcon('*', 'url');
61
62 $Theme->setButtonSeparator(' ');
63
64 /**
65  * WikiWords can automatically be split by inserting spaces between
66  * the words. The default is to leave WordsSmashedTogetherLikeSo.
67  */
68 $Theme->setAutosplitWikiWords(false);
69
70 /*
71  * You may adjust the formats used for formatting dates and times
72  * below.  (These examples give the default formats.)
73  * Formats are given as format strings to PHP strftime() function See
74  * http://www.php.net/manual/en/function.strftime.php for details.
75  */
76 $Theme->setDateTimeFormat("%B %e, %Y");   // may contain time of day
77 $Theme->setDateFormat("%B %e, %Y");         // must not contain time
78
79
80 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
81 // (c-file-style: "gnu")
82 // Local Variables:
83 // mode: php
84 // tab-width: 8
85 // c-basic-offset: 4
86 // c-hanging-comment-ender-p: nil
87 // indent-tabs-mode: nil
88 // End:   
89 ?>