Replace text url by small gif

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
MW24
Posts: 3
Joined: Thu May 22, 2008 2:47 pm

Replace text url by small gif

Post by MW24 »

Hi!

Your guestbook is great, thank you. It works fine as well. I have a short question though.

I do not want to have visible text links. When a visitor has a homepage it is listed in the guestbook as text.

<a href="go.php?url='.$url.'" class="smaller" '.$target.'>'.$url.'</a>

I want to replace the text-url by a small homepage-gif-image.

<a href="go.php?url='.$url.'" class="smaller" '.$target.'><IMG SRC="..." BORDER="0"</a>

works...the gif is clickable. The only problem is that this image always shows up even when a visitor has NO homepage. Is there a way only to display the image when the url is filled in and not empty?
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Which version of GBook are you using? Make sure it's the latest one (1.6) and make sure you are editing line 972:

Code: Select all

echo $lang['t19'].' <a href="go.php?url='.$url.'" class="smaller" '.$target.'>'.$url.'</a><br />';
It should work then and only show the image if an URL is present.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
MW24
Posts: 3
Joined: Thu May 22, 2008 2:47 pm

Post by MW24 »

Thanks, it works now. :) Just made a small mistake.

Thanks again. :)
MW24
Posts: 3
Joined: Thu May 22, 2008 2:47 pm

Post by MW24 »

One last question: Which line displays the actual comment? Not the name, date, website, from...but the message the visitor has typed?

I want to add something there and can't find it.

EDIT Found it, thanks. :)
Post Reply