Page 1 of 1
limit field size?
Posted: Mon Mar 05, 2007 10:23 pm
by Me59
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?
Posted: Mon Mar 05, 2007 11:21 pm
by Me59
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.
Posted: Tue Mar 06, 2007 12:19 am
by Klemen
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)
Posted: Tue Mar 06, 2007 1:14 am
by Me59
Thanks, Klemen, looks even nicer now!
Had to add one more <br> to separate the icons from the From: field otherwise it looked a bit squashed.
thanks
Steve
Posted: Tue Mar 06, 2007 11:21 pm
by Me59
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
Posted: Wed Mar 07, 2007 6:44 am
by Henrie
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
Posted: Wed Mar 07, 2007 7:01 am
by Me59
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
Posted: Wed Mar 07, 2007 5:36 pm
by Henrie
Hi Steve,
I like the images you have used for the website and e-mail links.
And I really hope that Klemen includes the separation of the posts in his next GBook version. It really does look a lot better.
Greetings,
Henrie
Posted: Wed Mar 07, 2007 10:50 pm
by Me59
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
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

I am just contributing to this project.
Posted: Thu Mar 08, 2007 10:39 am
by Klemen
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.
Posted: Fri Mar 09, 2007 2:09 am
by Me59
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
Posted: Fri Mar 09, 2007 2:47 am
by Klemen
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.
Posted: Thu Jul 12, 2007 2:57 pm
by thegrrl
Omg this is exactly what I am looking for thank you so much for posting this, I just love this guestbook yay!