Hi,
I am trying to change the thumbs_float.php file so that when a user clicks on a thumb, it opens a lightbox with the the larger image instead of going to the display page. I have managed to get the lightbox to pop open with an image, but due to the fact that the code uses "original" to state which image it should load, it loads the last image in the gallery, regardless of what thumb you click on. I have also managed to get it to display "x of x pictures" so i only need to figure this bit out and its done. The code I am using is as follows:
The line of code in question:
<a rel="lightbox[gallery]" href="<?php echo waterMarker::showMarkedImage( $item->name, 'original' ); ?> ">
[Edit] The original code for this line was this:
<a href="<?php echo JRoute::_( "index.php?option=com_rsgallery2&page=inline&id=".$item->id."&Itemid=$Itemid" ); ?>">
The full thumbs_float.php file in its current state:
<?php defined('_JEXEC') or die('Restricted access'); ?>
<?php
$floatDirection = $rsgConfig->get( 'display_thumbs_floatDirection' );
global $Itemid;
?>
<ul id="rsg2-thumbsList">
<?php
foreach( $this->gallery->currentItems() as $item ):
if( $item->type != 'image' )
continue; // we only handle images
$thumb = $item->thumb(); ?>
<li <?php echo "style='float: $floatDirection'"; ?> >
<a rel="lightbox[gallery]" href="<?php echo waterMarker::showMarkedImage( $item->name, 'original' ); ?> ">
<!--<div class="img-shadow">-->
<img alt="<?php echo htmlspecialchars(stripslashes($item->descr), ENT_QUOTES); ?>" src="<?php echo $thumb->url(); ?>" />
<!--</div>-->
<span class="rsg2-clr"></span>
<?php if($rsgConfig->get("display_thumbs_showImgName")): ?>
<br /><span class='rsg2_thumb_name'><?php echo htmlspecialchars(stripslashes($item->title), ENT_QUOTES); ?></span>
<?php endif; ?>
</a>
<?php if( $this->allowEdit ): ?>
<div id="rsg2-adminButtons">
<a href="<?php echo JRoute::_("index.php?option=com_rsgallery2&page=edit_image&id=".$item->id); ?>"><img src="<?php echo JURI::base(); ?>/administrator/images/edit_f2.png" alt="" height="15" /></a>
<a href="#" onClick="if(window.confirm('<?php echo _RSGALLERY_DELIMAGE_TEXT;?>')) location='<?php echo JRoute::_("index.php?option=com_rsgallery2&page=delete_image&id=".$item->id); ?>'"><img src="<?php echo JURI::base(); ?>/administrator/images/delete_f2.png" alt="" height="15" /></a>
</div>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
<div class='rsg2-clr'> </div>
thanks for any help in advance!