URL and Email Links in Thumbnail Gallery URL and Email Links in Thumbnail Gallery
 

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]

Main Menu

URL and Email Links in Thumbnail Gallery

Started by igdesign, July 29, 2004, 01:01:12 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

igdesign

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


Casper

Please post the code you changed to allow these fields to show.
Without that, it is difficult to know how to help.
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

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;

Casper

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);
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

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

ie.
make_clickable($rowset[$key]['user1'])

igdesign

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?

Nibbler

Just replace

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

with

. (make_clickable($rowset[$key]['user1'])) .

igdesign