BUG#419 Use $wgNavigationLinks for quickbar links, like in MonoBook
[lhc/web/wiklou.git] / skins / Standard.php
1 <?php
2 /**
3 * See skin.doc
4 *
5 * @todo document
6 * @package MediaWiki
7 * @subpackage Skins
8 */
9
10 /**
11 * @todo document
12 * @package MediaWiki
13 * @subpackage Skins
14 */
15 class SkinStandard extends Skin {
16
17 /**
18 *
19 */
20 function getHeadScripts() {
21 global $wgStylePath;
22
23 $s = parent::getHeadScripts();
24 if ( 3 == $this->qbSetting() ) { # Floating left
25 $s .= "<script language='javascript' type='text/javascript' " .
26 "src='{$wgStylePath}/common/sticky.js'></script>\n";
27 }
28 return $s;
29 }
30
31 /**
32 *
33 */
34 function getUserStyles() {
35 global $wgStylePath;
36 $s = '';
37 if ( 3 == $this->qbSetting() ) { # Floating left
38 $s .= "<style type='text/css'>\n" .
39 "@import '{$wgStylePath}/common/quickbar.css';\n</style>\n";
40 }
41 $s .= parent::getUserStyles();
42 return $s;
43 }
44
45 /**
46 *
47 */
48 function doGetUserStyles() {
49 global $wgUser, $wgOut, $wgStylePath;
50
51 $s = parent::doGetUserStyles();
52 $qb = $this->qbSetting();
53
54 if ( 2 == $qb ) { # Right
55 $s .= "#quickbar { position: absolute; top: 4px; right: 4px; " .
56 "border-left: 2px solid #000000; }\n" .
57 "#article { margin-left: 4px; margin-right: 152px; }\n";
58 } else if ( 1 == $qb || 3 == $qb ) {
59 $s .= "#quickbar { position: absolute; top: 4px; left: 4px; " .
60 "border-right: 1px solid gray; }\n" .
61 "#article { margin-left: 152px; margin-right: 4px; }\n";
62 }
63 return $s;
64 }
65
66 /**
67 *
68 */
69 function getBodyOptions() {
70 $a = parent::getBodyOptions();
71
72 if ( 3 == $this->qbSetting() ) { # Floating left
73 $qb = "setup(\"quickbar\")";
74 if($a["onload"]) {
75 $a["onload"] .= ";$qb";
76 } else {
77 $a["onload"] = $qb;
78 }
79 }
80 return $a;
81 }
82 }
83
84 ?>