coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: igdesign on July 29, 2004, 01:01:12 AM

Title: URL and Email Links in Thumbnail Gallery
Post by: igdesign 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
Title: Re: URL and Email Links in Thumbnail Gallery
Post by: igdesign on August 04, 2004, 09:02:53 PM
bump?
;)
Title: Re: URL and Email Links in Thumbnail Gallery
Post by: Casper 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.
Title: Re: URL and Email Links in Thumbnail Gallery
Post by: igdesign on August 05, 2004, 12:45:45 AM
in includes/functions.inc.php

i replaced this:

if($select_columns != '*') $select_columns .= ', title, caption,hits';

with this:

if($select_columns != '*') $select_columns .= ', title, caption,hits,user1,user2,user3,user4';

and put this:

$caption .= "<span class=\"thumb_caption\">" . $rowset[$key]['user1'] . "</span>";

before this:

$rowset[$key]['caption_text'] = $caption;
Title: Re: URL and Email Links in Thumbnail Gallery
Post by: Casper 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;
if($select_columns != '*') $select_columns .= ', title, caption,hits,user1,user2,user3,user4';

to this;

if($select_columns != '*') $select_columns .= bb_decode(title, caption,hits,user1,user2,user3,user4);
Title: Re: URL and Email Links in Thumbnail Gallery
Post by: Nibbler on August 05, 2004, 01:22:02 AM
You just need to send the text through the make_clickable() function.

ie.
make_clickable($rowset[$key]['user1'])
Title: Re: URL and Email Links in Thumbnail Gallery
Post by: igdesign 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?
Title: Re: URL and Email Links in Thumbnail Gallery
Post by: Nibbler on August 05, 2004, 04:15:15 PM
Just replace

. $rowset[$key]['user1'] .

with

. (make_clickable($rowset[$key]['user1'])) .
Title: Re: URL and Email Links in Thumbnail Gallery
Post by: igdesign on August 05, 2004, 09:51:36 PM
that worked great thanks!

:D