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

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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 1 Guest 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