4 class SkinCologneBlue
extends Skin
{
6 function getStylesheet()
8 return "cologneblue.css";
11 function doBeforeContent()
13 global $wgUser, $wgOut, $wgTitle;
16 $qb = $this->qbSetting();
17 $mainPageObj = Title
::newMainPage();
19 $s .= "\n<div id='content'>\n<div id='topbar'>" .
20 "<table width='100%' border='0' cellspacing='0' cellpadding='8'><tr>";
22 $s .= "<td class='top' align='left' valign='middle' nowrap='nowrap'>";
23 $s .= "<a href=\"" . $mainPageObj->escapeLocalURL() . "\">";
24 $s .= "<span id='sitetitle'>" . wfMsg( "sitetitle" ) . "</span></a>";
26 $s .= "</td><td class='top' align='right' valign='bottom' width='100%'>";
27 $s .= $this->sysLinks();
28 $s .= "</td></tr><tr><td valign='top'>";
30 $s .= "<font size='-1'><span id='sitesub'>";
31 $s .= htmlspecialchars( wfMsg( "sitesubtitle" ) ) . "</span></font>";
32 $s .= "</td><td align='right'>" ;
34 $s .= "<font size='-1'><span id='langlinks'>" ;
35 $s .= str_replace ( "<br>" , "" , $this->otherLanguages() ) ;
36 $s .= "<br />" . $this->pageTitleLinks();
37 $s .= "</span></font>";
39 $s .= "</td></tr></table>\n";
41 $s .= "\n</div>\n<div id='article'>";
43 $s .= $this->pageTitle();
44 $s .= $this->pageSubtitle() . "\n";
48 function doAfterContent()
50 global $wgUser, $wgOut;
52 $s = "\n</div><br clear='all' />\n";
54 $s .= "\n<div id='footer'>";
55 $s .= "<table width='98%' border='0' cellspacing='0'><tr>";
57 $qb = $this->qbSetting();
58 if ( 1 == $qb ||
3 == $qb ) { # Left
59 $s .= $this->getQuickbarCompensator();
61 $s .= "<td class='bottom' align='center' valign='top'>";
63 $s .= $this->bottomLinks();
64 $s .= "\n<br />" . $this->makeKnownLink( wfMsg( "mainpage" ) ) . " | "
65 . $this->aboutLink() . " | "
66 . $this->searchForm( wfMsg( "qbfind" ) );
68 $s .= "\n<br />" . $this->pageStats();
71 if ( 2 == $qb ) { # Right
72 $s .= $this->getQuickbarCompensator();
74 $s .= "</tr></table>\n</div>\n</div>\n";
76 if ( 0 != $qb ) { $s .= $this->quickBar(); }
79 function doGetUserStyles()
81 global $wgUser, $wgOut, $wgStyleSheetPath;
83 $s = parent
::doGetUserStyles();
84 $qb = $this->qbSetting();
86 if ( 2 == $qb ) { # Right
87 $s .= "#quickbar { position: absolute; right: 4px; }\n" .
88 "#article { margin-left: 4px; margin-right: 148px; }\n";
89 } else if ( 1 == $qb ) {
90 $s .= "#quickbar { position: absolute; left: 4px; }\n" .
91 "#article { margin-left: 148px; margin-right: 4px; }\n";
92 } else if ( 3 == $qb ) { # Floating
93 $s .= "#quickbar { position:absolute; left:4px } \n" .
94 "#topbar { margin-left: 148px }\n" .
95 "#article { margin-left:148px; margin-right: 4px; } \n" .
96 "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;} \n"; # Hides from IE
102 global $wgUser, $wgLang, $wgTitle;
103 $li = $wgLang->specialPage("Userlogin");
104 $lo = $wgLang->specialPage("Userlogout");
106 $rt = $wgTitle->getPrefixedURL();
107 if ( 0 == strcasecmp( urlencode( $lo ), $rt ) ) {
110 $q = "returnto={$rt}";
114 $this->makeKnownLink( wfMsg( "mainpage" ), wfMsg( "mainpage" ) )
116 $this->makeKnownLink( wfMsg( "aboutpage" ), wfMsg( "about" ) )
118 $this->makeKnownLink( wfMsg( "helppage" ), wfMsg( "help" ) )
120 $this->makeKnownLink( wfMsg( "faqpage" ), wfMsg("faq") )
122 $this->specialLink( "specialpages" ) . " | ";
124 if ( $wgUser->getID() )
126 $s .= $this->makeKnownLink( $lo, wfMsg( "logout" ), $q );
130 $s .= $this->makeKnownLink( $li, wfMsg( "login" ), $q );
138 global $wgOut, $wgTitle, $wgUser, $wgLang, $wgDisableUploads;
140 $tns=$wgTitle->getNamespace();
142 $s = "\n<div id='quickbar'>";
145 $s .= $this->menuHead( "qbfind" );
146 $s .= $this->searchForm();
148 $s .= $this->menuHead( "qbbrowse" )
149 . $this->mainPageLink()
150 . $sep . $this->specialLink( "recentchanges" )
151 . $sep . $this->specialLink( "randompage" );
152 if ( wfMsg ( "currentevents" ) != "-" ) $s .= $sep . $this->makeKnownLink( wfMsg( "currentevents" ), "" ) ;
155 if ( $wgOut->isArticle() ) {
156 $s .= $this->menuHead( "qbedit" );
157 $s .= "<strong>" . $this->editThisPage() . "</strong>";
159 $s .= $sep . $this->makeKnownLink( wfMsg( "edithelppage" ), wfMsg( "edithelp" ) );
161 if ( 0 != $wgUser->getID() ) {
162 $s .= $sep . $this->moveThisPage();
164 if ( $wgUser->isSysop() ) {
165 $dtp = $this->deleteThisPage();
169 $ptp = $this->protectThisPage();
176 $s .= $this->menuHead( "qbpageoptions" );
177 $s .= $this->talkLink()
178 . $sep . $this->commentLink()
179 . $sep . $this->printableLink();
180 if ( 0 != $wgUser->getID() ) {
181 $s .= $sep . $this->watchThisPage();
186 $s .= $this->menuHead("qbpageinfo")
187 . $this->historyLink()
188 . $sep . $this->whatLinksHere()
189 . $sep . $this->watchPageLinksLink();
191 if ( Namespace::getUser() == $tns ||
Namespace::getTalk(Namespace::getUser()) == $tns ) {
192 $id=User
::idFromName($wgTitle->getText());
194 $s .= $sep . $this->userContribsLink();
195 if ( 0 != $wgUser->getID() ) {
196 $s .= $sep . $this->emailUserLink();
203 $s .= $this->menuHead( "qbmyoptions" );
204 if ( 0 != $wgUser->getID() ) {
205 $name = $wgUser->getName();
206 $tl = $this->makeKnownLink( $wgLang->getNsText(
207 Namespace::getTalk( Namespace::getUser() ) ) . ":{$name}",
209 if ( 0 != $wgUser->getNewtalk() ) { $tl .= " *"; }
211 $s .= $this->makeKnownLink( $wgLang->getNsText(
212 Namespace::getUser() ) . ":{$name}", wfMsg( "mypage" ) )
214 . $sep . $this->specialLink( "watchlist" )
215 . $sep . $this->makeKnownLink( $wgLang->specialPage( "Contributions" ),
216 wfMsg( "mycontris" ), "target=" . wfUrlencode($wgUser->getName() ) )
217 . $sep . $this->specialLink( "preferences" )
218 . $sep . $this->specialLink( "userlogout" );
220 $s .= $this->specialLink( "userlogin" );
223 $s .= $this->menuHead( "qbspecialpages" )
224 . $this->specialLink( "newpages" )
225 . $sep . $this->specialLink( "imagelist" )
226 . $sep . $this->specialLink( "statistics" )
227 . $sep . $this->bugReportsLink();
228 if ( 0 != $wgUser->getID() && !$wgDisableUploads ) {
229 $s .= $sep . $this->specialLink( "upload" );
231 global $wgSiteSupportPage;
232 if( $wgSiteSupportPage) {
233 $s .= $sep."<a href=\"".htmlspecialchars($wgSiteSupportPage)."\" class =\"internal\">"
234 .wfMsg( "sitesupport" )."</a>";
237 $s .= $sep . $this->makeKnownLink( $wgLang->specialPage( "Specialpages" ), wfMsg("moredotdotdot") );
239 $s .= $sep . "\n</div>\n";
243 function menuHead( $key )
245 $s = "\n<h6>" . wfMsg( $key ) . "</h6>";
249 function searchForm( $label = "" )
253 $search = $wgRequest->getText( 'search' );
254 $action = $this->escapeSearchLink();
255 $s = "<form id=\"search\" method=\"get\" class=\"inline\" action=\"$action\">";
256 if ( "" != $label ) { $s .= "{$label}: "; }
258 $s .= "<input type='text' name=\"search\" size='14' value=\""
259 . htmlspecialchars(substr($search,0,256)) . "\" />"
260 . "<br /><input type='submit' name=\"go\" value=\"" . htmlspecialchars( wfMsg( "go" ) ) . "\" /> <input type='submit' name=\"fulltext\" value=\"" . htmlspecialchars( wfMsg( "search" ) ) . "\" /></form>";