removed non-matching wfProfileOut() calls
[mediawiki.git] / includes / SkinStandard.php
blob929fc3e918270e898cbb518c9d9a843892f169ff
1 <?php
2 # See skin.doc
4 class SkinStandard extends Skin {
6 function getHeadScripts()
8 global $wgStylePath;
10 $s = parent::getHeadScripts();
11 if ( 3 == $this->qbSetting() ) { # Floating left
12 $s .= "<script language='javascript' type='text/javascript' " .
13 "src='{$wgStylePath}/sticky.js'></script>\n";
15 return $s;
18 function getUserStyles()
20 global $wgStylePath;
22 $s = parent::getUserStyles();
23 if ( 3 == $this->qbSetting() ) { # Floating left
24 $s .= "<style type='text/css'>\n" .
25 "@import '{$wgStylePath}/quickbar.css';\n</style>\n";
27 return $s;
30 function doGetUserStyles()
32 global $wgUser, $wgOut, $wgStylePath;
34 $s = parent::doGetUserStyles();
35 $qb = $this->qbSetting();
37 if ( 2 == $qb ) { # Right
38 $s .= "#quickbar { position: absolute; top: 4px; right: 4px; " .
39 "border-left: 2px solid #000000; }\n" .
40 "#article { margin-left: 4px; margin-right: 152px; }\n";
41 } else if ( 1 == $qb || 3 == $qb ) {
42 $s .= "#quickbar { position: absolute; top: 4px; left: 4px; " .
43 "border-right: 1px solid gray; }\n" .
44 "#article { margin-left: 152px; margin-right: 4px; }\n";
46 return $s;
49 function getBodyOptions()
51 $a = parent::getBodyOptions();
53 if ( 3 == $this->qbSetting() ) { # Floating left
54 $qb = "setup(\"quickbar\")";
55 if($a["onload"]) {
56 $a["onload"] .= ";$qb";
57 } else {
58 $a["onload"] = $qb;
61 return $a;