Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

SkinCologneBlue.php

Go to the documentation of this file.
00001 <?php 00002 # See skin.doc 00003 00004 class SkinCologneBlue extends Skin { 00005 00006 function getStylesheet() 00007 { 00008 return "cologneblue.css"; 00009 } 00010 function getSkinName() { 00011 return "cologneblue"; 00012 } 00013 00014 function doBeforeContent() 00015 { 00016 global $wgUser, $wgOut, $wgTitle; 00017 00018 $s = ""; 00019 $qb = $this->qbSetting(); 00020 $mainPageObj = Title::newMainPage(); 00021 00022 $s .= "\n<div id='content'>\n<div id='topbar'>" . 00023 "<table width='100%' border='0' cellspacing='0' cellpadding='8'><tr>"; 00024 00025 $s .= "<td class='top' align='left' valign='middle' nowrap='nowrap'>"; 00026 $s .= "<a href=\"" . $mainPageObj->escapeLocalURL() . "\">"; 00027 $s .= "<span id='sitetitle'>" . wfMsg( "sitetitle" ) . "</span></a>"; 00028 00029 $s .= "</td><td class='top' align='right' valign='bottom' width='100%'>"; 00030 $s .= $this->sysLinks(); 00031 $s .= "</td></tr><tr><td valign='top'>"; 00032 00033 $s .= "<font size='-1'><span id='sitesub'>"; 00034 $s .= htmlspecialchars( wfMsg( "sitesubtitle" ) ) . "</span></font>"; 00035 $s .= "</td><td align='right'>" ; 00036 00037 $s .= "<font size='-1'><span id='langlinks'>" ; 00038 $s .= str_replace ( "<br>" , "" , $this->otherLanguages() ); 00039 $cat = $this->getCategoryLinks(); 00040 if( $cat ) $s .= "<br />$cat\n"; 00041 $s .= "<br />" . $this->pageTitleLinks(); 00042 $s .= "</span></font>"; 00043 00044 $s .= "</td></tr></table>\n"; 00045 00046 $s .= "\n</div>\n<div id='article'>"; 00047 00048 $s .= $this->pageTitle(); 00049 $s .= $this->pageSubtitle() . "\n"; 00050 return $s; 00051 } 00052 00053 function doAfterContent() 00054 { 00055 global $wgUser, $wgOut; 00056 00057 $s = "\n</div><br clear='all' />\n"; 00058 00059 $s .= "\n<div id='footer'>"; 00060 $s .= "<table width='98%' border='0' cellspacing='0'><tr>"; 00061 00062 $qb = $this->qbSetting(); 00063 if ( 1 == $qb || 3 == $qb ) { # Left 00064 $s .= $this->getQuickbarCompensator(); 00065 } 00066 $s .= "<td class='bottom' align='center' valign='top'>"; 00067 00068 $s .= $this->bottomLinks(); 00069 $s .= "\n<br />" . $this->makeKnownLink( wfMsg( "mainpage" ) ) . " | " 00070 . $this->aboutLink() . " | " 00071 . $this->searchForm( wfMsg( "qbfind" ) ); 00072 00073 $s .= "\n<br />" . $this->pageStats(); 00074 00075 $s .= "</td>"; 00076 if ( 2 == $qb ) { # Right 00077 $s .= $this->getQuickbarCompensator(); 00078 } 00079 $s .= "</tr></table>\n</div>\n</div>\n"; 00080 00081 if ( 0 != $qb ) { $s .= $this->quickBar(); } 00082 return $s; 00083 } 00084 function doGetUserStyles() 00085 { 00086 global $wgUser, $wgOut, $wgStyleSheetPath; 00087 $s = ''; 00088 $qb = $this->qbSetting(); 00089 00090 if ( 2 == $qb ) { # Right 00091 $s .= "#quickbar { position: absolute; right: 4px; }\n" . 00092 "#article { margin-left: 4px; margin-right: 148px; }\n"; 00093 } else if ( 1 == $qb ) { 00094 $s .= "#quickbar { position: absolute; left: 4px; }\n" . 00095 "#article { margin-left: 148px; margin-right: 4px; }\n"; 00096 } else if ( 3 == $qb ) { # Floating 00097 $s .= "#quickbar { position:absolute; left:4px } \n" . 00098 "#topbar { margin-left: 148px }\n" . 00099 "#article { margin-left:148px; margin-right: 4px; } \n" . 00100 "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;} \n"; # Hides from IE 00101 } 00102 $s .= parent::doGetUserStyles(); 00103 return $s; 00104 } 00105 function sysLinks() 00106 { 00107 global $wgUser, $wgLang, $wgTitle; 00108 $li = $wgLang->specialPage("Userlogin"); 00109 $lo = $wgLang->specialPage("Userlogout"); 00110 00111 $rt = $wgTitle->getPrefixedURL(); 00112 if ( 0 == strcasecmp( urlencode( $lo ), $rt ) ) { 00113 $q = ""; 00114 } else { 00115 $q = "returnto={$rt}"; 00116 } 00117 00118 $s = "" . 00119 $this->makeKnownLink( wfMsg( "mainpage" ), wfMsg( "mainpage" ) ) 00120 . " | " . 00121 $this->makeKnownLink( wfMsg( "aboutpage" ), wfMsg( "about" ) ) 00122 . " | " . 00123 $this->makeKnownLink( wfMsg( "helppage" ), wfMsg( "help" ) ) 00124 . " | " . 00125 $this->makeKnownLink( wfMsg( "faqpage" ), wfMsg("faq") ) 00126 . " | " . 00127 $this->specialLink( "specialpages" ) . " | "; 00128 00129 if ( $wgUser->getID() ) 00130 { 00131 $s .= $this->makeKnownLink( $lo, wfMsg( "logout" ), $q ); 00132 } 00133 else 00134 { 00135 $s .= $this->makeKnownLink( $li, wfMsg( "login" ), $q ); 00136 } 00137 00138 return $s; 00139 } 00140 00141 function quickBar() 00142 { 00143 global $wgOut, $wgTitle, $wgUser, $wgLang, $wgDisableUploads; 00144 00145 $tns=$wgTitle->getNamespace(); 00146 00147 $s = "\n<div id='quickbar'>"; 00148 00149 $sep = "<br />"; 00150 $s .= $this->menuHead( "qbfind" ); 00151 $s .= $this->searchForm(); 00152 00153 $s .= $this->menuHead( "qbbrowse" ) 00154 . $this->mainPageLink() 00155 . $sep . $this->specialLink( "recentchanges" ) 00156 . $sep . $this->specialLink( "randompage" ); 00157 if ( wfMsg ( "currentevents" ) != "-" ) $s .= $sep . $this->makeKnownLink( wfMsg( "currentevents" ), "" ) ; 00158 $s .= "\n"; 00159 00160 if ( $wgOut->isArticle() ) { 00161 $s .= $this->menuHead( "qbedit" ); 00162 $s .= "<strong>" . $this->editThisPage() . "</strong>"; 00163 00164 $s .= $sep . $this->makeKnownLink( wfMsg( "edithelppage" ), wfMsg( "edithelp" ) ); 00165 00166 if ( 0 != $wgUser->getID() ) { 00167 $s .= $sep . $this->moveThisPage(); 00168 } 00169 if ( $wgUser->isSysop() ) { 00170 $dtp = $this->deleteThisPage(); 00171 if ( "" != $dtp ) { 00172 $s .= $sep . $dtp; 00173 } 00174 $ptp = $this->protectThisPage(); 00175 if ( "" != $ptp ) { 00176 $s .= $sep . $ptp; 00177 } 00178 } 00179 $s .= $sep; 00180 00181 $s .= $this->menuHead( "qbpageoptions" ); 00182 $s .= $this->talkLink() 00183 . $sep . $this->commentLink() 00184 . $sep . $this->printableLink(); 00185 if ( 0 != $wgUser->getID() ) { 00186 $s .= $sep . $this->watchThisPage(); 00187 } 00188 00189 $s .= $sep; 00190 00191 $s .= $this->menuHead("qbpageinfo") 00192 . $this->historyLink() 00193 . $sep . $this->whatLinksHere() 00194 . $sep . $this->watchPageLinksLink(); 00195 00196 if ( Namespace::getUser() == $tns || Namespace::getTalk(Namespace::getUser()) == $tns ) { 00197 $id=User::idFromName($wgTitle->getText()); 00198 if ($id != 0) { 00199 $s .= $sep . $this->userContribsLink(); 00200 if ( 0 != $wgUser->getID() ) { 00201 $s .= $sep . $this->emailUserLink(); 00202 } 00203 } 00204 } 00205 $s .= $sep; 00206 } 00207 00208 $s .= $this->menuHead( "qbmyoptions" ); 00209 if ( 0 != $wgUser->getID() ) { 00210 $name = $wgUser->getName(); 00211 $tl = $this->makeKnownLink( $wgLang->getNsText( 00212 Namespace::getTalk( Namespace::getUser() ) ) . ":{$name}", 00213 wfMsg( "mytalk" ) ); 00214 if ( 0 != $wgUser->getNewtalk() ) { $tl .= " *"; } 00215 00216 $s .= $this->makeKnownLink( $wgLang->getNsText( 00217 Namespace::getUser() ) . ":{$name}", wfMsg( "mypage" ) ) 00218 . $sep . $tl 00219 . $sep . $this->specialLink( "watchlist" ) 00220 . $sep . $this->makeKnownLink( $wgLang->specialPage( "Contributions" ), 00221 wfMsg( "mycontris" ), "target=" . wfUrlencode($wgUser->getName() ) ) 00222 . $sep . $this->specialLink( "preferences" ) 00223 . $sep . $this->specialLink( "userlogout" ); 00224 } else { 00225 $s .= $this->specialLink( "userlogin" ); 00226 } 00227 00228 $s .= $this->menuHead( "qbspecialpages" ) 00229 . $this->specialLink( "newpages" ) 00230 . $sep . $this->specialLink( "imagelist" ) 00231 . $sep . $this->specialLink( "statistics" ) 00232 . $sep . $this->bugReportsLink(); 00233 if ( 0 != $wgUser->getID() && !$wgDisableUploads ) { 00234 $s .= $sep . $this->specialLink( "upload" ); 00235 } 00236 global $wgSiteSupportPage; 00237 if( $wgSiteSupportPage) { 00238 $s .= $sep."<a href=\"".htmlspecialchars($wgSiteSupportPage)."\" class =\"internal\">" 00239 .wfMsg( "sitesupport" )."</a>"; 00240 } 00241 00242 $s .= $sep . $this->makeKnownLink( $wgLang->specialPage( "Specialpages" ), wfMsg("moredotdotdot") ); 00243 00244 $s .= $sep . "\n</div>\n"; 00245 return $s; 00246 } 00247 00248 function menuHead( $key ) 00249 { 00250 $s = "\n<h6>" . wfMsg( $key ) . "</h6>"; 00251 return $s; 00252 } 00253 00254 function searchForm( $label = "" ) 00255 { 00256 global $wgRequest; 00257 00258 $search = $wgRequest->getText( 'search' ); 00259 $action = $this->escapeSearchLink(); 00260 $s = "<form id=\"search\" method=\"get\" class=\"inline\" action=\"$action\">"; 00261 if ( "" != $label ) { $s .= "{$label}: "; } 00262 00263 $s .= "<input type='text' name=\"search\" size='14' value=\"" 00264 . htmlspecialchars(substr($search,0,256)) . "\" />" 00265 . "<br /><input type='submit' name=\"go\" value=\"" . htmlspecialchars( wfMsg( "go" ) ) . "\" /> <input type='submit' name=\"fulltext\" value=\"" . htmlspecialchars( wfMsg( "search" ) ) . "\" /></form>"; 00266 00267 return $s; 00268 } 00269 } 00270 00271 ?>

Generated on Tue Jun 29 23:40:07 2004 for Mediawiki by doxygen 1.3.7