limit field size?
limit field size?
Script URL:
Version of script: 1.5
Hosting company:
...
Write your message below:
the guestbook looks a bit ugly with long entries for Email or URL - is there a way to limit the *displayed* field maybe with a ... extension for too long entries?
To be more clearly, if an email/URL entry is like:
thisismywonderfullongemail@whatevermydomainis.com
should display like maybe:
thisismywonderfullong...
can this be done?
Version of script: 1.5
Hosting company:
...
Write your message below:
the guestbook looks a bit ugly with long entries for Email or URL - is there a way to limit the *displayed* field maybe with a ... extension for too long entries?
To be more clearly, if an email/URL entry is like:
thisismywonderfullongemail@whatevermydomainis.com
should display like maybe:
thisismywonderfullong...
can this be done?
Ok, got it done. so it looks better me think 
Instead of printing the full URL/Email I use a clickable link instead:
For anyone who wants it:
for guestbook 1.5 only
Find line 895 and replace with:
echo 'Website: <a href="go.php?url='.$url.'" class="smaller" target="_blank">Link</a><br />';
Find line 900 and replace with:
echo 'E-mail: <a href="mailto:'.$email.'" class="smaller">Link</a>';
from now on no more ugly long URLs and Emails - instead just the word Link is printed. Keeps the guestbook much cleaner.

Instead of printing the full URL/Email I use a clickable link instead:
For anyone who wants it:
for guestbook 1.5 only
Find line 895 and replace with:
echo 'Website: <a href="go.php?url='.$url.'" class="smaller" target="_blank">Link</a><br />';
Find line 900 and replace with:
echo 'E-mail: <a href="mailto:'.$email.'" class="smaller">Link</a>';
from now on no more ugly long URLs and Emails - instead just the word Link is printed. Keeps the guestbook much cleaner.
Yes, or you can use an image (mail icon) for example instead of the "Link". Henrie posted one here:
viewtopic.php?t=1050
(at the end of 1st post and in another post later on for v1.5)
viewtopic.php?t=1050
(at the end of 1st post and in another post later on for v1.5)
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Klemen,
You should make the iconised guest book the default layout and also the better spacing between messages. Another suggestion would be changing the comments' text-align to justify by default.
have a look at my guest book - looks neat, no?
btw, the last line Powered by... can you make the links open in a new window coz it looks not nice in a framed page layout
Steve
You should make the iconised guest book the default layout and also the better spacing between messages. Another suggestion would be changing the comments' text-align to justify by default.
have a look at my guest book - looks neat, no?
btw, the last line Powered by... can you make the links open in a new window coz it looks not nice in a framed page layout
Steve
Hi Steve,
I would like to see how your guestbook looks but you don't have a link posted so I can not visit it.
To open a link in a new window would require the target= attribute. This is not allowed anymore in the xhtml doctype (which Gbook is since version 1.5).
It can be done by using javascript but this is not what i prefer.
I think people should get used to new browsing behaviour:
ctrl+click link to open in a new tab
shift+click link to open in a new window
Greetings,
Henrie
I would like to see how your guestbook looks but you don't have a link posted so I can not visit it.
To open a link in a new window would require the target= attribute. This is not allowed anymore in the xhtml doctype (which Gbook is since version 1.5).
It can be done by using javascript but this is not what i prefer.
I think people should get used to new browsing behaviour:
ctrl+click link to open in a new tab
shift+click link to open in a new window
Greetings,
Henrie
Hi Henrie,
thanks for the info - my website is http://myenchanting.com ...Guestbook is on the right hand side.
there is a webmaster entry showing both links - Email and WWW
whereof the WWW link opens in a new window and not inside the frame.
le'me know what you think
thanks for the info - my website is http://myenchanting.com ...Guestbook is on the right hand side.
there is a webmaster entry showing both links - Email and WWW
whereof the WWW link opens in a new window and not inside the frame.
le'me know what you think
Henrie,Henrie wrote:Hi Steve,
..
I think people should get used to new browsing behaviour:
ctrl+click link to open in a new tab
shift+click link to open in a new window
Greetings,
Henrie
Ouch, I think it will take much more time until people get used to it (if at all)! - not many around being familiar with *any* Windows keystrokes.
Ok, let's see what Klemen is going to do since he did not bother to comment yet. Personally, I think the iconised guestbook looks much cleaner! He can have my code for free

Didn't comment yet? See post N#3
As Henrie already told you GBook is now XHTML and XHTML Strict doesn't allow target="" attribute in anchor tags. Why exactly goes beyond my understanding, but believe me that people developing XHTML have a way superior knowledge of how these things work from both you and me
But I think it comes down to letting people decide where to open links and not forcing them to open it in a new window.
Anyway, the solution would be using Javascript, Henrie already posted some code in the "mods, add-ons" forum. I would still include current link code in the <noscript></noscript> tags to make sure people/robots not parsing Javascript can still follow the links.
Yes Henrie, the spacing will be added in the next version, I like it.

As Henrie already told you GBook is now XHTML and XHTML Strict doesn't allow target="" attribute in anchor tags. Why exactly goes beyond my understanding, but believe me that people developing XHTML have a way superior knowledge of how these things work from both you and me

Anyway, the solution would be using Javascript, Henrie already posted some code in the "mods, add-ons" forum. I would still include current link code in the <noscript></noscript> tags to make sure people/robots not parsing Javascript can still follow the links.
Yes Henrie, the spacing will be added in the next version, I like it.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Klemen Stirn wrote:Didn't comment yet? See post N#3![]()
..
Na, that's not what I meant. I was talking about making the iconised guest book the default installation layout since it looks much better.
However, I see your not going to move that way. Ok, then continuing the semi professional layout meaning a lot of more work if I ever think of upgrading the guest book again. The customisation so far was a bit of work.
cya
Ah, then you should ask in a way I can understand what you mean.
I never said I won't add icons instead of current text, in fact I like that better and it does solve problems with too long URLs / e-mails. My comments were regarding opening LINKS in a NEW WINDOW, that won't be added again as it's not allowed with XHTML.
I never said I won't add icons instead of current text, in fact I like that better and it does solve problems with too long URLs / e-mails. My comments were regarding opening LINKS in a NEW WINDOW, that won't be added again as it's not allowed with XHTML.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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