Changed include path in response to report on #mediawiki. Problem was an aborted...
[mediawiki.git] / includes / SkinStandard.php
blobba367a370d85fb72f07f7beb48b43bd63334877a
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;
21 $s = '';
22 if ( 3 == $this->qbSetting() ) { # Floating left
23 $s .= "<style type='text/css'>\n" .
24 "@import '{$wgStylePath}/quickbar.css';\n</style>\n";
26 $s .= parent::getUserStyles();
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;