Full size image pointing nowhere ( getNextImageURL() )

Hello all.
I'm testing the zenpage theme an encountering a bug I can't troubleshoot by myself:
In image.php i've got that code:
`
<?php if(getOption("Use_thickbox")) {
$boxclass = " class=\"thickbox\"";
$tburl = getUnprotectedImageURL();
} else {
$thickboxclass = "";
$tburl = getFullImageURL();
}

if (!empty($tburl)) {
?>
">
<?php
}//end if

printCustomSizedImageMaxSpace(getBareImageTitle(),950,2000); ?>

<?php
if (!empty($tburl)) {
?>

<?php
}//end if
?>
`
What conditional statement should I use to avoid that getNextImageURL() throws an empty url ( aka when i'm on the last image of a gallery, and make a link to the first image of that gallery )
I've browsed the user guide without finding something useful - i'm lost :$

Thank you very much

Comments

  • I mean something better than
    `

    $Index = getGalleryIndexURL(false);

    if (!empty($tburl) && $next!=($Index."/.html"))

    `
  • acrylian Administrator, Developer
    Your code example is broken. You need to put code within `backticks`.

    I don't understand the $tburl variable or the full image link in this theme has nothing to do with next/prev images. It is simply display the full image in layer box. No next/prev involved in that.

    You did see the `if (hasNextImage())` and `if (hasPrevImage())` parts that also is explained on the theming tutorial? Add an `else` statement to link to the first image if there is no next/prev image.
  • ;) you're right it's broken .
    here it comes again ( WIP )
    `
    <?php if(getOption("Use_thickbox")) {
    $boxclass = " class=\"thickbox\"";
    $tburl = getUnprotectedImageURL();
    } else {
    $thickboxclass = "";
    $tburl = getFullImageURL();
    $First = getFirstImageURL();
    $Last = getlastImageURL();
    $next = getNextImageURL();
    $Index = getGalleryIndexURL(false);
    }

    if (!empty($tburl) && hasNextImage()) {
    ?>
    ">
    <?php
    }else{?>
    ">
    <?php }

    printCustomSizedImageMaxSpace(getBareImageTitle(),950,2000); ?>

    <?php
    if (!empty($tburl) && hasNextImage()) {
    ?>

    <?php
    }//end if
    ?>
    `
    and tadaa!
    hasNextImage() works!
    You rock Acrylian!
    Many thanks!
Sign In or Register to comment.