collapse

* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Recent Posts

Can't get RSG "Show My Galleries" to work by Dampfnudel
[February 25, 2019, 11:01:55 AM]


Change the order of uploaded images in the gallery by whazzup
[February 19, 2019, 10:37:29 PM]


Upload timeout for large galleries (500 images each) by whazzup
[February 11, 2019, 10:07:25 PM]


Greetings from Ronald Smit by whazzup
[January 06, 2019, 03:39:22 PM]


Pluign and module by whazzup
[June 08, 2018, 11:57:13 PM]


Version 4.4.1 released by whazzup
[May 31, 2018, 04:31:16 PM]


search.html.php refer to rsgsearch.css with a wrong path by whazzup
[January 13, 2018, 08:12:04 PM]


Slow Gallery with many Photos by whazzup
[September 22, 2017, 09:22:33 AM]

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

  • 1 replies
  • 3894 views
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: [Select]
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;

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

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


Chef Groovy
RSGallery2: Legacy - Dev
Test Site: dev.fantasyartwork.net