Link Thumbnails directly to fullsize image (.jpg) Link Thumbnails directly to fullsize image (.jpg)
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Link Thumbnails directly to fullsize image (.jpg)

Started by Garibaldi, January 03, 2008, 08:29:08 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Garibaldi

Hello,

I am looking to modify the code for my thumbnails so that when clicked, the link goes directly to the fullsize jpg image. I need the link to be to the actual jpg and not something like:
displayimage.php?pid=1307&fullsize=1
because this is for a lightbox script.

Thanks a lot.

aliveinindy

My Gallery -People, Kids, Nature, Family, and More
www.aliveinindy.com

Garibaldi

Quote from: aliveinindy on January 06, 2008, 04:19:19 PM
try this
http://forum.coppermine-gallery.net/index.php?topic=34360.0
Thanks for the help, I've tried that but that provides the solution I mentioned above - creating a link with:
displayimage.php?pid=1307&fullsize=1
The lightbox script cannot handle this, it refuses to load the image. It requires a link directly to the .jpg file - not a script that loads the file. Is there a way to do this?

Garibaldi

Here's an update, I've tried several variations of this code in theme.php (subsilver btw):
old code:

$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid={$thumb['pid']}&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width={$thumb['pwidth']},height={$thumb['pheight']}')",


new code:

$picture_url_fullsize = get_pic_url($picture, 'fullsize');
                $params = array('{CELL_WIDTH}' => $cell_width,
                    '{LINK_TGT}' => $picture_url_fullsize['$picture'],

It seems that this code works in other files, however when I use it here, it just shows no url in coppermine except for the base url to the gallery. Why doesn't this code actually generate the full url, do I have it placed in an incorrect spot?
Thanks