Developers corner > Developer Lobby

Modifying 'semantic' template to cause next image to be displayed on click

(1/1)

Ken Chatfield:
Hi there,

I'd like to modify the default 'semantic' template to allow a click on the image to cause the next image in the gallery to be loaded instead of opening a popup with the original image. I've figured out that I need to make changes to the display.class.php file in the template directory around line 278:


--- Code: ---switch ($rsgConfig->get('displayPopup')) {
//No popup
case 0:
?><a title="<?php echo $item->title."<p>".$item->descr."</p>";?>" href="<?php echo SomePHPFunction ?>"><?php
$this->_showImageBox( $item->name, $item->descr );
?>
</a>
<?php
break;

--- End code ---

This should cause an anchor tag to be associated with the generated image when the 'no popup' is chosen on the configuration page in a similar manner to the anchor tags associated when linking to the popup with the imgUtils::getImgOriginal() function. The question is - how do I retrieve the URL of the next image in the gallery programatically (marked by 'somePHPFunction' in the code above)?

Thanks in advance for your help!

Ken

Chef Groovy:
I got stumped on this too, at least trying to do it cleanly.
whats needed is two functions imgUtils::getImageIDNext and getImageIDPrev

once get the ID, rest is all there. 

I'm off work thursday, will mess with it some more


Navigation

[0] Message Index

Go to full version