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: URL and Email Links in Thumbnail Gallery  (Read 3606 times)

0 Members and 1 Guest are viewing this topic.

igdesign

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
URL and Email Links in Thumbnail Gallery
« on: July 29, 2004, 01:01:12 am »

Hi All,

I modified CMG to display the admin-specified information (thanks to this fabulous forum) - see the gallery at:

http://www.useaboston.com/imagegallery/thumbnails.php?album=3

Two of those information fields are a website listing and an email address - both of which are clickable on the DisplayImage page by default - this is a great feature that I didnt expect to have.

My question, however, is how to make those fields also clickable from the Thumbnail page.

Since this is a mod on top of a mod i'm not sure how to go about it at all and havnt been able to find anything like it here yet.

Thanks,
Gabriella

IntelliGirlDesign.com
Logged

igdesign

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: URL and Email Links in Thumbnail Gallery
« Reply #1 on: August 04, 2004, 09:02:53 pm »

bump?
 ;)
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: URL and Email Links in Thumbnail Gallery
« Reply #2 on: August 05, 2004, 12:27:15 am »

Please post the code you changed to allow these fields to show.
Without that, it is difficult to know how to help.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

igdesign

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: URL and Email Links in Thumbnail Gallery
« Reply #3 on: August 05, 2004, 12:45:45 am »

in includes/functions.inc.php

i replaced this:

Code: [Select]
if($select_columns != '*') $select_columns .= ', title, caption,hits';
with this:

Code: [Select]
if($select_columns != '*') $select_columns .= ', title, caption,hits,user1,user2,user3,user4';
and put this:

Code: [Select]
$caption .= "<span class=\"thumb_caption\">" . $rowset[$key]['user1'] . "</span>";
before this:

Code: [Select]
$rowset[$key]['caption_text'] = $caption;
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: URL and Email Links in Thumbnail Gallery
« Reply #4 on: August 05, 2004, 01:11:43 am »

I not sure this will work, as I don't have a 1.2.1 install to test on, but try this.

Change;
Code: [Select]
if($select_columns != '*') $select_columns .= ', title, caption,hits,user1,user2,user3,user4';
to this;

Code: [Select]
if($select_columns != '*') $select_columns .= bb_decode(title, caption,hits,user1,user2,user3,user4);
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Nibbler

  • Guest
Re: URL and Email Links in Thumbnail Gallery
« Reply #5 on: August 05, 2004, 01:22:02 am »

You just need to send the text through the make_clickable() function.

ie.
Code: [Select]
make_clickable($rowset[$key]['user1'])
Logged

igdesign

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: URL and Email Links in Thumbnail Gallery
« Reply #6 on: August 05, 2004, 03:24:03 am »

casper - i tried that and it gives a critical error

nibbler - could you elaborate - i'm not all that php savvy. Where does that need to go?
Logged

Nibbler

  • Guest
Re: URL and Email Links in Thumbnail Gallery
« Reply #7 on: August 05, 2004, 04:15:15 pm »

Just replace

Code: [Select]
. $rowset[$key]['user1'] .
with

Code: [Select]
. (make_clickable($rowset[$key]['user1'])) .
Logged

igdesign

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: URL and Email Links in Thumbnail Gallery
« Reply #8 on: August 05, 2004, 09:51:36 pm »

that worked great thanks!

 :D
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 14 queries.