/** * Returns a properly formatted image link that opens a LightBox2/Slimbox * * @param string $image_link Can be the image src or a complete image tag * @param string $text The Link Text, e.g. 'Click here!' * @param string $title The Link title, will be used as Image Caption * @param string $image_group The image group name when you want to use the gallery functionality * @param string $mootools Set to 'true' if you're using slimbox or another MooTools based image viewing library * @return string */ function getLightboxImageLink($image_link, $text, $title = '', $image_group = '') { vmCommonHTML::loadSlimBox(); if ($image_group) { $image_group = '[' . $image_group . ']'; } $link = vmCommonHTML::hyperLink($image_link, $text, '', $title, 'rel="lightbox' . $image_group . '"'); return $link; }