GBook HL modifications with extra functionality

Everything related to GBook PHP guestbook
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

GBook HL modifications with extra functionality

Post by Henrie »

HL-mods available for GBook version 1.7 and later: Update January 1, 2010:
Because I don't have as much free time as i used to have. the 'Gbook HL-modified' based on Gbook version 1.5will no longer be upgraded.
Instead of that, when someone requests it, i will post modifications to apply yourself to the at that time current version of GBook as shown above.
Post requests in a new topic please.

Title: GBook HL-modified (no longer updated)
Date: January 21, 2009
Author: Henrie van der Locht
Website: http://members.home.nl/h.vdlocht/gbook_xhtml/ (is waiting for an update/upgrade)
Download: gbook15_hl07a.zip [93 kB]. (Latest full HL-modified guestbook that was released. See below for added functionality compared to standard GBook 1.5)

Modifications in version Gbook 1.5 mod HL.07a :
  • Valid XHTML 1.1 code
    (GBook 1.7 uses XHTML 1.0 Transitional, no HL-mod available yet to change this)
  • Removed tables for complete layout in <div> and <span> with external css.
    (Available in standard GBook as of version 1.7)
  • Translatable with external language files. Currently EN en NL included.
    (Available in standard GBook as of version 1.6)
  • Optional not displaying title and back to website link in tophtml.
    (Can be done in GBook 1.7 by editing the template file overall_header.php, no HL-mod available yet to change this)
  • Option to display e-mail and website links of visitor as images.
    (Can be done in GBook 1.7 by editing the template file comments.php, no HL-mod available yet to change this)
  • Option to send an e-mail to the visitor when he/she has added an entry.
    (Not available in GBook 1.7. HL-mod available in the topic viewtopic.php?t=2942)
  • Choose which fields are required from the settings.php file. Required fields in the sign form are automatically marked according to css style.
    (Not available in GBook 1.7. HL-mod available for required e-mail address in the topic viewtopic.php?t=2722 and for required 'from' field in topic viewtopic.php?t=3488)
  • Choose which fields are available to fill by the visitor by settings in the settings.php file.
    (Partly available in GBook 1.7, only URL-field option. HL-mod not yet available)
  • Option to use an alternate stylesheet chooser.
    (Not available in GBook 1.7. HL-mod not yet available)
  • Banning users by e-mail address.
    (Not available in GBook 1.7. HL-mod not yet available)
  • Styled text can be used in messages.
    (Not available in GBook 1.7. HL-mod not yet available)
  • Option to set how many posts are shown in one page.
    (Not available in GBook 1.7. HL-mod available in the topic viewtopic.php?t=2704)
  • Option to display e-mail addresses publically or not.
    (Available in standard GBook as of version 1.6)
History:

The modifications in this xhtml 1.1 version (HL.01 - August 19, 2005) are:
  • Valid xhtml 1.1 code (mostly changes for & in url string and closing open tags).
  • Moved inline stylesheets to external stylesheet.
  • Removed tables for layout and use <div> and <span> with external css.
  • Almost all of the layout and styles is configurable from style.css.
  • Optional not displaying 'website title' and/or 'back to website' link in top of page.
  • Option to display e-mail and website links of entry submitter as images.
  • If a field in an entry is not filled, the text (for example "Homepage:") is not displayed (now also available in standard GBook version).
  • Option to send an e-mail to the visitor when he/she has added an entry.
  • Choose which fields are required from inside the settings.php file. Required fields in the sign form are automatically marked according to css style.
  • Changed breakup of long lines from <br> to a space because it also truncated normal text lines by inserting the <br> in the entries.txt file(now also available in standard GBook version).
  • The multilanguage functionality from Andreas Kakanis-Silk with the use of external language files is also part of this version. Included are english and dutch language files. The files include a few more text strings because of added functionality.
For changes in HL.02 (August 20, 2005) look at this post (further down this page).

For changes in HL.03 (December 14, 2005) look at this post and this post (both further down this page).

For changes in HL.04 (March 13, 2006) look at this post (further down this page).

For changes in HL.05 (July 28, 2006) look at this post (further down this page).

For changes in HL.06 (July 30, 2006) look at this post (further down this page).

For changes in HL.07 (October 15, 2007) look at this post .

