00001 <?php 00002 # See skin.doc 00003 00004 class SkinStandard extends Skin { 00005 00006 function getHeadScripts() 00007 { 00008 global $wgStylePath; 00009 00010 $s = parent::getHeadScripts(); 00011 if ( 3 == $this->qbSetting() ) { # Floating left 00012 $s .= "<script language='javascript' type='text/javascript' " . 00013 "src='{$wgStylePath}/sticky.js'></script>\n"; 00014 } 00015 return $s; 00016 } 00017 00018 function getUserStyles() 00019 { 00020 global $wgStylePath; 00021 $s = ''; 00022 if ( 3 == $this->qbSetting() ) { # Floating left 00023 $s .= "<style type='text/css'>\n" . 00024 "@import '{$wgStylePath}/quickbar.css';\n</style>\n"; 00025 } 00026 $s .= parent::getUserStyles(); 00027 return $s; 00028 } 00029 00030 function doGetUserStyles() 00031 { 00032 global $wgUser, $wgOut, $wgStylePath; 00033 00034 $s = parent::doGetUserStyles(); 00035 $qb = $this->qbSetting(); 00036 00037 if ( 2 == $qb ) { # Right 00038 $s .= "#quickbar { position: absolute; top: 4px; right: 4px; " . 00039 "border-left: 2px solid #000000; }\n" . 00040 "#article { margin-left: 4px; margin-right: 152px; }\n"; 00041 } else if ( 1 == $qb || 3 == $qb ) { 00042 $s .= "#quickbar { position: absolute; top: 4px; left: 4px; " . 00043 "border-right: 1px solid gray; }\n" . 00044 "#article { margin-left: 152px; margin-right: 4px; }\n"; 00045 } 00046 return $s; 00047 } 00048 00049 function getBodyOptions() 00050 { 00051 $a = parent::getBodyOptions(); 00052 00053 if ( 3 == $this->qbSetting() ) { # Floating left 00054 $qb = "setup(\"quickbar\")"; 00055 if($a["onload"]) { 00056 $a["onload"] .= ";$qb"; 00057 } else { 00058 $a["onload"] = $qb; 00059 } 00060 } 00061 return $a; 00062 } 00063 } 00064 00065 ?>