10 if( !defined( 'MEDIAWIKI' ) )
18 class SkinCologneBlue
extends Skin
{
20 function getStylesheet() {
21 return "common/cologneblue.css";
23 function getSkinName() {
27 function doBeforeContent() {
28 global $wgUser, $wgOut, $wgTitle, $wgSiteNotice;
31 $qb = $this->qbSetting();
32 $mainPageObj = Title
::newMainPage();
34 $s .= "\n<div id='content'>\n<div id='topbar'>" .
35 "<table width='100%' border='0' cellspacing='0' cellpadding='8'><tr>";
37 $s .= "<td class='top' align='left' valign='middle' nowrap='nowrap'>";
38 $s .= "<a href=\"" . $mainPageObj->escapeLocalURL() . "\">";
39 $s .= "<span id='sitetitle'>" . wfMsg( "sitetitle" ) . "</span></a>";
41 $s .= "</td><td class='top' align='right' valign='bottom' width='100%'>";
42 $s .= $this->sysLinks();
43 $s .= "</td></tr><tr><td valign='top'>";
45 $s .= "<font size='-1'><span id='sitesub'>";
46 $s .= htmlspecialchars( wfMsg( "sitesubtitle" ) ) . "</span></font>";
47 $s .= "</td><td align='right'>" ;
49 $s .= "<font size='-1'><span id='langlinks'>" ;
50 $s .= str_replace ( "<br>" , "" , $this->otherLanguages() );
51 $cat = $this->getCategoryLinks();
52 if( $cat ) $s .= "<br />$cat\n";
53 $s .= "<br />" . $this->pageTitleLinks();
54 $s .= "</span></font>";
56 $s .= "</td></tr></table>\n";
58 $s .= "\n</div>\n<div id='article'>";
61 $s .= "\n<div id='siteNotice'>$wgSiteNotice</div>\n";
63 $s .= $this->pageTitle();
64 $s .= $this->pageSubtitle() . "\n";
68 function doAfterContent()
70 global $wgUser, $wgOut;
72 $s = "\n</div><br clear='all' />\n";
74 $s .= "\n<div id='footer'>";
75 $s .= "<table width='98%' border='0' cellspacing='0'><tr>";
77 $qb = $this->qbSetting();
78 if ( 1 == $qb ||
3 == $qb ) { # Left
79 $s .= $this->getQuickbarCompensator();
81 $s .= "<td class='bottom' align='center' valign='top'>";
83 $s .= $this->bottomLinks();
84 $s .= "\n<br />" . $this->makeKnownLink( wfMsgForContent( "mainpage" ) ) . " | "
85 . $this->aboutLink() . " | "
86 . $this->searchForm( wfMsg( "qbfind" ) );
88 $s .= "\n<br />" . $this->pageStats();
91 if ( 2 == $qb ) { # Right
92 $s .= $this->getQuickbarCompensator();
94 $s .= "</tr></table>\n</div>\n</div>\n";
96 if ( 0 != $qb ) { $s .= $this->quickBar(); }
99 function doGetUserStyles()
101 global $wgUser, $wgOut, $wgStyleSheetPath;
103 $qb = $this->qbSetting();
105 if ( 2 == $qb ) { # Right
106 $s .= "#quickbar { position: absolute; right: 4px; }\n" .
107 "#article { margin-left: 4px; margin-right: 148px; }\n";
108 } else if ( 1 == $qb ) {
109 $s .= "#quickbar { position: absolute; left: 4px; }\n" .
110 "#article { margin-left: 148px; margin-right: 4px; }\n";
111 } else if ( 3 == $qb ) { # Floating
112 $s .= "#quickbar { position:absolute; left:4px } \n" .
113 "#topbar { margin-left: 148px }\n" .
114 "#article { margin-left:148px; margin-right: 4px; } \n" .
115 "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;} \n"; # Hides from IE
117 $s .= parent
::doGetUserStyles();
122 global $wgUser, $wgContLang, $wgTitle;
123 $li = $wgContLang->specialPage("Userlogin");
124 $lo = $wgContLang->specialPage("Userlogout");
126 $rt = $wgTitle->getPrefixedURL();
127 if ( 0 == strcasecmp( urlencode( $lo ), $rt ) ) {
130 $q = "returnto={$rt}";
134 $this->makeKnownLink( wfMsgForContent( "mainpage" ), wfMsg( "mainpage" ) )
136 $this->makeKnownLink( wfMsgForContent( "aboutpage" ), wfMsg( "about" ) )
138 $this->makeKnownLink( wfMsgForContent( "helppage" ), wfMsg( "help" ) )
140 $this->makeKnownLink( wfMsgForContent( "faqpage" ), wfMsg("faq") )
142 $this->specialLink( "specialpages" ) . " | ";
144 if ( $wgUser->getID() )
146 $s .= $this->makeKnownLink( $lo, wfMsg( "logout" ), $q );
150 $s .= $this->makeKnownLink( $li, wfMsg( "login" ), $q );
157 * Compute the sidebar
162 global $wgOut, $wgTitle, $wgUser, $wgLang, $wgContLang, $wgDisableUploads, $wgNavigationLinks;
164 $tns=$wgTitle->getNamespace();
166 $s = "\n<div id='quickbar'>";
169 $s .= $this->menuHead( "qbfind" );
170 $s .= $this->searchForm();
172 $s .= $this->menuHead( "qbbrowse" );
174 foreach ( $wgNavigationLinks as $link ) {
175 $msg = wfMsgForContent( $link['href'] );
177 $s .= '<a href="' . $this->makeInternalOrExternalUrl( $msg ) . '">' .
178 wfMsg( $link['text'] ) . '</a>' . $sep;
182 if ( $wgOut->isArticle() ) {
183 $s .= $this->menuHead( "qbedit" );
184 $s .= "<strong>" . $this->editThisPage() . "</strong>";
186 $s .= $sep . $this->makeKnownLink( wfMsgForContent( "edithelppage" ), wfMsg( "edithelp" ) );
188 if ( 0 != $wgUser->getID() ) {
189 $s .= $sep . $this->moveThisPage();
191 if ( $wgUser->isAllowed('delete') ) {
192 $dtp = $this->deleteThisPage();
197 if ( $wgUser->isAllowed('protect') ) {
198 $ptp = $this->protectThisPage();
205 $s .= $this->menuHead( "qbpageoptions" );
206 $s .= $this->talkLink()
207 . $sep . $this->commentLink()
208 . $sep . $this->printableLink();
209 if ( 0 != $wgUser->getID() ) {
210 $s .= $sep . $this->watchThisPage();
215 $s .= $this->menuHead("qbpageinfo")
216 . $this->historyLink()
217 . $sep . $this->whatLinksHere()
218 . $sep . $this->watchPageLinksLink();
220 if ( Namespace::getUser() == $tns ||
Namespace::getTalk(Namespace::getUser()) == $tns ) {
221 $id=User
::idFromName($wgTitle->getText());
223 $s .= $sep . $this->userContribsLink();
224 if( $this->showEmailUser( $id ) ) {
225 $s .= $sep . $this->emailUserLink();
232 $s .= $this->menuHead( "qbmyoptions" );
233 if ( 0 != $wgUser->getID() ) {
234 $name = $wgUser->getName();
235 $tl = $this->makeKnownLink( $wgContLang->getNsText(
236 Namespace::getTalk( Namespace::getUser() ) ) . ":{$name}",
238 if ( 0 != $wgUser->getNewtalk() ) { $tl .= " *"; }
240 $s .= $this->makeKnownLink( $wgContLang->getNsText(
241 Namespace::getUser() ) . ":{$name}", wfMsg( "mypage" ) )
243 . $sep . $this->specialLink( "watchlist" )
244 . $sep . $this->makeKnownLink( $wgContLang->specialPage( "Contributions" ),
245 wfMsg( "mycontris" ), "target=" . wfUrlencode($wgUser->getName() ) )
246 . $sep . $this->specialLink( "preferences" )
247 . $sep . $this->specialLink( "userlogout" );
249 $s .= $this->specialLink( "userlogin" );
252 $s .= $this->menuHead( "qbspecialpages" )
253 . $this->specialLink( "newpages" )
254 . $sep . $this->specialLink( "imagelist" )
255 . $sep . $this->specialLink( "statistics" )
256 . $sep . $this->bugReportsLink();
257 if ( 0 != $wgUser->getID() && !$wgDisableUploads ) {
258 $s .= $sep . $this->specialLink( "upload" );
260 global $wgSiteSupportPage;
261 if( $wgSiteSupportPage) {
262 $s .= $sep."<a href=\"".htmlspecialchars($wgSiteSupportPage)."\" class =\"internal\">"
263 .wfMsg( "sitesupport" )."</a>";
266 $s .= $sep . $this->makeKnownLink( $wgContLang->specialPage( "Specialpages" ), wfMsg("moredotdotdot") );
268 $s .= $sep . "\n</div>\n";
272 function menuHead( $key )
274 $s = "\n<h6>" . wfMsg( $key ) . "</h6>";
278 function searchForm( $label = "" )
282 $search = $wgRequest->getText( 'search' );
283 $action = $this->escapeSearchLink();
284 $s = "<form id=\"search\" method=\"get\" class=\"inline\" action=\"$action\">";
285 if ( "" != $label ) { $s .= "{$label}: "; }
287 $s .= "<input type='text' name=\"search\" size='14' value=\""
288 . htmlspecialchars(substr($search,0,256)) . "\" />"
289 . "<br /><input type='submit' name=\"go\" value=\"" . htmlspecialchars( wfMsg( "go" ) ) . "\" /> <input type='submit' name=\"fulltext\" value=\"" . htmlspecialchars( wfMsg( "search" ) ) . "\" /></form>";