For changes in HL.07a (January 21, 2009) look at this post .


I made these modifications because I like to use css files for layout and think pages should be coded according to the standards (in this case XHTML 1.1).
The other modifications I made because I needed or liked the functionality.

I hope others find this useful.

Greetings,
Henrie van der Locht
Last edited by Henrie on Mon Oct 29, 2012 11:42 pm, edited 19 times in total.
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Hello Henrie,

Great job and thank you for sharing!

I have added a copy for download HERE

Edited: This is now the updated HL.02 file

Thanks
Last edited by Klemen on Sat Aug 20, 2005 1:16 pm, edited 2 times in total.
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
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Update for gbook133_xhtml

Post by Henrie »

After testing the script some more I found a few bugs, they are now corrected:

Date: August 20, 2005 (mod HL.02)
Author: Henrie van der Locht
Website: See first post

The modifications in version mod HL.02 are:
  • Corrected not displaying message when an entry was successfully deleted.
  • Corrected: not working smileys.
  • Changed: smileys.html to smileys.php for use with language file.
  • Added: Valid xhtml 1.1 code in smileys.php page (forgot to do in HL.01).
  • Added: class .smiley to style.css page (forgot to do in HL.01).
  • Corrected: filter_lang is now also used to declare the xml:lang="" .
  • Corrected: other small errors which caused some output pages to not validate.
EDIT: Removed download link as not every page generated by this version validated.

Greetings,
Henrie van der Locht
Last edited by Henrie on Fri Jan 01, 2010 9:26 pm, edited 2 times in total.
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Because errors where there in the files included in version HL.02, i made version HL.03

Date: December 12, 2005 (mod HL.03)
Author: Henrie van der Locht
Website: See first post

