template = 'HTMLDumpTemplate'; } function buildSidebar() { $sections = parent::buildSidebar(); $badMessages = array( 'recentchanges-url', 'randompage-url' ); $badUrls = array(); foreach ( $badMessages as $msg ) { $badUrls[] = self::makeInternalOrExternalUrl( wfMsgForContent( $msg ) ); } foreach ( $sections as $heading => $section ) { foreach ( $section as $index => $link ) { if ( in_array( $link['href'], $badUrls ) ) { unset( $sections[$heading][$index] ); } } } return $sections; } function buildContentActionUrls() { global $wgHTMLDump; $content_actions = array(); $nskey = $this->getNameSpaceKey(); $content_actions[$nskey] = $this->tabAction( $this->mTitle->getSubjectPage(), $nskey, !$this->mTitle->isTalkPage() ); $content_actions['talk'] = $this->tabAction( $this->mTitle->getTalkPage(), 'talk', $this->mTitle->isTalkPage(), '', true); if ( isset( $wgHTMLDump ) ) { $content_actions['current'] = array( 'text' => wfMsg( 'currentrev' ), 'href' => str_replace( '$1', wfUrlencode( $this->mTitle->getPrefixedDBkey() ), $wgHTMLDump->oldArticlePath ), 'class' => false ); } return $content_actions; } function makeBrokenLinkObj( &$nt, $text = '', $query = '', $trail = '', $prefix = '' ) { if ( !isset( $nt ) ) { return "{$prefix}{$text}{$trail}"; } if ( $nt->getNamespace() == NS_CATEGORY ) { # Determine if the category has any articles in it $dbr = wfGetDB( DB_SLAVE ); $hasMembers = $dbr->selectField( 'categorylinks', '1', array( 'cl_to' => $nt->getDBkey() ), __METHOD__ ); if ( $hasMembers ) { return $this->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix ); } } if ( $text == '' ) { $text = $nt->getPrefixedText(); } return $prefix . $text . $trail; } } /** * @todo document * @addtogroup Skins */ class HTMLDumpTemplate extends QuickTemplate { /** * Template filter callback for MonoBook skin. * Takes an associative array of data set from a SkinTemplate-based * class, and a wrapper for MediaWiki's localization database, and * outputs a formatted page. * * @private */ function execute() { wfSuppressWarnings(); ?> html('headlinks') ?> <?php $this->text('pagetitle') ?> data['jsvarurl' ]) { ?> data['pagecss' ]) { ?> data['usercss' ]) { ?> data['userjs' ]) { ?> data['userjsprev']) { ?> data['nsclass' ]) { ?>class="text('nsclass') ?>">
data['sitenotice']) { ?>
html('sitenotice') ?>

data['displaytitle']!=""?$this->html('title'):$this->text('title') ?>

msg('tagline') ?>

html('subtitle') ?>
data['undelete']) { ?>
html('undelete') ?>
data['newtalk'] ) { ?>
html('newtalk') ?>
html('bodytext') ?> data['catlinks']) { ?>
Views
    data['content_actions'] as $key => $action) { ?>
  • class="" >
data['sidebar'] as $bar => $cont) { ?>
    $val) { ?>
data['language_urls'] ) { ?>
msg('otherlanguages') ?>
    data['language_urls'] as $langlink) { ?>