Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Clickable link in thumbnail view?  (Read 4240 times)

0 Members and 1 Guest are viewing this topic.

BradInOKC

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Clickable link in thumbnail view?
« on: August 10, 2010, 06:12:51 pm »

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.
Logged

BradInOKC

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: Clickable link in thumbnail view?
« Reply #1 on: August 10, 2010, 07:22:47 pm »

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?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: Clickable link in thumbnail view?
« Reply #2 on: September 03, 2010, 12:28:41 pm »

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

kwszp

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Clickable link in thumbnail view?
« Reply #3 on: February 03, 2011, 11:07:29 pm »

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  :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: Clickable link in thumbnail view?
« Reply #4 on: February 04, 2011, 09:07:00 am »

The code above however creates clickable link under the thumbnail
That's exactly what the thread starter asked for.


Please start your own thread.
Logged

sjj1805

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: Clickable link in thumbnail view?
« Reply #5 on: April 16, 2012, 02:12:56 am »

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
Code: [Select]
                                <td align="center">
                                        <a href="{LINK_TGT}">{THUMB}<br /></a>
                                        {CAPTION}
                                        {ADMIN_MENU}
                                </td
>

Replace
Code: [Select]
                                <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.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.