Page 1 of 1

A small cosmetic wish-list for GBook 1.5

Posted: Mon Oct 15, 2007 12:01 pm
by tonywalton
Stunningly good software, but I have a couple of cosmetic nits (all very easily soluble; I've fixed them in the version running at http://nbof.org/guestbook ) I'm not posting the PHP here as the code fragments are smaller than the header required by the MOD Announcement on this board!)

1. Please can GBook apply plurals correctly ("We have 1 entry displayed on 1 page" / "We have 3 entries displayed on 1 page") rather than the current "We have 1 entries displayed on 1 pages")?

2. If there is a single page of entries, a rather confusing "1" is displayed in bold at the top and bottom of the list of entries. Though it's sort of apparent that this is the page number it's not a link; there are no other pages to navigate to. Why display it at all, if there's only a single page of entries?

3. "You cannot signup this guestbook at this time" should read "You cannot sign this guestbook at this time".

(A couple more, added later)

4. The page fails XHTML validation (using the validator at w3.org) because

i. The <html> tag is missing a mandatory attribute. Rather than just <html> it should read
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

ii. I added my own stylesheets by putting the <link rel=... type="text/css"> stuff in header.txt While this appears to work, the XHTML spec doesn't allow <link> tags in the document body. So I've added another .txt file (html_header.txt) which is included into the HEAD of the html document, leaving header.txt for things that belong at the top of the document BODY. <link> tags, <meta> tags and so forth can go in html_header.txt

As I say, these are minor nits!

Posted: Mon Oct 15, 2007 12:51 pm
by Klemen
Added to my "to do" list.

Posted: Mon Oct 15, 2007 12:57 pm
by tonywalton
Thanks, Klemen. I'll email you my butchered version of gbook.php if you like, then you (as a proper PHP expert) can do the fixes properly :)

Posted: Mon Nov 12, 2007 6:34 pm
by tonywalton
Klemen Stirn wrote:Added to my "to do" list.
Another small thing to add: The function gbook_IP() assumes an IPv4 address.

If the guestbook is on a server which talks IPv6 (which is not impossible on a corporate or even home intranet) it simply looks at an address like "::1" (for localhost) or "fe80::21b:64ff:f972:8fb6" and throws up its hands in horror. Could I suggest another variable in settings.php, something like

$settings['allow_IPv6']

which when set would enable extra parsing within gbook_IP() to validate IPv6 addresses?

Cheers

Tony