Silenced this, $token["pos"] was undefined when parsing '''hi'''''hi'' which created...
[lhc/web/wiklou.git] / includes / SkinStandard.php
1 <?php
2 # See skin.doc
3
4 class SkinStandard extends Skin {
5
6 function getHeadScripts()
7 {
8 global $wgStylePath;
9
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";
14 }
15 return $s;
16 }
17
18 function getUserStyles()
19 {
20 global $wgStylePath;
21
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";
26 }
27 return $s;
28 }
29
30 function doGetUserStyles()
31 {
32 global $wgUser, $wgOut, $wgStylePath;
33
34 $s = parent::doGetUserStyles();
35 $qb = $this->qbSetting();
36
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";
45 }
46 return $s;
47 }
48
49 function getBodyOptions()
50 {
51 $a = parent::getBodyOptions();
52
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;
59 }
60 }
61 return $a;
62 }
63 }
64
65 ?>