wrap long text in email and url

Everything related to GBook PHP guestbook
Post Reply
Jomar
Posts: 50
Joined: Tue May 22, 2007 8:09 pm

wrap long text in email and url

Post by Jomar »

/*************************************
Title:
Version: 1.6
Author:
Demo:
Download:
Website: www.zangkoorts.nl

Short description:


*************************************/

I saw the solution from Henrie to hide a long mail adress in an image, but it doesn't seem to work in version 1.6 of the guestbook.
I got a error message so I undid the changes.

Is there a solution, and also for hiding the url's in an image too?
It is not needed to be able to view just by the administrator, so no need for a password, I just don't like the way it messes up the lay-out of the website.
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

For e-mail you can change

Code: Select all

echo $lang['t20'].' <a href="mailto:'.$email.'" class="smaller">'.$email.'</a>';
to

Code: Select all

echo $lang['t20'].' <a href="mailto:'.$email.'" class="smaller">EMAIL</a>';
and for URL change

Code: Select all

echo $lang['t19'].' <a href="go.php?url='.$url.'" class="smaller" '.$target.'>'.$url.'</a><br />';
to

Code: Select all

echo $lang['t19'].' <a href="go.php?url='.$url.'" class="smaller" '.$target.'>WWW</a><br />';
If you want images instead just replace EMAIL and WWW with HTML code of your images, for example <img src="email.gif">
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
Jomar
Posts: 50
Joined: Tue May 22, 2007 8:09 pm

Post by Jomar »

Sorry, can't find these exact lines.

I did find:
if ($from)
{
echo $lang['t18'].' '.$from.'<br />';
}
if ($settings['use_url'] && $url)
{
echo $lang['t19'].' <a href="go.php?url='.$url.'" class="smaller">'.$url.'</a><br />';
}
if ($email)
{
echo $lang['t20'].' <a href="mailto:'.$email.'" class="smaller">'.$email.'</a>';
}

but when I change the lines e.g.
echo $lang['t20'].' <a href="mailto:'.$email.'" class="smaller">'.$email.'</a>';

in to:
echo $lang['t20'].' <a href="mailto:'.$email.'" class="smaller">EMAIL</a>';

it has no effect.
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

You are probably looking at the showPrivate function (line 529)? You will find the code I mentioned below that function, look around lines 960-980.


Or simply use your editor's Search/Find function and search for $lang['t20']

The first one you will find is inside the showPrivate function, the second and third one are the correct ones where all the code is.
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
Jomar
Posts: 50
Joined: Tue May 22, 2007 8:09 pm

Post by Jomar »

This suggestion works, I was changing the wrong lines.
I Used images and it really looks nice now.

tnx
If I figured out how it works with this Paypal, I will really buy you a beer :D
Post Reply