singapore: the smallest big galery
home » forum » General » Link to Full Size image?

You are not logged in.

#1 2006-04-06 08:21:20

JQ
Guest

Link to Full Size image?

I have my gallery set up so it resizes the image to fit on my page, but am wondering if I can staill have a link for the user to download the full version?

Is this possible?

How can I construct a link which contains the full path to that image?

 

#2 2006-04-06 15:50:15

pavian
Moderator

Re: Link to Full Size image?

Offline

 

#3 2006-04-06 16:51:23

tamlyn
Lead Developer

Re: Link to Full Size image?

To just link the image without the popup you can use $sg->imageRealURL() to get the URL of the unresized image.

Offline

 

#4 2006-04-06 17:15:28

JQ
Guest

Re: Link to Full Size image?

Awesome!
Thanks alot!

 

#5 2006-06-01 02:01:08

SimonEast
Member

Re: Link to Full Size image?

Tamlyn's code didn't actually work for me.

But this is the code I used for this (place in your image.tpl.php)...

Code:

        <? if ($sg->image->realURL() != $sg->image->imageURL()) { ?>
        <p style="text-align: center"><a href="<?= $sg->image->realURL() ?>">View Full Size Image</a></p>
        <? } ?>

The first and last lines (the IF statement) is optional.  I just use it to hide the "View Full Size" link if the one displayed on the page is already full size.

Simon.

Offline

 

#6 2006-07-12 10:13:15

rossh
Developer

Re: Link to Full Size image?

This functionality has been added to the dev version of Modern and can be enabled/disabled via template.ini

Offline

 

#7 2006-07-12 19:41:04

Paul
Member

Re: Link to Full Size image?

Ross, can you get a link put to your template on the Templates page here? I have real trouble finding the link to it otherwise (I have to search my browser's history..!)

(Unless I'm missing the obvious and there's a link to your template somewhere right under my nose...)

Offline

 

#8 2006-07-12 21:25:25

rossh
Developer

Re: Link to Full Size image?

Hehe.. well the dev one is in various stages of brokenness.. so  if I post it I am worried that I will cause lots of bug reports to the forums... I'll try and have it in a semi-solid state by end of the weekend and put it at http://www.abitcloser.com/projects/singapore

smile

Offline

 

#9 2006-07-13 03:10:02

eddiejanzer
Member

Re: Link to Full Size image?

is there a link to instructions to view larger image as popup.  I know some people hate em (not I).  I used the code above and it was so simple.  I don't understand the language but I can copy and paste, thanks

Offline

 

#10 2006-07-13 03:49:02

eddiejanzer
Member

Re: Link to Full Size image?

well,  I followed the link above, and got a popup. I'm psyched, but... I noticed the popup does not jump to the front again when you click a new image.  I added this to image.class

function popUp($class = "sgThumbnailAlbum", $type = "album")
  {
    $ret =  '<a href="'.$this->realURL().'" onclick="';
    $ret .= "window.open('".$this->realURL()."','','toolbar=0,resizable=1,";
    $ret .= "width=".($this->realWidth()+20).",";
    $ret .= "height=".($this->realHeight()+20)."');";
    $ret .= "return false;\">".$this->imageHTML($class, $type)."</a>";
    return $ret;
  }

is there anything I can add to this so that the popup does not have to be closed to come to the front on new click (not just adding more popups behind the new one), thanks

Offline

 

#11 2006-07-13 04:42:01

rossh
Developer

Re: Link to Full Size image?

I just use the target="_new" to create a new window without the need for javascript...

Offline

 

#12 2006-07-13 04:52:15

eddiejanzer
Member

Re: Link to Full Size image?

sorry, where do you put target="_new",  and that opens just the large image

Offline

 

#13 2006-07-13 05:06:08

rossh
Developer

Re: Link to Full Size image?

<a href="foobar" target="_new">

This will always open a new window... it won't open a new full image in the old full image window

Offline

 

#14 2006-07-13 05:20:19

eddiejanzer
Member

Re: Link to Full Size image?

I'm not use to working with php at all. Do I place that in the image.tpl.php file, and where?  I'd like to try it out, see how it plays. Thanks for the support.

Offline

 

#15 2006-07-13 05:31:27

rossh
Developer

Re: Link to Full Size image?

Yup, basically use SimonEast's example, but you can add the target="_new" in a href

Offline