forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: MarianneC on November 04, 2008, 12:08:46 am

Title: Making email and web address links
Post by: MarianneC on November 04, 2008, 12:08:46 am
In include/functions.inc.php, I have the following code:


Code: [Select]
if ($CONFIG['user_field2_name']){
            $caption .= $row['user2'] ? "<span class=\"thumb_caption\">".strip_tags(bb_decode($row['user2']))."</span>" : '';
        }

        if ($CONFIG['user_field3_name']){
            $caption .= $row['user3'] ? "<span class=\"thumb_caption\">".strip_tags(bb_decode($row['user3']))."</span>" : '';
        }


How can I make those two fields clickable links?  The first is an email address, the second is the web address.

Many thanks.
Title: Re: Making email and web address links
Post by: Fabricio Ferrero on November 04, 2008, 12:58:32 am
You should already know how the forum works..

Use search button next time. Is this what you're looking for?: http://forum.coppermine-gallery.net/index.php/topic,25286.0.html (http://forum.coppermine-gallery.net/index.php/topic,25286.0.html)
Title: Re: Making email and web address links
Post by: MarianneC on November 06, 2008, 11:15:55 pm
Hi Fabri,

You're right. I do know how it works.  I had spent about 20 minutes searching, but hadn't found that post.  It's all about the words you choose to use in the search.

Anyway, I added the make clickable () function to profile.php, but it still  isn't showing as clickable on thumbnails.php.

In an earlier modification, so that the custom fields would show on the first page of thumbnails.php, I had added this code to build_caption():

Code: [Select]

        if ($CONFIG['user_field4_name']){
            $caption .= $row['user4'] ? "<span class=\"thumb_caption\">".strip_tags(bb_decode($row['user4']))."</span>" : '';
        }

        if ($CONFIG['user_field1_name']){
            $caption .= $row['user1'] ? "<span class=\"thumb_caption\">".strip_tags(bb_decode($row['user1']))."</span>" : '';
        }

        if ($CONFIG['user_field2_name']){
            $caption .= $row['user2'] ? "<span class=\"thumb_caption\">".strip_tags(bb_decode($row['user2']))."</span>" : '';
        }

        if ($CONFIG['user_field3_name']){
            $caption .= $row['user3'] ? "<span class=\"thumb_caption\">".strip_tags(bb_decode($row['user3']))."</span>" : '';
        }

I suspect that's where the problem is and that's most likely the code that needs modification to make user2 and user 3 clickable.  It did make those fields show up on the page.

The fields are clickable when someone selects the thumbnail of the image and gets to displayimage.php.  But on the thumbnails, it is displaying just as plain text.

Do you have another suggestion?

Many thanks,
Marianne
Title: Re: Making email and web address links
Post by: MarianneC on November 07, 2008, 02:50:30 am
http://www.useaboston.com/2008a/thumbnails.php?album=1&page=1&sort=na (http://www.useaboston.com/2008a/thumbnails.php?album=1&page=1&sort=na)

On this page, you can see that the email and web are not linked.  If you click on one of the thumbnails, it takes you to display image...where they are linked.  I would also like to get them linked on the thumbnails.php page.

Thanks!