]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
added plugin hook for lightbox
authorCash Costello <cash.costello@gmail.com>
Sat, 12 Dec 2009 03:59:20 +0000 (03:59 +0000)
committerCash Costello <cash.costello@gmail.com>
Sat, 12 Dec 2009 03:59:20 +0000 (03:59 +0000)
views/default/object/image.php

index fb7a72ff85ab033077fe64b33759f959a49d2c27..9436c53b5c939b1359ab7512af169c94b14d1bff 100644 (file)
 
 /********************************************************************
  *
- *  simple gallery view - when is this called?
+ *  listing of photos in an album
  *
  *********************************************************************/
                if (!$vars['full']) {
+error_log('hello world!');                     
 ?>
        <div class="tidypics_album_images">
+<?php 
+       // plugins can override the image link to add lightbox code here
+       $image_html = false;
+       $image_html = trigger_plugin_hook('tp_thumbnail_link', 'image', $image, $image_html);
+       
+       if ($image_html) {
+               echo $image_html;
+       } else {
+               // default link to image if no one overrides
+?>
                <a href="<?php echo $image->getURL();?>"><img src="<?php echo $vars['url'];?>mod/tidypics/thumbnail.php?file_guid=<?php echo $image_guid;?>&size=small" alt="thumbnail"/></a>
+<?php  
+       }
+?>
        </div>
 <?php
                } else {