The modifications in version mod HL.03 are:
  • Changed code to GBook version 1.34
  • Corrected more small errors which caused some pages to not validate.
  • Added setting to choose how many messages appear on a page.
  • Added function to choose if links are clickable or not.
  • Added function to insert styled text (bold, italic and underlined).
  • Moved date settings to settings.php file instead of language file.
  • Added function for IP logging (and optionally ban IP's) (thanks to FruitBeard for the code).
  • Added function for using alternate css styles
  • Added more id's and classes for elements for better stylesheet usability.
  • Added function to use more admin passwords if wanted.
You can download the new zip file here
Update January 1, 2010. No longer available for download

Most of the new features are just implementations of posts found in the GBook forum.

Greetings,
Henrie van der Locht
Last edited by Henrie on Fri Jan 01, 2010 9:32 pm, edited 3 times in total.
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Nice Henrie, I will probably include many of the functions (perhaps a bit modified) in the next official release.

Regards
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
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Because the smileys.php file gave an error when php short tags on the server are enabled i updated version HL.03

Date: December 14, 2005 (still mod HL.03)
Author: Henrie van der Locht
Website: See first post

You can download the updated zip file here
Update January 1, 2010. No longer available for download

Greetings,
Henrie
Last edited by Henrie on Fri Jan 01, 2010 9:30 pm, edited 1 time in total.
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

It took a while but I updated the code of the XHTML modified GBook to GBook version 1.35 (with the JunkMark code).

Date: March 13, 2006 (mod HL.04)
Author: Henrie van der Locht
Website: See first post

The modifications in version mod HL.04 are:
  • Changed code to GBook version 1.35
You can download the updated zip file here
Update January 1, 2010. No longer available for download

Greetings,
Henrie
Last edited by Henrie on Fri Jan 01, 2010 9:33 pm, edited 1 time in total.
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

It has been a while but the a new update of the XHTML modified guestbook is now available.
I have skipped a few versions and updated to GBook version 1.43.

Date: July 28, 2006 (mod HL.05)
Author: Henrie van der Locht
Website: See first post

The modifications in version mod HL.05 are:
  • Changed: code updated to GBook version 1.43. This includes:
    New: reply to messages and IP-logging (v1.40).
    Improved: no system choosing in settings.php (v1.40), JunkMark SPAM filter (v1.41), badwords filter (v1.42), page navigation (v1.42) and security code with image (v1.43).
  • Added: function for blocking messages for banned e-mail addresses (as found in this topic in the forum)
  • Added: function to allow hiding of fields to fill at the add entry page.
  • Changed: file smileys.php so it could use the settings.php file.
  • Changed: format of the entries file, it is now again compatible with the standard Gbook entries file.
EDIT: Removed download link because there were bugs in the gbook.php file.

READ THIS IF YOU ARE UPGRADING FROM A PREVIOUS XHTML VERSION
Your existing entries file (standard is entries.txt) has to be upgraded.
In the readme.htm file included in the zip-file, in the section "Upgrade from GBook 1.34 XHTML version HL.03 or 1.35 XHTML version HL.04" is explained how to upgrade your existing entries file.
The format of the entries file has changed to make it compatible with the regular GBook entries file which had became incompatible because of the new fields for IP-logging and replies to messages.

Greetings,
Henrie
Last edited by Henrie on Fri Jan 01, 2010 9:34 pm, edited 2 times in total.
jaap
Posts: 54
Joined: Sat May 06, 2006 1:54 pm

GBook v 1.43 Xhtml 1.1 : Wrong datatype ?

Post by jaap »

Hi Henrie,

Thanks for the new version of the script despite of the heat : good work!

I am testing the new version of the guestbookscript, everything
works fine except one thing, on top of the guestbook page I get
this line :

Warning: in_array(): Wrong datatype for second argument in /URL/gbook.php on line 142

What's wrong ?

Jaap.
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Hello Jaap,

Well it was better inside my apartment than outside and sitting in front of my computer is not very straining so it's a good way to get through the day.

Now for your question:
Warning: in_array(): Wrong datatype for second argument in /URL/gbook.php on line 142

Because in my php.ini file I had "display_errors = Off" I did not see these errors. I changed the gbook.php file to remove the error. I also made a few other small changes. See the following post in which the new version is announced and a download link is presented.

Greetings,
Henrie
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Jaap discovered an error and i myself discovered one error and one annoyance so here's a bugfix release. I hope everything is fixed now.

Date: July 30, 2006 (mod HL.06)
Author: Henrie van der Locht
Website: See first post

The modifications in version mod HL.06 are:
  • Corrected: checkmail variable in gbook.php file (CaSe SeNsItIvE).
  • Corrected: layout for notification mails (line breaks were not present).
  • Corrected: langset_nl.php (some new translation strings were not added).
You can download the update zip file here
Update January 1, 2010. No longer available for download

READ THIS IF YOU ARE UPGRADING FROM XHTML VERSION HL.04 OR OLDER

Your existing entries file (standard is entries.txt) has to be upgraded.
In the readme.htm file included in the zip-file, in the section "Upgrade from GBook 1.34 XHTML version HL.03 or 1.35 XHTML version HL.04" is explained how to upgrade your existing entries file.
The format of the entries file has changed to make it compatible with the regular GBook entries file which had became incompatible because of the new fields for IP-logging and replies to messages.

Greetings,
Henrie
Last edited by Henrie on Fri Jan 01, 2010 9:35 pm, edited 1 time in total.
jaap
Posts: 54
Joined: Sat May 06, 2006 1:54 pm

Post by jaap »

Henrie,

Script is OK now, did not find anymore errors so far.

Thanks.

Jaap.
Mac
Posts: 6
Joined: Mon Jul 31, 2006 6:36 pm

Post by Mac »

Hello Henrie,

Thanks for the service you provide. Much appreciated.

I have uploaded your amended bugfix release. Initially, I had the same error as Jaap which I confirm is now clear. However, I have this error on submitting an entry to the GB.

Warning: Invalid argument supplied for foreach() in URL\gbook.php on line 522.

The GB entry is still accepted but I don't know why I get the warning. Can you help please.
MAC
jaap
Posts: 54
Joined: Sat May 06, 2006 1:54 pm

Post by jaap »

Henrie,

One thing, when I click " insert smileys " in the pop up it says :

Invalid Attempt

Jaap
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Ok, found the problem.
You have the smileys.php file from version Gbook 1.35 XHTML HL.03 on your server.
Replace it with the smileys.php file that came in the Gbook 1.35 XHTML HL.06 zip file.

I will change the upgrade instructions in the zip file to include the smileys.php file.

I have just done a silent upgrade of the zip file (still HL.06). The version information and download link has remained the same as in this post viewtopic.php?p=4052#4052.

Greetings,
Henrie
Post Reply