diff --git a/DeepSea.php b/DeepSea.php index 08db041..95ece6c 100644 --- a/DeepSea.php +++ b/DeepSea.php @@ -1,59 +1,56 @@ __FILE__, 'name' => 'Deep Sea', 'author' => array( 'UltrasonicNXT', 'modified from Vector (Trevor Parscal', 'Roan Kattouw', 'Nimish Gautam', 'Adam Miller)' ), 'descriptionmsg' => 'deepsea-desc', 'url' => "url", ); // Autoload the skin class, make it a valid skin, set up i18n, set up CSS & JS // (via ResourceLoader) $skinID = basename( dirname( __FILE__ ) ); $dir = dirname( __FILE__ ) . '/'; // The first instance must be strtolower()ed so that useskin=deepsea works and // so that it does *not* force an initial capital (i.e. we do NOT want // useskin=DeepSea) and the second instance is used to determine the name of // *this* file. $wgValidSkinNames[strtolower( $skinID )] = 'DeepSea'; $wgAutoloadClasses['SkinDeepSea'] = $dir . 'DeepSea.skin.php'; $wgAutoloadClasses['DeepSeaTemplate'] = $dir . 'DeepSea.skin.php'; -$wgExtensionMessagesFiles['SkinDeepSea'] = $dir . 'DeepSea.i18n.php'; +//$wgExtensionMessagesFiles['SkinDeepSea'] = $dir . 'DeepSea.i18n.php'; -$wgHooks['OutputPageBodyAttributes'][] = 'DeepSeaTemplate::addToBody'; +//$wgHooks['OutputPageBodyAttributes'][] = 'DeepSeaTemplate::addToBody'; +$bmProject = "en"; $wgResourceModules['skins.deepsea'] = array( 'styles' => array( "skins/common/commonElements.css" => array( 'media' => 'screen' ), "skins/common/commonContent.css" => array( 'media' => 'screen' ), "skins/common/commonInterface.css" => array( 'media' => 'screen' ), "skins/DeepSea/deepsea/screen.css" => array( 'media' => 'screen' ), "skins/DeepSea/deepsea/big.css" => array( 'media' => 'only screen and (min-width: 800px), only screen and (min-device-width: 800px)' ), "skins/DeepSea/deepsea/small.css" => array( 'media' => 'only screen and (max-width: 800px), only screen and (max-device-width: 800px)' ), "skins/DeepSea/deepsea/interactive.css" => array( 'media' => 'screen' ), - "skins/common/forums.css" => array( 'media' => 'screen' ), "skins/DeepSea/deepsea/projects/$bmProject.css" => array( 'media' => 'screen' ) ), 'scripts' => array( "skins/DeepSea/deepsea/deepsea.js", - "skins/common/foes.js" ) -); \ No newline at end of file +); diff --git a/DeepSea.skin.php b/DeepSea.skin.php index 0f6593d..f232773 100644 --- a/DeepSea.skin.php +++ b/DeepSea.skin.php @@ -1,600 +1,593 @@ getRequest()->getFuzzyBool( 'debug' ) ? '' : '.min'; $out->addHeadItem( 'csshover', '" ); $out->addMeta('viewport', 'width=device-width'); $out->addModuleScripts( 'skins.deepsea' ); - + $path = $wgLocalStylePath; - $screen = array( - 'href' => "$path/deepsea/screen.css", - 'rel' => 'stylesheet', - 'type' => 'text/css', - 'media' => 'only screen' - ); - //$out->addLink($screen); //$out->addLink($big); - - addTopElements($out); + +// addTopElements($out); } /** * Load skin and user CSS files in the correct order * fixes bug 22916 * @param $out OutputPage object */ function setupSkinUserCss( OutputPage $out ){ parent::setupSkinUserCss( $out ); $out->addModuleStyles( 'skins.deepsea' ); global $wgUser; $user = $wgUser->getName(); $globalcss = "meta.brickimedia.org/index.php/User:$user/global.css"; $wgResourceModules['skins.deepsea']['styles'][$globalcss] = array( 'media' => 'screen' ); } } /** * QuickTemplate class for Deep sea skin * @ingroup Skins */ class DeepSeaTemplate extends BaseTemplate { /* Functions */ /** * Outputs the entire contents of the (X)HTML page */ public function execute() { - addBottomElements($this); +// addBottomElements($this); global $wgVectorUseIconWatch; // Build additional attributes for navigation urls $nav = $this->data['content_navigation']; if ( $wgVectorUseIconWatch ) { $mode = $this->getSkin()->getTitle()->userIsWatching() ? 'unwatch' : 'watch'; if ( isset( $nav['actions'][$mode] ) ) { $nav['views'][$mode] = $nav['actions'][$mode]; $nav['views'][$mode]['class'] = rtrim( 'icon ' . $nav['views'][$mode]['class'], ' ' ); $nav['views'][$mode]['primary'] = true; unset( $nav['actions'][$mode] ); } } $xmlID = ''; foreach ( $nav as $section => $links ) { foreach ( $links as $key => $link ) { if ( $section == 'views' && !( isset( $link['primary'] ) && $link['primary'] ) ) { $link['class'] = rtrim( 'collapsible ' . $link['class'], ' ' ); } $xmlID = isset( $link['id'] ) ? $link['id'] : 'ca-' . $xmlID; $nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId( $xmlID ) . '"'; if ( $link['class'] ) { $nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars( $link['class'] ) . '"'; unset( $nav[$section][$key]['class'] ); } if ( isset( $link['tooltiponly'] ) && $link['tooltiponly'] ) { $nav[$section][$key]['key'] = Linker::tooltip( $xmlID ); } else { $nav[$section][$key]['key'] = Xml::expandAttributes( Linker::tooltipAndAccesskeyAttribs( $xmlID ) ); } } } $this->data['namespace_urls'] = $nav['namespaces']; $this->data['view_urls'] = $nav['views']; $this->data['action_urls'] = $nav['actions']; $this->data['variant_urls'] = $nav['variants']; // Reverse horizontally rendered navigation elements if ( $this->data['rtl'] ) { $this->data['view_urls'] = array_reverse( $this->data['view_urls'] ); $this->data['namespace_urls'] = array_reverse( $this->data['namespace_urls'] ); $this->data['personal_urls'] = array_reverse( $this->data['personal_urls'] ); } //Get rid of studs if not wanted $studs = true; - +/* // AD CODES ============================================== //$ad: 0 = none; 1 = side; 2 = bottom; $haveAds = true; if($_SERVER['SERVER_NAME'] == "adams-site.x10.mx"){ $haveAds = false; } - global $IP; - require_once( $IP . '/extensions/MobileDetect/MobileDetect.php' ); +// global $IP; +// require_once( $IP . '/extensions/MobileDetect/MobileDetect.php' ); if(mobiledetect()){ $haveAds = false; } if ($haveAds){ $body = $this->data['bodycontent']; if (strlen($body) > 4000){ $ad = 1; } else { $ad = 2; } } else { $ad = 0; } - +*/ // Output HTML Page $this->html( 'headelement' ); ?>