You are here

function theme_galleria_lightbox_link in Galleria 6

Theme the link that opens a lightbox with a Galleria in it. Currently only supports Gallerias built from attached files, not imagefield.

File

./galleria.module, line 228
Turns a node into a Galleria image gallery.

Code

function theme_galleria_lightbox_link($nid, $width, $height, $text) {
  if (!is_numeric($nid) || !is_numeric($width) || !is_numeric($height)) {
    galleria_set_message(t('Invalid arguments passed to theme_galleria_lightbox_link.'), 'error');
    return;
  }
  if (!module_exists('lightbox2')) {
    galleria_set_message(t('Please install the Lightbox2 module to enable this functionality'), 'error');
    return;
  }
  galleria_includes();
  $attribs = array(
    'rel' => 'lightmodal[|width:' . $width . 'px; height:' . $height . 'px;]',
  );
  return l($text, "galleria_html/{$nid}", array(
    'attributes' => $attribs,
    'html' => TRUE,
  ));
}