Advanced search  

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

Pages: [1]   Go Down

Author Topic: Making email and web address links  (Read 4373 times)

0 Members and 1 Guest are viewing this topic.

MarianneC

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 32
Making email and web address links
« 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.
Logged

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: Making email and web address links
« Reply #1 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
Logged
Read Docs and Search the Forum before posting. - Soporte en espaņol
--*--
Fabricio Ferrero's Website

Catching up! :)

MarianneC

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 32
Re: Making email and web address links
« Reply #2 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
Logged

MarianneC

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 32
Re: Making email and web address links
« Reply #3 on: November 07, 2008, 02:50:30 am »

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!
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.