Making email and web address links Making email and web address links
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Making email and web address links

Started by MarianneC, November 04, 2008, 12:08:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MarianneC

In include/functions.inc.php, I have the following code:



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.

Fabricio Ferrero

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
Read Docs and Search the Forum before posting. - Soporte en espaƱol
--*--
Fabricio Ferrero's Website

Catching up! :)

MarianneC

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



        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

MarianneC

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!