mImages=array(); } function add( $image, $text='' ) { $this->mImages[] = array( &$image, $text ); } function toHTML() { global $wgLang, $wgUser; $sk = $wgUser->getSkin(); $s = ''; $i = 0; foreach ( $this->mImages as $pair ) { $img =& $pair[0]; $text = $pair[1]; $name = $img->getName(); $nt = $img->getTitle(); //TODO //$ul = $sk->makeLink( $wgLang->getNsText( Namespace::getUser() ) . ":{$ut}", $ut ); $ilink = '' . $nt->getText() . ''; $nb = wfMsg( "nbytes", $wgLang->formatNum( $img->getSize() ) ); $s .= ($i%4==0) ? '' : ''; $s .= '' . (($i%4==3) ? '' : ''); $i++; } $s .= '
' . ''. '
' . '
' . '(' . $sk->makeKnownLinkObj( $nt, wfMsg( "imgdesc" ) ) . ") {$ilink}
{$text}{$nb}
" ; $s .= '
'; return $s; } } //class } // defined( 'MEDIAWIKI' ) ?>