coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Garibaldi on January 03, 2008, 08:29:08 PM

Title: Link Thumbnails directly to fullsize image (.jpg)
Post by: Garibaldi on January 03, 2008, 08:29:08 PM
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.
Title: Re: Link Thumbnails directly to fullsize image (.jpg)
Post by: aliveinindy on January 06, 2008, 04:19:19 PM
try this
http://forum.coppermine-gallery.net/index.php?topic=34360.0 (http://forum.coppermine-gallery.net/index.php?topic=34360.0)
Title: Re: Link Thumbnails directly to fullsize image (.jpg)
Post by: Garibaldi on January 07, 2008, 01:59:32 AM
Quote from: aliveinindy on January 06, 2008, 04:19:19 PM
try this
http://forum.coppermine-gallery.net/index.php?topic=34360.0 (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?
Title: Re: Link Thumbnails directly to fullsize image (.jpg)
Post by: Garibaldi on January 11, 2008, 04:42:24 AM
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