Filtering videos

Roland Member, Translator

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_detail">
                <div class="picture_container">
                    <?php if (hasNextImage()) { ?>
                <a href="<?php echo html_encode(getNextImageURL()); ?>">
                <?php printCustomSizedImage(getBareImageTitle(), NULL, 2200, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false); ?>
            </a>
                    <?php }  else { ?>
                <a href="<?php echo html_encode(getAlbumURL()); ?>">
                    <?php printCustomSizedImage(getBareImageTitle(), NULL, 2200, NULL, NULL, NULL, NULL, NULL, NULL, NULL, false); ?>
                </a>
                <?php }
                ?>
                                            </div>
        </div>

Comments

  • acrylian Administrator, Developer
    edited November 2020

    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
     }
    
  • Roland Member, Translator

    Thank you acrylian !

Sign In or Register to comment.