mImages=array(); } /** * Add an image to the gallery. * * @param Image $image Image object that is added to the gallery * @param string $text Additional text to be shown. The name and size of the image are always shown. */ function add( $image, $text='' ) { $this->mImages[] = array( &$image, $text ); } /** * isEmpty() returns false iff the gallery doesn't contain any images */ function isEmpty() { return empty( $this->mImages ); } /** * Return a HTML representation of the image gallery * * For each image in the gallery, display * - a thumbnail * - the image name * - the additional text provided when adding the image * - the size of the image * */ function toHTML() { global $wgLang, $wgContLang, $wgUser; $sk = $wgUser->getSkin(); $s = '
' .
'
{$text}{$nb} " ; $s .= ' | ' . (($i%4==3) ? '