zenphoto forums » Usage Support

How to click image and download full size?

(3 posts)
  1. PeterM

    Joined: Feb '08
    Posts: 25

    We're talking about the image view here. When hovering over the inmage, I get the "Next Photo/Previous Photo" flash up which is good, but not quite what I would like. I'd prefer to click on the image and it prompt you to download the full version. So I found the following code in "image.php":

    <div id="prevnext">
    <?php if (hasPrevImage()) { ?>
    <div id="prev"><span class="thumb"><span>
    <em style="background-image:url('<?php echo getPrevImageThumb(); ?>')"><a href="<?php echo getPrevImageURL();?>" accesskey="z" style="background:#fff;"><strong style="width:190px; height:300px;">Previous: </strong>Crescent</a></em></span></span></div>
    <?php } if (hasNextImage()) { ?>
    <div id="next"><span class="thumb"><span>
    <em style="background-image:url('<?php echo getNextImageThumb(); ?>')"><a href="<?php echo getNextImageURL();?>" accesskey="x" style="background:#fff;"><strong style="width:190px; height:300px;">Next: </strong>Sagamor</a></em></span></span></div>
    <?php } ?>

    Now this is obviously the code. I could cheat and just place the code in both the next and previous sections so which ever is clicked, it will download the full size, but i'd prefer to make it work properly than a fix.

    Code for full size download:
    if (getImageEXIFData()) {echo "<a href=\"#TB_inline?height=345&width=300&inlineId=imagemetadata\" title=\"Image Info\" class=\"thickbox\">Image Info</a>";
    printImageMetadata('', false);
    ?> / <a href="<?php echo getProtectedImageURL();?>" title="<?php echo getImageTitle();?>">Full Size</a>

    Does anyone have any pointers, i'd be very grateful :)

    Posted 9 years ago #
  2. Zenphoto development team

    Zenphoto team
    Joined: Jul '07
    Posts: 16,848

    Could you please tell which theme you are using?

    The download is an option in the admin options.

    Don't forget to read the Forum rules and usage resources
    Posted 9 years ago #
  3. PeterM

    Joined: Feb '08
    Posts: 25

    Sorry, it is the Stop Design theme. I have managed to figure it out by doing the following:

    <div class="main" <?php echo $wide; ?>>
    <?php if ($show = !checkForPassword()) { ?>
    <p id="photo">
    <a href="<?php echo getProtectedImageURL();?>" title="<?php echo getImageTitle();?>">
    <?php printCustomSizedImage(getImageTitle(), null, $ls?480:null, $ls?null:480); ?>
    <?php } ?>

    I (once again!) posted a bit too soon :P

    Posted 9 years ago #

RSS feed for this topic


You must log in to post.