skinname = 'vector'; $this->stylename = 'vector'; $this->template = 'VectorTemplate'; } /** * Defines CSS files to be included * @param object $out Output page to add styles to */ public function setupSkinUserCss( OutputPage $out ) { global $wgContLang; // Append to the default screen common & print styles... if ( $wgContLang->isRTL() ) { $out->addStyle( 'vector/main-rtl.css', 'screen' ); } else { $out->addStyle( 'vector/main-ltr.css', 'screen' ); } // Add common styles parent::setupSkinUserCss( $out ); } } /** * QuickTemplate class for Vector skin * @ingroup Skins */ class VectorTemplate extends QuickTemplate { /* Members */ /** * @var Cached skin object */ var $skin; /* Functions */ /** * Outputs the entire contents of the XHTML page */ public function execute() { global $wgRequest, $wgUseTwoButtonsSearchForm; $this->skin = $this->data['skin']; $action = $wgRequest->getText( 'action' ); // Suppress warnings to prevent notices about missing indexes in // $this->data (is this really the best way to handle this?) wfSuppressWarnings(); // Build additional attributes for navigation urls $nav = $this->skin->buildNavigationUrls(); foreach ( $nav as $section => $links ) { foreach ( $links as $key => $link ) { $xmlID = $key; if ( isset( $link['context'] ) && $link['context'] == 'subject' ) { $xmlID = 'ca-nstab-' . $xmlID; } else if ( isset( $link['context'] ) && $link['context'] == 'talk' ) { $xmlID = 'ca-talk'; } else { $xmlID = 'ca-' . $xmlID; } $nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId( $xmlID ) . '"'; if ( $nav[$section][$key]['class'] ) { $nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars( $link['class'] ) . '"'; unset( $nav[$section][$key]['class'] ); } // We don't want to give the watch tab an accesskey if the page is // being edited, because that conflicts with the accesskey on the // watch checkbox. We also don't want to give the edit tab an // accesskey, because that's fairly superfluous and conflicts with // an accesskey (Ctrl-E) often used for editing in Safari. if ( in_array( $action, array( 'edit', 'submit' ) ) && in_array( $key, array( 'edit', 'watch', 'unwatch' ) ) ) { $nav[$section][$key]['key'] = $this->skin->tooltip( $xmlID ); } else { $nav[$section][$key]['key'] = $this->skin->tooltipAndAccesskey( $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']; // Build additional attributes for personal_urls foreach ( $this->data['personal_urls'] as $key => $item) { $this->data['personal_urls'][$key]['attributes'] = ' id="' . Sanitizer::escapeId( "pt-$key" ) . '"'; if ( $item['active'] ) { $this->data['personal_urls'][$key]['attributes'] .= ' class="active"'; } $this->data['personal_urls'][$key]['key'] = $this->skin->tooltipAndAccesskey('pt-'.$key); } // Generate additional footer links $footerlinks = array( 'info' => array( 'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright', 'tagline', ), 'places' => array( 'privacy', 'about', 'disclaimer', ), ); // Build list of valid footer links $validFooterLinks = array(); foreach( $footerlinks as $category => $links ) { $validFooterLinks[$category] = array(); foreach( $links as $link ) { if( isset( $this->data[$link] ) && $this->data[$link] ) { $validFooterLinks[$category][] = $link; } } } // Begin content output ?> data['xhtmlnamespaces'] as $tag => $ns): ?>xmlns:xml:lang="text('lang') ?>" lang="text('lang') ?>" dir="text('dir') ?>"> <?php $this->text('pagetitle') ?> html('headlinks') ?> html('csslinks') ?> data ); ?> html('headscripts') ?> data['jsvarurl']): ?> data['pagecss']): ?> data['usercss']): ?> data['userjs']): ?> data['userjsprev']): ?> data['trackbackhtml']): ?> data['trackbackhtml']; ?> data['body_ondblclick']): ?> ondblclick="text('body_ondblclick') ?>" data['body_onload']): ?> onload="text('body_onload') ?>" class="mediawiki text('dir') ?> text('pageclass') ?> text('skinnameclass') ?>">
data['sitenotice']) { ?>
html('sitenotice') ?>

html('title') ?>

msg('tagline') ?>

html('subtitle') ?>
data['undelete']): ?>
html('undelete') ?>
data['newtalk'] ): ?>
html('newtalk') ?>
data['showjumplinks']): ?> html('bodytext') ?> data['catlinks']) { $this->html('catlinks'); } ?> data['dataAfterContent']) { $this->html('dataAfterContent'); } ?>
data['sidebar']; $sidebar['TOOLBOX'] = ( !isset( $sidebar['TOOLBOX'] ) ); $sidebar['LANGUAGES'] = ( !isset( $sidebar['LANGUAGES'] ) ); foreach ( $sidebar as $name => $content ) { switch( $name ) { case 'SEARCH': break; case 'TOOLBOX': $this->toolBox(); break; case 'LANGUAGES': $this->languageBox(); break; default: $this->customBox( $name, $content ); break; } } ?>
html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?> html( 'reporttime' ) ?> data['debug'] ): ?>
html('userlangattributes') ?>>msg( 'toolbox' ) ?>
data['language_urls'] ) { ?>
html('userlangattributes') ?>>msg( 'otherlanguages' ) ?>
    data['language_urls'] as $langlink ): ?>
skin->tooltip( 'p-' . $bar ) ?>>
html('userlangattributes') ?>>