Clickable link in thumbnail view? Clickable link in thumbnail view?
 

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

Clickable link in thumbnail view?

Started by BradInOKC, August 10, 2010, 06:12:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BradInOKC

I read through the help files and found how to make links clickable by editing the "displayimage.php" file and enabling bbcode...  But, the link in the description is only clickable when you actually go all the way into the picture...  Is there a way to make the text clickable from the thumbnail view? 

Here is a link:  http://www.builderbobs.com/gallery/floortoceiling/thumbnails.php?album=29

Thanks for your help.

BradInOKC

Or, preferably, is there a way to make the thumbnail refer to an external html page instead of opening a larger view of the picture?

Αndré

Open include/functions.inc.php, find
$caption .= '<span class="thumb_caption">' . strip_tags(bb_decode($row['caption'])) . '</span>';
and replace with
$caption .= '<span class="thumb_caption">' . bb_decode($row['caption']) . '</span>';

kwszp

As I think what BradInOKC asked about is what I've got on my mind, I'll continue this thread.
I'm looking for a way to direct to images from other websites but in a way similar to search results of searcg engines (google), not by "embedding" them (hotlinking,stealing, call it as you wish), like described for example here.

A clickable thumbnail (equivalent of <a target="_blank" alt="caption" href="http://www.link.to.page"><img src="thumbnail.cpg"></a>) is what I'd love to have.
The code above however creates clickable link under the thumbnail (link to test of modified code in my gallery), yet:
-opens the link in the gallery window
-the thumbnail is a normal gallery entity, so by clicking it one goes deeper and deeper
-hovering shows thumbnail image details

Is there a way to hack the code/create a mod with these functions:
-clicking on thumbnail opens (possibly in a new window/tab) the corresponding link (link created with bbcode could be either taken from thumb_caption or a custom filed would have to be created)
-no image info is shown when thumbnail hovered

I mentioned mod, as the situation resembles a bit Remote videos for cpg and I thought, that maybe modifying it to accept something like <lnk> files, containing an url, with thumbnails loaded with custom thumb plugin would do the job?

Any help much appreciated  :)

Αndré

Quote from: kwszp on February 03, 2011, 11:07:29 PM
The code above however creates clickable link under the thumbnail
That's exactly what the thread starter asked for.


Please start your own thread.

sjj1805

I know this may be considered and "Old" thread but I only recently discovered the coppermine software. A Google search for "coppermine link thumbnail to url" led me directly to this topic and so I am sure that anyone else looking for the same answer will end up here.

Andre's answer about changing include/functions.inc.php has only half answered the problem because whilst the Clickable link in thumbnail view works perfectly, visitors to your site are still likely to click the thumbnail rather than the link. Whilst the link send he visitor to your intended destination, clicking the thumbnail will take the visitor to the larger picture.

Whilst the request by BradInOKC for the thumbnail to also be directed to the intended destination is valid to overcome this anomoly, an alternative is to remove the thumbnail link completely. The visitor can then only click the link below the thumbnail and go to the correct location.

This is easily achieved with the following modification:

Edit
include\themes.inc.php

Find
                                <td align="center">
                                        <a href="{LINK_TGT}">{THUMB}<br /></a>
                                        {CAPTION}
                                        {ADMIN_MENU}
                                </td
>

Replace
                                <td align="center">
                                        {THUMB}
                                        {CAPTION}
                                        {ADMIN_MENU}
                                </td>


You may ask why anyone would want to do this modification.
My reason is that after setting up my Photo Albums http://stevejjones.co.cc/photo/index.php I realised that wit some slight modification, coppermine can be used for much more. I wanted to catalogue my book collection. Here I wanted to display images of the book covers organised in categories much the same as we do with photographs. The visitor can then use the powerful searching options plus the neat organisation afforded by coppermine to locate the desired book, then click the thumbnail to open it.

My Book collection with this modification is here http://stevejjones.co.cc/library/index.php
Hopefully others may find this to be equally as useful.