Member
Member
Roland   2020-11-12, 18:58
#1
Hello !
I'm using a "a href" tag on every picture so user can quickly switch to the next album image (on image.php).
But of course, when it's a video, there is a problem. If you click on play, the page is changing because of the link ^^'.
Is there any way to ad a php"if" for filtering andremove the link. Thanks !



<div class="picture_container">
<?php if (hasNextImage()) { ?>

<?php printCustomSizedImage(getBareImageTitle(), NULL, 2200, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false); ?>

<?php } else { ?>

<?php printCustomSizedImage(getBareImageTitle(), NULL, 2200, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false); ?>

<?php }
?>

</div>
Administrator
Administrator
acrylian   2020-11-12, 19:06
#2
Yes, of course ;-) You can use this for providing diffferentt HTML for each:

if (isImagePhoto()) {
// "real" image
} else {
// non "image" image like video, audio or else
}



Member
Member
Roland   2020-11-12, 19:54
#3
Thank you acrylian !
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.