4 class SkinCologneBlue
extends Skin
{
6 function getStylesheet()
8 return "cologneblue.css";
10 function getSkinName() {
14 function doBeforeContent()
16 global $wgUser, $wgOut, $wgTitle;
19 $qb = $this->qbSetting();
20 $mainPageObj = Title
::newMainPage();
22 $s .= "\n<div id='content'>\n<div id='topbar'>" .
23 "<table width='100%' border='0' cellspacing='0' cellpadding='8'><tr>";
25 $s .= "<td class='top' align='left' valign='middle' nowrap='nowrap'>";
26 $s .= "<a href=\"" . $mainPageObj->escapeLocalURL() . "\">";
27 $s .= "<span id='sitetitle'>" . wfMsg( "sitetitle" ) . "</span></a>";
29 $s .= "</td><td class='top' align='right' valign='bottom' width='100%'>";
30 $s .= $this->sysLinks();
31 $s .= "</td></tr><tr><td valign='top'>";
33 $s .= "<font size='-1'><span id='sitesub'>";
34 $s .= htmlspecialchars( wfMsg( "sitesubtitle" ) ) . "</span></font>";
35 $s .= "</td><td align='right'>" ;
37 $s .= "<font size='-1'><span id='langlinks'>" ;
38 $s .= str_replace ( "<br>" , "" , $this->otherLanguages() );
39 $cat = $this->getCategoryLinks();
40 if( $cat ) $s .= "<br />$cat\n";
41 $s .= "<br />" . $this->pageTitleLinks();
42 $s .= "</span></font>";
44 $s .= "</td></tr></table>\n";
46 $s .= "\n</div>\n<div id='article'>";
48 $s .= $this->pageTitle();
49 $s .= $this->pageSubtitle() . "\n";
53 function doAfterContent()
55 global $wgUser, $wgOut;
57 $s = "\n</div><br clear='all' />\n";
59 $s .= "\n<div id='footer'>";
60 $s .= "<table width='98%' border='0' cellspacing='0'><tr>";
62 $qb = $this->qbSetting();
63 if ( 1 == $qb ||
3 == $qb ) { # Left
64 $s .= $this->getQuickbarCompensator();
66 $s .= "<td class='bottom' align='center' valign='top'>";
68 $s .= $this->bottomLinks();
69 $s .= "\n<br />" . $this->makeKnownLink( wfMsg( "mainpage" ) ) . " | "
70 . $this->aboutLink() . " | "
71 . $this->searchForm( wfMsg( "qbfind" ) );
73 $s .= "\n<br />" . $this->pageStats();
76 if ( 2 == $qb ) { # Right
77 $s .= $this->getQuickbarCompensator();
79 $s .= "</tr></table>\n</div>\n</div>\n";
81 if ( 0 != $qb ) { $s .= $this->quickBar(); }
84 function doGetUserStyles()
86 global $wgUser, $wgOut, $wgStyleSheetPath;
88 $qb = $this->qbSetting();
90 if ( 2 == $qb ) { # Right
91 $s .= "#quickbar { position: absolute; right: 4px; }\n" .
92 "#article { margin-left: 4px; margin-right: 148px; }\n";
93 } else if ( 1 == $qb ) {
94 $s .= "#quickbar { position: absolute; left: 4px; }\n" .
95 "#article { margin-left: 148px; margin-right: 4px; }\n";
96 } else if ( 3 == $qb ) { # Floating
97 $s .= "#quickbar { position:absolute; left:4px } \n" .
98 "#topbar { margin-left: 148px }\n" .
99 "#article { margin-left:148px; margin-right: 4px; } \n" .
100 "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;} \n"; # Hides from IE
102 $s .= parent
::doGetUserStyles();
107 global $wgUser, $wgLang, $wgTitle;
108 $li = $wgLang->specialPage("Userlogin");
109 $lo = $wgLang->specialPage("Userlogout");
111 $rt = $wgTitle->getPrefixedURL();
112 if ( 0 == strcasecmp( urlencode( $lo ), $rt ) ) {
115 $q = "returnto={$rt}";
119 $this->makeKnownLink( wfMsg( "mainpage" ), wfMsg( "mainpage" ) )
121 $this->makeKnownLink( wfMsg( "aboutpage" ), wfMsg( "about" ) )
123 $this->makeKnownLink( wfMsg( "helppage" ), wfMsg( "help" ) )
125 $this->makeKnownLink( wfMsg( "faqpage" ), wfMsg("faq") )
127 $this->specialLink( "specialpages" ) . " | ";
129 if ( $wgUser->getID() )
131 $s .= $this->makeKnownLink( $lo, wfMsg( "logout" ), $q );
135 $s .= $this->makeKnownLink( $li, wfMsg( "login" ), $q );
143 global $wgOut, $wgTitle, $wgUser, $wgLang, $wgDisableUploads;
145 $tns=$wgTitle->getNamespace();
147 $s = "\n<div id='quickbar'>";
150 $s .= $this->menuHead( "qbfind" );
151 $s .= $this->searchForm();
153 $s .= $this->menuHead( "qbbrowse" )
154 . $this->mainPageLink()
155 . $sep . $this->specialLink( "recentchanges" )
156 . $sep . $this->specialLink( "randompage" );
157 if ( wfMsg ( "currentevents" ) != "-" ) $s .= $sep . $this->makeKnownLink( wfMsg( "currentevents" ), "" ) ;
160 if ( $wgOut->isArticle() ) {
161 $s .= $this->menuHead( "qbedit" );
162 $s .= "<strong>" . $this->editThisPage() . "</strong>";
164 $s .= $sep . $this->makeKnownLink( wfMsg( "edithelppage" ), wfMsg( "edithelp" ) );
166 if ( 0 != $wgUser->getID() ) {
167 $s .= $sep . $this->moveThisPage();
169 if ( $wgUser->isSysop() ) {
170 $dtp = $this->deleteThisPage();
174 $ptp = $this->protectThisPage();
181 $s .= $this->menuHead( "qbpageoptions" );
182 $s .= $this->talkLink()
183 . $sep . $this->commentLink()
184 . $sep . $this->printableLink();
185 if ( 0 != $wgUser->getID() ) {
186 $s .= $sep . $this->watchThisPage();
191 $s .= $this->menuHead("qbpageinfo")
192 . $this->historyLink()
193 . $sep . $this->whatLinksHere()
194 . $sep . $this->watchPageLinksLink();
196 if ( Namespace::getUser() == $tns ||
Namespace::getTalk(Namespace::getUser()) == $tns ) {
197 $id=User
::idFromName($wgTitle->getText());
199 $s .= $sep . $this->userContribsLink();
200 if ( 0 != $wgUser->getID() ) {
201 $s .= $sep . $this->emailUserLink();
208 $s .= $this->menuHead( "qbmyoptions" );
209 if ( 0 != $wgUser->getID() ) {
210 $name = $wgUser->getName();
211 $tl = $this->makeKnownLink( $wgLang->getNsText(
212 Namespace::getTalk( Namespace::getUser() ) ) . ":{$name}",
214 if ( 0 != $wgUser->getNewtalk() ) { $tl .= " *"; }
216 $s .= $this->makeKnownLink( $wgLang->getNsText(
217 Namespace::getUser() ) . ":{$name}", wfMsg( "mypage" ) )
219 . $sep . $this->specialLink( "watchlist" )
220 . $sep . $this->makeKnownLink( $wgLang->specialPage( "Contributions" ),
221 wfMsg( "mycontris" ), "target=" . wfUrlencode($wgUser->getName() ) )
222 . $sep . $this->specialLink( "preferences" )
223 . $sep . $this->specialLink( "userlogout" );
225 $s .= $this->specialLink( "userlogin" );
228 $s .= $this->menuHead( "qbspecialpages" )
229 . $this->specialLink( "newpages" )
230 . $sep . $this->specialLink( "imagelist" )
231 . $sep . $this->specialLink( "statistics" )
232 . $sep . $this->bugReportsLink();
233 if ( 0 != $wgUser->getID() && !$wgDisableUploads ) {
234 $s .= $sep . $this->specialLink( "upload" );
236 global $wgSiteSupportPage;
237 if( $wgSiteSupportPage) {
238 $s .= $sep."<a href=\"".htmlspecialchars($wgSiteSupportPage)."\" class =\"internal\">"
239 .wfMsg( "sitesupport" )."</a>";
242 $s .= $sep . $this->makeKnownLink( $wgLang->specialPage( "Specialpages" ), wfMsg("moredotdotdot") );
244 $s .= $sep . "\n</div>\n";
248 function menuHead( $key )
250 $s = "\n<h6>" . wfMsg( $key ) . "</h6>";
254 function searchForm( $label = "" )
258 $search = $wgRequest->getText( 'search' );
259 $action = $this->escapeSearchLink();
260 $s = "<form id=\"search\" method=\"get\" class=\"inline\" action=\"$action\">";
261 if ( "" != $label ) { $s .= "{$label}: "; }
263 $s .= "<input type='text' name=\"search\" size='14' value=\""
264 . htmlspecialchars(substr($search,0,256)) . "\" />"
265 . "<br /><input type='submit' name=\"go\" value=\"" . htmlspecialchars( wfMsg( "go" ) ) . "\" /> <input type='submit' name=\"fulltext\" value=\"" . htmlspecialchars( wfMsg( "search" ) ) . "\" /></form>";