setArticleBodyOnly( true ); $wgOut->addSecondaryWikitext( $this->getContent() ); } function view() { global $wgOut, $wgShowEXIF; $this->img = new Image( $this->mTitle ); if( $this->mTitle->getNamespace() == NS_IMAGE ) { if ($wgShowEXIF && $this->img->exists()) { $exif = $this->img->getExifData(); $showmeta = count($exif) ? true : false; } else { $exif = false; $showmeta = false; } if ($this->img->exists()) $wgOut->addHTML($this->showTOC($showmeta)); $this->openShowImage(); # No need to display noarticletext, we use our own message, output in openShowImage() if( $this->getID() ) { Article::view(); } else { # Just need to set the right headers $wgOut->setArticleFlag( true ); $wgOut->setRobotpolicy( 'index,follow' ); $wgOut->setPageTitle( $this->mTitle->getPrefixedText() ); $this->viewUpdates(); } # Show shared description, if needed if( $this->mExtraDescription ) { $fol = wfMsg( 'shareddescriptionfollows' ); if( $fol != '-' ) { $wgOut->addWikiText( $fol ); } $wgOut->addHTML( '
' ); } $this->closeShowImage(); $this->imageHistory(); $this->imageLinks(); if( $exif ) { global $wgStylePath, $wgStyleVersion; $expand = htmlspecialchars( wfEscapeJsString( wfMsg( 'metadata-expand' ) ) ); $collapse = htmlspecialchars( wfEscapeJsString( wfMsg( 'metadata-collapse' ) ) ); $wgOut->addHTML( "' );
}
$wgOut->addHTML( ' ' . $anchoropen .
" ' );
if ( $this->img->isMultipage() ) {
$count = $this->img->pageCount();
if ( $page > 1 ) {
$label = $wgOut->parse( wfMsg( 'imgmultipageprev' ), false );
$link = $sk->makeLinkObj( $this->mTitle, $label, 'page='. ($page-1) );
$this->img->selectPage( $page - 1 );
$thumb1 = $sk->makeThumbLinkObj( $this->img, $link, $label, 'none' );
} else {
$thumb1 = '';
}
if ( $page < $count ) {
$label = wfMsg( 'imgmultipagenext' );
$this->img->selectPage( $page + 1 );
$link = $sk->makeLinkObj( $this->mTitle, $label, 'page='. ($page+1) );
$thumb2 = $sk->makeThumbLinkObj( $this->img, $link, $label, 'none' );
} else {
$thumb2 = '';
}
$select = '';
$wgOut->addHTML( ' |
' . wfMsg( "nolinkstoimage" ) . "
\n" ); return; } $wgOut->addHTML( '' . wfMsg( 'linkstoimage' ) . "
\n" . wfMsg( 'imghistlegend' ) . "
\n".'