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 $cat = $this->getCategoryLinks();
37 if( $cat ) $s .= "<br />$cat\n";
38 $s .= "<br />" . $this->pageTitleLinks();
39 $s .= "</span></font>";
41 $s .= "</td></tr></table>\n";
43 $s .= "\n</div>\n<div id='article'>";
45 $s .= $this->pageTitle();
46 $s .= $this->pageSubtitle() . "\n";
50 function doAfterContent()
52 global $wgUser, $wgOut;
54 $s = "\n</div><br clear='all' />\n";
56 $s .= "\n<div id='footer'>";
57 $s .= "<table width='98%' border='0' cellspacing='0'><tr>";
59 $qb = $this->qbSetting();
60 if ( 1 == $qb ||
3 == $qb ) { # Left
61 $s .= $this->getQuickbarCompensator();
63 $s .= "<td class='bottom' align='center' valign='top'>";
65 $s .= $this->bottomLinks();
66 $s .= "\n<br />" . $this->makeKnownLink( wfMsg( "mainpage" ) ) . " | "
67 . $this->aboutLink() . " | "
68 . $this->searchForm( wfMsg( "qbfind" ) );
70 $s .= "\n<br />" . $this->pageStats();
73 if ( 2 == $qb ) { # Right
74 $s .= $this->getQuickbarCompensator();
76 $s .= "</tr></table>\n</div>\n</div>\n";
78 if ( 0 != $qb ) { $s .= $this->quickBar(); }
81 function doGetUserStyles()
83 global $wgUser, $wgOut, $wgStyleSheetPath;
85 $s = parent
::doGetUserStyles();
86 $qb = $this->qbSetting();
88 if ( 2 == $qb ) { # Right
89 $s .= "#quickbar { position: absolute; right: 4px; }\n" .
90 "#article { margin-left: 4px; margin-right: 148px; }\n";
91 } else if ( 1 == $qb ) {
92 $s .= "#quickbar { position: absolute; left: 4px; }\n" .
93 "#article { margin-left: 148px; margin-right: 4px; }\n";
94 } else if ( 3 == $qb ) { # Floating
95 $s .= "#quickbar { position:absolute; left:4px } \n" .
96 "#topbar { margin-left: 148px }\n" .
97 "#article { margin-left:148px; margin-right: 4px; } \n" .
98 "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;} \n"; # Hides from IE
104 global $wgUser, $wgLang, $wgTitle;
105 $li = $wgLang->specialPage("Userlogin");
106 $lo = $wgLang->specialPage("Userlogout");
108 $rt = $wgTitle->getPrefixedURL();
109 if ( 0 == strcasecmp( urlencode( $lo ), $rt ) ) {
112 $q = "returnto={$rt}";
116 $this->makeKnownLink( wfMsg( "mainpage" ), wfMsg( "mainpage" ) )
118 $this->makeKnownLink( wfMsg( "aboutpage" ), wfMsg( "about" ) )
120 $this->makeKnownLink( wfMsg( "helppage" ), wfMsg( "help" ) )
122 $this->makeKnownLink( wfMsg( "faqpage" ), wfMsg("faq") )
124 $this->specialLink( "specialpages" ) . " | ";
126 if ( $wgUser->getID() )
128 $s .= $this->makeKnownLink( $lo, wfMsg( "logout" ), $q );
132 $s .= $this->makeKnownLink( $li, wfMsg( "login" ), $q );
140 global $wgOut, $wgTitle, $wgUser, $wgLang, $wgDisableUploads;
142 $tns=$wgTitle->getNamespace();
144 $s = "\n<div id='quickbar'>";
147 $s .= $this->menuHead( "qbfind" );
148 $s .= $this->searchForm();
150 $s .= $this->menuHead( "qbbrowse" )
151 . $this->mainPageLink()
152 . $sep . $this->specialLink( "recentchanges" )
153 . $sep . $this->specialLink( "randompage" );
154 if ( wfMsg ( "currentevents" ) != "-" ) $s .= $sep . $this->makeKnownLink( wfMsg( "currentevents" ), "" ) ;
157 if ( $wgOut->isArticle() ) {
158 $s .= $this->menuHead( "qbedit" );
159 $s .= "<strong>" . $this->editThisPage() . "</strong>";
161 $s .= $sep . $this->makeKnownLink( wfMsg( "edithelppage" ), wfMsg( "edithelp" ) );
163 if ( 0 != $wgUser->getID() ) {
164 $s .= $sep . $this->moveThisPage();
166 if ( $wgUser->isSysop() ) {
167 $dtp = $this->deleteThisPage();
171 $ptp = $this->protectThisPage();
178 $s .= $this->menuHead( "qbpageoptions" );
179 $s .= $this->talkLink()
180 . $sep . $this->commentLink()
181 . $sep . $this->printableLink();
182 if ( 0 != $wgUser->getID() ) {
183 $s .= $sep . $this->watchThisPage();
188 $s .= $this->menuHead("qbpageinfo")
189 . $this->historyLink()
190 . $sep . $this->whatLinksHere()
191 . $sep . $this->watchPageLinksLink();
193 if ( Namespace::getUser() == $tns ||
Namespace::getTalk(Namespace::getUser()) == $tns ) {
194 $id=User
::idFromName($wgTitle->getText());
196 $s .= $sep . $this->userContribsLink();
197 if ( 0 != $wgUser->getID() ) {
198 $s .= $sep . $this->emailUserLink();
205 $s .= $this->menuHead( "qbmyoptions" );
206 if ( 0 != $wgUser->getID() ) {
207 $name = $wgUser->getName();
208 $tl = $this->makeKnownLink( $wgLang->getNsText(
209 Namespace::getTalk( Namespace::getUser() ) ) . ":{$name}",
211 if ( 0 != $wgUser->getNewtalk() ) { $tl .= " *"; }
213 $s .= $this->makeKnownLink( $wgLang->getNsText(
214 Namespace::getUser() ) . ":{$name}", wfMsg( "mypage" ) )
216 . $sep . $this->specialLink( "watchlist" )
217 . $sep . $this->makeKnownLink( $wgLang->specialPage( "Contributions" ),
218 wfMsg( "mycontris" ), "target=" . wfUrlencode($wgUser->getName() ) )
219 . $sep . $this->specialLink( "preferences" )
220 . $sep . $this->specialLink( "userlogout" );
222 $s .= $this->specialLink( "userlogin" );
225 $s .= $this->menuHead( "qbspecialpages" )
226 . $this->specialLink( "newpages" )
227 . $sep . $this->specialLink( "imagelist" )
228 . $sep . $this->specialLink( "statistics" )
229 . $sep . $this->bugReportsLink();
230 if ( 0 != $wgUser->getID() && !$wgDisableUploads ) {
231 $s .= $sep . $this->specialLink( "upload" );
233 global $wgSiteSupportPage;
234 if( $wgSiteSupportPage) {
235 $s .= $sep."<a href=\"".htmlspecialchars($wgSiteSupportPage)."\" class =\"internal\">"
236 .wfMsg( "sitesupport" )."</a>";
239 $s .= $sep . $this->makeKnownLink( $wgLang->specialPage( "Specialpages" ), wfMsg("moredotdotdot") );
241 $s .= $sep . "\n</div>\n";
245 function menuHead( $key )
247 $s = "\n<h6>" . wfMsg( $key ) . "</h6>";
251 function searchForm( $label = "" )
255 $search = $wgRequest->getText( 'search' );
256 $action = $this->escapeSearchLink();
257 $s = "<form id=\"search\" method=\"get\" class=\"inline\" action=\"$action\">";
258 if ( "" != $label ) { $s .= "{$label}: "; }
260 $s .= "<input type='text' name=\"search\" size='14' value=\""
261 . htmlspecialchars(substr($search,0,256)) . "\" />"
262 . "<br /><input type='submit' name=\"go\" value=\"" . htmlspecialchars( wfMsg( "go" ) ) . "\" /> <input type='submit' name=\"fulltext\" value=\"" . htmlspecialchars( wfMsg( "search" ) ) . "\" /></form>";