Location: PHPKode > projects > HyperBook Guestbook > documentation.html
<html>
<head>
<title>HyperBook Documentation</title>

<meta http-equiv="Content-Type" content="text/html">
<meta name="Description" content="HyperBook Guestbook">
<meta name="Keywords" content="HyperBook Guestbook PHP">
<meta name="Author" content="Thomas R. Pasawicz - hide@address.com">

<style type="text/css">
<!--
a:link        {text-decoration: none;}
a:active    {text-decoration: none;}
a:visited   {text-decoration: none;}
a:hover     {color:ff0000; text-decoration: none;}
-->
</style>

</head>

<body bgcolor="#cccccc" background="background.jpg" text="#003399" link="#3333ff" vlink="#3333ff" alink="#cc0000">

<table width="600" cellspacing="0" cellpadding="0" align="center"><tr><td>

<table cellpadding="3" cellspacing="0" border="0" bgcolor="#999999" width="600" align="center"><tr><td>
<table cellpadding="8" cellspacing="0" border="0" bgcolor="#eaeaea" width="100%">
<tr><td bgcolor="#0066ff">

<img src="logo.jpg" width="578" height="119"><br>

<hr align="left" width="100%" noshade size="1" color="#FFBF00">

<div align="right"><font size="4" face="Arial" color="#ffffff"><b>Guestbook Documentation v1.30&nbsp;</b></font></div>

</td></tr><tr><td valign="top">

<font size="2" face="Arial" color="#003399">
<font size="4"><b><a name="toc">Table of Contents</a></b></font>

<ul compact>
	<li><a href="#introduction">Introduction</a>
	<li><a href="#terms">Terms of Use</a>
	<li><a href="#installation">Installation</a>
	<li><a href="#administration">Administration Main Menu</a>
<ul>
	<li><a href="#display">Display/Edit/Delete Posts</a>
	<li><a href="#logout">Admin Log Out</a>
	<li><a href="#configuration">Guestbook Configuration</a>
	<li><a href="#dbman">Database Manager</a>
	<li><a href="#color">Color/Graphic Selection</a>
	<li><a href="#password">Change Password</a>
	<li><a href="#iplog">Reset IP Address Log</a>
	<li><a href="#updates">Check for Version Updates</a>
	<li><a href="#register">Register Program (free)</a>
	<li><a href="#feedback">Feedback Form</a>
</ul>
	<li><a href="#language">Alternate Language Configuration</a>
	<li><a href="#structure">Database Structure</a>
	<li><a href="#importing">Importing Databases</a>
	<li><a href="#issues">Known Issues</a>
	<li><a href="#developer">About the Developer</a>
</ul>

<hr>

<font size="4"><b><a name="introduction">Introduction</a></b><br></font>
Does the Internet need yet another guestbook program? Maybe not, but after years of using "remote hosted" guestbooks and CGI/PERL scripts, I felt it was time to "roll my own" and create a guestbook with all the features I wanted. The result is HyperBook, a full-featured guestbook designed with the administrator in mind... and for peace of mind.<br>
<br>
Since not all hosting accounts which support PHP also include access to a database such as MySQL, HyperBook relies on it's own internal "Multi-file Flat Text Database." Many guestbook programs store all records (your visitor's posts) in a single flat text file, which is fine as long as you don't have many visitors. However, as the number of records grows, so does the size of the single database file, which in time could become several megabytes in size. If this file must be loaded or searched each time a page of posts is displayed, it could put a heavy load on your host's resources (known in this case as "disk banging"). HyperBook breaks this database file into many smaller files, thus reducing the need to access a single large file. By default, each file contains 25 records, or about 10-15kb of data (this setting may be changed, if necessary). Therefore, to display a page containing 10 posts, only one or two small files will need to be accessed. Not only will this make your system administrator happy, but it will improve the speed of even guestbooks with thousands of entries. However, there are some limitations to PHP and some operations (eg. deleting posts and name searches) may need to access a large number of records, which could cause a problem (see <a href="#issues">Known Issues</a> for more details).<br>
<br>
Along with the improved efficiency of a multi-file database, I also wanted a guestbook that would be easy to maintain. In particular, I was tired of removing "double posts" (or in some cases, triple or quadruple posts). A double post is usually caused by an impatient guest pressing the submit button multiple times, resulting in the same message being posted multiple times. HyperBook compares the name and comments of each post with the post that precedes it... if they match then the second post is rejected. Sometimes a malicious visitor will intentionally try to post multiple messages, changing each one slightly to get around the double post protection. To discourage this form of attack, a log of the last 25 IP addresses is kept, and each IP address can be given a quota for how many posts they can make. The quota may be set by the Admin, two or three posts is usually sufficient. Also, the poster's IP address and Remote Host (if available) is stored in each record and can be seen by the Admin. And just for good measure, an optional "Banned Words" list may be used to screen out expletives.<br>
<br>
Another feature I wanted was e-mail notification of each new post so I wouldn't have to continuously visit the guestbook. Many guestbooks now have this feature, but I also wanted to include a link in the e-mail to take me directly to a page where the post could be edited or deleted. And just for fun, I added a "Guestbook Administrator's Comment" field to the editor so I could reply to some of the more "interesting" posts. I feel this makes the guestbook more entertaining for visitors who decide to peruse its pages.<br>
<br>
Being a professional website designer, I knew I'd be installing this guestbook on a number of sites, so set-up had to be quick and easy. PHP can usually detect important information such as the current directory path and URL, along with creating some of the initial files needed to get a guestbook up and running. The only problem area was using PHP running in "safe mode" to create new directories with the proper owner/permissions... so creating the two directories used by HyperBook must still be performed manually (which only takes about 30 seconds). After that it's just a matter of uploading a few files and running the Admin program, which detects a first time run and displays a short form to be filled out. In all, a new HyperBook can easily be set-up in under two minutes if you know what you're doing.<br>
<br>
The final goal was to make HyperBook as customizable as possible, without the end user knowing a thing about writing PHP code. The first step was allowing up to three additional questions to be added to the Sign Book form, and to allow these questions to be changed at any time. Next I wanted the Admin to be able to select colors that matched the rest of the website. In total, 10 colors may be selected along with a banner graphic and background image. There is also an option to use a custom "Sign the Guestbook" graphic, and if two graphics are used, the second will be displayed as a mouseover button... it adds a nice touch.<br>
<br>
There were a few guestbook "features" I didn't want, such as allowing visitors to use HTML in their posts. There was a time when I thought this was a fun thing to do, but after over 7,000 posts to my personal guestbook, I've changed my mind and made HyperBook strip HTML out of all posts. It's not that I mind a little formatting or an image link to a small graphic, but often it takes away from the guestbook more than it contributes. Links to graphics are often broken, which can make the pages seem slow to load. Some folks have posted rather large graphics and WAVs, which seriously slows the pages down. Yet others have been sloppy with their HTML tags, resulting in unclosed font and link definitions, or unclosed tables (anyone who uses Netscape knows that an improperly formatted table results in a blank page). If all that wasn't enough, there were people posting small Javascripts to redirect visitors to their own homepage... whether the visitor wanted to leave my site or not. To even consider allowing HTML tags, I would have to selectively remove Javascript, validate what code was allowed for proper format and periodically test for broken links. And then there is the security issue, allowing code in posts opens a small door for hackers. Remember, PHP is a program which interacts with the data being submitted, it's wise to treat "raw data" with caution and "cook" it to remove any unwanted code which could be mistakenly executed. See why I left the HTML out?<br>
<br>
So now that I've created the guestbook I've always wanted, should I keep it all to myself or share it with the Internet community? Well... I have used my share of other people's software, and since guestbooks are a dime a dozen I probably couldn't sell this one... so sure, you may run it on your website if it supports PHP. And I'd like to hear your comments and suggestions, if there is enough interest I'll continue to develop HyperBook... it was designed to be expanded (additional message display templates might be nice). But keep in mind that HyperBook is a hobby, not a commercial product. As such I can't offer much in the way of personal, free tech support, my clients' websites have to come first if I'm going to pay the Visa bill each month. I do feel it's my responsibility to check into bug reports and security glitches, so please use HyperBook's built-in Feedback form to submit reports and the Version Check to see if there has been a new release. On the other hand, please don't ask me something like how to use your FTP program to make a new directory and set the permissions, that's the responsibility of the FTP program's developers and I'm sure they explain it in that program's help files. There also may be issues that involve your host server's configuration... I'd like to hear about them but I can't promise I'll be able to fix them. HyperBook was developed and tested on a commercial community server running PHP Version 4.0.4pl1, Apache/1.3.17 and Linux.. it runs great here but, like they say, your mileage may vary.<br>
<br>
Now that you know a little about HyperBook, I hope you'll give it a try and enjoy using it as much as I've enjoyed developing it. Please read the rest of this doc file, it contains tips and explanations of some of HyperBook's inner workings. The most important documentation is contained within the pages of HyperBook's Admin section, but this doc should be read at least once (BTW, I hate writing dox, but it's a necessary part of being a lone programmer).

<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center><hr>

<font size="4"><b><a name="terms">Terms of Use</a></b><br></font>
Downloading and using HyperBook is subject to the terms of the <a href="http://diamond-back.com/software/guestbook/license.html">License Agreement</a>. If you agree to these terms then you may use HyperBook for free... gratis, no charge. Since few people ever actually read the License Agreement, I'll summarize the key points here:

<ul compact>
	<li>You are permitted to download and install HyperBook on as many servers as you wish and keep back-up copies.
	<li>You are not permitted to redistribute or make HyperBook available for download.
	<li>You are not permitted to sell, rent or lease HyperBook to anyone.
	<li>You are not permitted to remove the program credits or copyright notice.
	<li>Modifications to the program will be considered derivative works and still subject to all terms of the License Agreement.
	<li>The software is provided on an "as is" basis, there is no warranty of fitness for a particular purpose.
	<li>I'm not liable for your site content or the posts left in your guestbook.
	<li>I'm not liable for any damages arising from the installation or any use of HyperBook.
	<li>Even though you may use the program for free, I retain the copyright to it.
</ul>

Essentially, I'm allowing anyone to use the program for free, but I won't allow anyone to profit from my work without permission. If you want to sell guestbook software then write your own, but don't even think about charging for my program. Even if you make changes to the program and improve it, you still are not permitted to distribute a program that contains <i>any</i> of my code. I'd like to note that prior to developing HyperBook I was using a fairly good free CGI guestbook and could have edited the code to include the extra features I wanted. However, the developer of that script had similar terms of use, and rather than violate them, I decide to write my own program from scratch. I ask for the same consideration.<br>
<br>
With regard to modifying the HyperBook PHP code for your own use, you are welcome to do so. In fact, I encourage you to do so (the source code is commented, though not extensively). If you would like to share your modifications, then send them to me and if they are used in a future release I'll give you full credit for your work. Or keep them all to yourself... it's your choice. Just don't take away my credits and copyright if you've built upon my work.<br>
<br>
There are some good reasons why I don't want you to offer HyperBook for download from your website. First of all, the copy you offer may be out-of-date. If a future version of HyperBook contains bug or security fixes, then that is the only version that should be available. By downloading the program from my site, the user is assured of always getting the most current version. It also gives a reasonable assurance that they are getting code that hasn't been tampered with. I hope HyperBook will gain a reputation for being secure and reliable, but if a modified version with potential bugs or security flaws were to be distributed, that reputation could become tarnished. So if you would like to make HyperBook available on your site, please link directly to the download file on my site... that will be the only "official" copy of the software.<br>

<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center><hr>

<font size="4"><b><a name="installation">Installation</a></b><br></font>
HyperBook was designed to be easy to install. It has been tested on UNIX systems running PHP Version 4.0.4pl1 and Apache. Hyperbook has also been successfully installed under Win98, Win2K and NT operating systems using Apache. Microsoft IIS has not been tested as of this writing. HyperBook is not designed to work with PHP prior to version 4.0.1. Note: HyperBook requires "register_globals" to be turned on in the php.ini file.<br>
<br>
The user should know how to upload files to their hosting account via FTP or Telnet, create new directories and set file permissions (if installing on a UNIX system).<br>
<br>
The first step is to download the <a href="http://diamond-back.com/software/guestbook/hyperbook.zip">hyperbook.zip</a> file and unzip it into a directory on your computer. For security reasons you should always obtain HyperBook files and updates from diamond-back.com, this will ensure that the PHP code has not been altered in a potentially harmful manner (either intentionally or accidently by a hacker/programmer).<br>
<br>
You should have the following files:
<ul compact>
	<li><b>admin.php</b> - Program that allows you to administrate your guestbook.
	<li><b>background1.jpg - background4.jpg</b> - Backgrounds used by the CAPTCHA feature to obscure text.
	<li><b>background.jpg</b> - Sample background, may be replaced with one of your own.
	<li><b>bannedwords.txt</b> - Short list of words you may wish to screen from your guestbook posts.
	<li><b>colorchart.html</b> - Small chart of 216 "browser safe" colors to assist with color selection.
	<li><b>database_functions.php</b> - Core database functions used by admin.php and index.php.
	<li><b>display_template.php</b> - Template used to display guestbook entries.
	<li><b>documentation.html</b> - HyperBook Administrator's instructions, the file you are reading.
	<li><b>guestbook.jpg</b> - Sample guestbook banner, may be replaced by one of your own.
	<li><b>index.php</b> - Program used by your guests to view and sign the guestbook.
	<li><b>input_template.php</b> - Template used to submit and edit guestbook entries.
	<li><b>language.conf</b> - List of words and phrases displayed to guestbook visitors.
	<li><b>logo.jpg</b> - The HyperBook logo.
	<li><b>phpinfo.php</b> - Optional program used to display the PHP configuration on your host, does not need to be uploaded.
	<li><b>readme.txt</b> - Brief HyperBook overview and set-up instructions.
	<li><b>signdown.jpg</b> - Sample "Sign the Guestbook" button in the mouseover state.
	<li><b>signup.jpg</b> - Sample "Sign the Guestbook" button in the normal mouse off state.
	<li><b>verification_image.php</b> - Script used to generate CAPTCHA images.
</ul>

Now that you have all the files listed above, you'll need to upload them to your hosting service (unless you are running a web server on your computer). Before you start uploading, you should be certain that your host supports PHP programs. If you're uncertain, upload the "phpinfo.php" file to your web directory and then display it in your browser. Hopefully you'll be greeted with a screen full of PHP configuration information, if instead you only see "&lt;? phpinfo() ?&gt;" then you may need to contact your system administrator and find out if PHP is available for your account. Alternately, you may also contact me about finding a host that supports PHP.<br>
<br>
Once you know PHP runs on your account, it's time to fire-up your favorite FTP or Telnet program and upload the HyperBook files.<br>
<br>

<b>Upgrade Notice:</b> If you have previously installed a version of HyperBook Guestbook lower than 1.10, only the following files need to be replaced:<br>
admin.php<br>
background1.jpg through background4.jpg<br>
database_functions.php<br>
display_template.php<br>
documentation.html<br>
index.php<br>
input_template.php<br>
language.conf (new file, needs to be chmod'ed to 777)<br>
verification_image.php<br>
Your data files will remain compatible with the current version so no posts will be lost. However, this might be a good time to back-up your data directory.<br>
<br>

<b>Step 1</b><br>
Create a new directory in your web file space (ie. where you keep your website files... this directory must be accessible from the web). You may give it any name you wish, I recommend calling it "guestbook" since it will be part of the URL used to visit your guestbook.<br>
<br>
<b>Step 2</b><br>
Set the permissions on the new directory to allow everyone to read, write and execute the files contained in it... ie. CHMOD to 777 (rwxrwxrwx).<br>
<br>
<b>Step 3</b><br>
Open the new directory and create a subdirectory called "data" and CHMOD it to 777. The name of this directory is not optional, it must be called "data" (all lower case), be inside the directory you created for your guestbook and have full permissions set.<br>
<br>
<b>Step 4</b><br>
Next upload the HyperBook files to the first directory you created (eg. "guestbook" - not the "data" directory). Files with a ".jpg" or ".gif" extension should be uploaded as binary files, all others should be uploaded as text. It's not necessary to upload the "readme.txt" file. Depending on your server's configuration, you may need to CHMOD the PHP files to be executable and the "language.conf" to be readable (CHMOD 777 will work).<br>
<br>
<b>Step 5</b><br>
Now that you have your files online, it's time to access the Admin program with your browser and complete the set-up procedure. Enter the URL to the admin.php program (eg. http://www.yourdomain.com/guestbook/admin.php) and you'll be presented with a short form to fill out with the necessary information to get your guestbook up and running. Each field has a short description of the information required, some fields even have the info filled-in if PHP was able to determine where your files are located. Make certain the information is correct and that all fields have been filled-in, then click the "Set-up Guestbook" button. You'll be able to update all information on this page if you change you mind later (eg. if you want to give your Guestbook a different name).<br>
<br>
Congratulations, if all went well you should see the Administrator's Main Menu and your guestbook is ready for visitors. If you see an "Enter Password" screen it probably means your browser isn't accepting cookies (which is where your password is stored so you don't have to keep entering it while navigating the admin program). If you see the Set-up screen again, then PHP was probably unable to write files to the data directory, make certain this directory is in your "guestbook" directory and the permissions have been properly set (see Step 3).<br>
<br>
You may now begin to customize the look and function of your guestbook. To link to your guestbook, use the URL to your guestbook directory (eg. <i>http://www.yourdomain.com/guestbook/</i> ). If your host server doesn't recognize "index.php" as the default file, you may need to add it to the link URL (eg. <i>http://www.yourdomain.com/guestbook/index.php</i> ). Using this URL will display the most recent posts to your guestbook, along with a link to sign the guestbook. If you would like to have a link directly to the Sign the Guestbook form, use this URL:<br>
<i>http://www.yourdomain.com/guestbook/index.php?action=sign</i><br>
<br>
The next section will walk you through each of the administration menus... try out the various functions and give your guestbook a complete test run.

<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center><hr>

<font size="4"><b><a name="administration">Administration Main Menu</a></b><br></font>
The Guestbook Administration section is where you control all aspects of your guestbook, from the questions that will be asked to the colors and graphics. It is also where you may edit, delete or add comments to guestbook entries, or import/export database files.  Each function in the Admin section is fully documented so you will not have to repeatedly refer back to this file. Because most of the documentation is in the program itself, this section will only provide an overview of where the functions can be found and tips for getting the most use out of them.<br>
<br>
In addition to the links to each admin section, the Main Menu has three search boxes. The Record search will pull up the post with the corresponding record number (the first post is record number one, etc.). Note that record numbers may change if a post is deleted, with each higher numbered post being reduced by one for each deleted post.<br>
<br>
The Name search will search posts based on the name field. The search is not case sensitive and partial matches will be returned. For example, a search for "mary" will return a record with the name "Ms. MaryJane." If only one match is found, it will be displayed in the Record Editor, if more than one match is found they will be displayed in the guestbook format with links to Edit or Delete.  Only the first 25 matches will be displayed, starting with the most recent post.<br>
<br>
The UID search will look for a record with the same Unique Identifier number. Each post is assigned a UID which, unlike record numbers, will never change. It is mostly used for displaying posts linked from a notification e-mail, but you may also search by this field if you know the UID of a post.

<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center><hr>

<font size="4"><b><a name="display">Administration: Display/Edit/Delete Posts</a></b><br></font>
This section will display guestbook entries the same way they appear to your guests, except that under each post there will be links to Edit and Delete the post. Also, if an IP address was recorded for an entry, that address and the Remote Host (if found) will be displayed. This information can be useful if you receive harassing posts in your guestbook, especially the Remote Host address which often contains the name of the visitor's ISP. When all else fails, you can try sending an e-mail to "abuse" at the visitor's ISP... be sure to include the IP address(es) associated with the harassing post(s), the exact time of each post (indicate your time zone) and the nature of the harassment (such as a copy of the post). Many responsible ISPs will use this information to find out who was using their service at the time of the incidents and either warn them or terminate their account.<br>
<br>
Clicking on the Edit link will load the corresponding post into the Editor, where you may change or remove any of the information entered. You also have the option of adding a "Guestbook Administrator's Comment" which will appear in italics under the visitor's comments... a convenient way to answer questions or return a compliment (or perhaps an non-compliment, if you get my drift).<br>
<br>
Sometimes a post just has to go, and that's why there is a Delete link under each entry. Chances are it will be much easier for the Admin to click the delete button than it was for the visitor to enter the unwanted post. Before the post is sent to the bit bucket, a confirmation (Confirm/Cancel) screen will be displayed... just in case you clicked Delete by mistake.<br>
<br>
You may also follow the link to "Sign the Guestbook" from this page. When the Admin adds a post to the guestbook, all of the same rules apply regarding field lengths, stripping of HTML tags and banned words (if activated), but no IP Check is performed and a notification e-mail will not be sent.

<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center><hr>

<font size="4"><b><a name="logout">Administration: Admin Log Out</a></b><br></font>
When you log into the Admin section, your password is stored in a "cookie" file on your computer. To prevent other people who may have access to your computer from being able to use the Admin section, click on the "Admin Log Out" link which will set the password in the cookie to "null" and block further access until the correct password has been reentered at the Log-In screen.

<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center><hr>

<font size="4"><b><a name="configuration">Administration: Guestbook Configuration</a></b><br></font>
This is the heart of HyperBook, where you can change the information displayed by the guestbook and how it functions.<br>
<br>
The <b>Guestbook Name</b> is the title of the guestbook which will be displayed unless a Guestbook Banner is specified in the "Color/Graphics Selection." The Guestbook Name will also be included in the subject of any notification e-mails if this feature ihas been activated.<br>
<br>
The <b>Website Title</b> is displayed in links back to the homepage. It may be entered as a short message such as "Click here to return to the homepage."<br>
<br>
The <b>Homepage URL</b> is used in links back to the homepage. It must be proceeded by "http://" though this will be automatically added if omitted. If no URL is specified, a link back to the homepage will not be displayed in the guestbook.<br>
<br>
The <b>Webmaster E-mail Address</b> is the e-mail address which will be displayed for private messages if this option is checked (see below).<br>
<br>
The <b>Admin Program URL</b> is used to create links in e-mail notifications and should have been correctly determined when you set-up your guestbook.  If your homepage URL changes, be sure to update this setting.<br>
<br>
If the <b>Send E-mail Notification</b> box has been checked, notifications of new additions to the guestbook will be sent to each of the e-mail addresses entered in the <b>E-mail Notification List</b>. The addresses should be separated by a comma. The list can contain up to 3,000 characters, enough for hundreds of e-mail addresses. This is intended for websites administered by a group of people so everyone will be notified when a new post has been submitted. Along with the complete text of the post, a link will be given to go directly to the Editor for that post (to make changes, delete or add a comment). If you are not already logged in via a cookie, you will first be prompted to enter the admin password before dropping into the Editor. Anyone on the notification list who does not know the password will not be able to use this link. Note that notifications also display the poster's IP Address and Remote Host, which is not normally displayed to the public.<br>
<br>
Depending on where your website is hosted, the time stamp returned by the server may be different than your local time. Using the <b>Time Zone 
Offset</b> you may adjust the time displayed on guestbook posts by adding or subtracting a number of hours. For example, if you make a post at 3pm 
local time and it is displayed as 1pm, then enter a "2" for the offset and all subsequent posts will have the displayed time increased by two hours. 
Likewise, if the displayed time were 5pm, enter a "-2" to decrease the displayed time by two hours.<br>
<br>
The <b>IP Check</b> is used to keep a log of the IP addresses of the last 25 posts. You may use it to determine how many times someone at a particular IP address may enter posts (at least within a span of 25 posts). If this feature is set to "1" then only one post will be allowed from a particular IP address within the 25 post span. To allow for additional posts, increase this number (eg. a "3" will allow up to three posts within the last 25 logged). Entering a "0" will disable IP Logging, which will allow any number of posts to be submitted by the same IP address. It is advisable to set this number low to discourage guestbook "flooding," where one person enters many posts, usually to harass the guestbook owner. IP Logging will not completely stop someone from making multiple posts, it's possible to obtain leases on new IP addresses and then continue posting (for example, an ISP dial-up customer could disconnect and then dial-in again, most likely being assigned a different IP address). However, it should slow down an abusive guest, making it more difficult to flood a guestbook... and it should be easier for the Admin to delete the posts than it was for the guest to obtain new IP addresses (consider that to be a small victory). Note that some ISPs use cache servers which will report the IP of the server rather than the user. 
For this reason it is recommended that the IP Check be set to "5" or higher so that different users of the same cache server are not inadvertently 
blocked.<br>
<br>
<b>Posts Per Page</b> allows you to determine how many entries are displayed on each page. Usually ten posts is about right, though you could try as few as five or as many as 25 and decide what works best for you.<br>
<br>
<b>Banned Words</b> will allow you to screen words from all fields of a guestbook post. You may edit the "bannedwords.txt" file in your guestbook directory to add or remove words from the list. If found, the characters in banned words will be replaced with asterisks (*) anywhere that they appear in a post. The match is case insensitive, so banned words only need to be added once. For example, if "micro" were a banned word, then "Microsoft" (even in all caps) would be changed to "*****soft". If you wanted to ban the entire word "microsoft," then enter it on the list prior to "micro," otherwise it would be changed to "*****soft" before the check for "microsoft." By default, Banned Words is not activated, you must check the box to turn it on.<br>
<br>
<b>CAPTCHA</b> (Completely Automated Public Turing Test to Tell Computers and Humans Apart)<br> is used to prevent spammers from using scripts (spambots) to post messages in the guestbook. When selected, guests will be asked to enter a five digit code which appears on a graphic before their post will be accepted. This feature requires the <a href="http://www.php.net/manual/en/ref.image.php" target="_blank">GD library module</a> and the use of <a href="http://www.php.net/manual/en/ref.session.php" target="_blank">sessions</a>.<br>
<br>
<b>No URLs</b> will prevent spammers from leaving URLs in their posts in two ways. First, the homepage/URL fields will no longer be displayed. If a URL is submitted anyway (as when an automated script submits data directly to the guestbook), the entire post will be rejected. Second, a search will be performed for "http://" in the comments and if found, again the post will be rejected. You may wish to make a note of this in the Welcome Message section so your guests will know beforehand not to attempt to include URLs in their comments.<br>
<br>
<b>Hide E-mail Addresses</b> when checked will prevent guests' e-mail addresses from being displayed to the public. The administrator will still see e-mail addresses when viewing posts from the Admin script. This feature is designed to allow guests to leave an address the admin may use to contact them without spammers being able to "harvest" the addresses.<br>
<br>
<b>Password Cookie Expiration</b> allows you to set the time before the cookie containing the Admin password saved on your computer will expire (ie. be removed). It may be set to as little as one hour or as long as one year. Note that cookies are associated with a website based on the URL, any change to the URL will render a cookie non-functional. It is strongly recommended that you not rely on cookies too much, they sometimes fail and you will need to enter your password manually at the log-in screen (at which time the cookie expiration will be reset). It's also not unheard of for a cookie to be "stolen" by some other website, which would reveal your password. You may nullify a Password Cookie at any time by clicking on the Admin Log Out link.<br>
<br>
Up to three <b>Additional Questions</b> may be added to your guestbook for a personal touch. Both the questions and the answers may be up to 100 characters in length. Your questions are stored along with the guest's answers in each guestbook entry, so you may change the questions as often as you wish (even daily) without interfering with the questions displayed with past answers. For example, you may ask your first hundred visitors what their favorite band is, and the next hundred what their favorite movie is... the appropriate question/answer will be displayed in all 200 entries. To temporarily remove the display of a question/answer, uncheck the <b>Displayed</b> box next to each additional question (and don't forget to check the box when adding questions). If a guest chooses not answer a question, that question will not be displayed in the resulting post.<br>
<br>
<b>Found Options</b> will be displayed in a dropdown list on the Sign Guestbook form. This was done to encourage visitors to indicate how they found your website, a topic of interest to most webmasters. You should add as many additional options to this list as you can think of and it may be updated at any time. Visitors are also given a blank field to enter a note about how they found you site, if they enter anything in this field it will be displayed in place of an option from the dropdown list. Note that if you edit a post, a choice from the dropdown list will take precedence over the "blank field" entry.<br>
<br>
<b>Display UIN (ICQ Number) Field</b> will display a field for ICQ users to enter their personal contact number. ICQ is a popular "instant messaging" program, many people use their ICQ number (aka UIN) in place of an e-mail address, so you have an option to display this field. If an ICQ number is entered, it will be displayed as a link to the "ICQ Personal Communication Center" page for that user.<br>
<br>
If you check the <b>Display Webmaster's E-mail Address</b> option box, then the Webmaster e-mail address will be displayed in a note on the Sign Guestbook page instructing visitors to send "private messages" to that address. Some guestbooks allow private messages that can only be read by the Admin to be posted, but that seems to defeat the purpose of a guestbook, which is to state opinions publicly. E-mail seems to be the more appropriate venue for private messages, and the absence of private messages in your guestbook will make it more interesting for your visitors to read. Some people really do read other people's guestbooks, especially if the website they are associated with is interesting and they all looking for other people with similar interests (or have absolutely no life of their own *g*).<br>
<br>
The <b>Welcome Message</b> is displayed on the Sign Guestbook page. It can be used to explain why you have a guestbook or suggest what kind of comments you are interested in receiving. This message can set the tone of your guestbook.<br>
<br>
The <b>Thank You Message</b> you enter will be displayed to visitors after they sign your guestbook. It's nice to receive compliments about your site, and a personal thank you message is a nice way to show your appreciation to your guests.<br>
<br>
The <b>Header Tag HTML</b> allows you to have a short section of code inserted at the top of each page. Some free hosting services (such as <a href="http://spaceports.com" target="_blank">Spaceports</a>) require you to display their ad banners on your pages, entering the banner code in this box will allow you to meet that requirement. You may enter any code you wish in this box, but use caution to insure you have closed any font, link or table tags. Your code will be inserted in the main body of the HTML document after the body tag.

<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center><hr>

<font size="4"><b><a name="dbman">Administration: Database Manager</a></b><br></font>
Under normal use, you will probably never need to access the Database Manager unless you move your guestbook to a different server. However, it does provide some powerful tools for managing your database if you <i>know what you are doing.</i><br>
<br>
While HyperBook does not currently have a back-up feature, the file structure has been designed to make it easy for you to back-up your database via FTP or Telnet. All files in the main guestbook directory are static (ie. never change, except when installing an updated version), all dynamic (ie. changing) files are located in the "data" directory located within the directory you created for your guestbook. To back-up your database, simply download (as text) all files located in the data directory to your local drive. To restore your database, upload all files back to the data directory and then CHMOD the files to 777 (ie. full permissions, rwxrwxrwx).<br>
<br>
The <b>Data Directory Pathway</b> is used by the program to find where your guestbook data is being stored on your host's server. It is not a URL, but rather a pathway, normally starting either with the root directory of you host's hard drive or your account's main directory. The "data" directory should always be located within the directory you created for your guestbook. PHP will attempt to determine this pathway based on the location of the admin.php file. If you change the name of your guestbook directory or the path to that directory changes, you'll need to update this field.<br>
<br>
The <b>Number of Records Per File</b> should normally be set at 25. This is the maximum number of records HyperBook expects to find in each database file. If you change this setting without also changing the number of records in each file, HyperBook will either fail to load all records (if the setting is lowered) or generate errors when the next record isn't found (if the setting is raised). Since HyperBook uses this setting to "know" how many records are in each file, it is able to determine which file contains a particular record based on that record's number (eg. if there are 25 records in each file, then the 52nd record would be in the 3rd file). This is why HyperBook's database is very efficient, for most operations it doesn't have to search through all files to find a particular record or range of records. The only reason you may wish to change this setting is to increase the number of records in each file, which will increase the size of each file but reduce the total number of files required to hold all records. To do this, first use the "Export Database" function to create a file (records.dat) which contains all the records, then clear the database, change the Number of Records Per File setting, and finally use the "Import Database" function to reload the records with the new setting. This procedure has been tested, however if you have a large database the Import Database function could time out before completing the import routine (see <a href="#issues">Known Issues</a> for more details). For this reason you should always back-up your database prior to using any of the functions in this section.<br>
<br>
The <b>Clear Database</b> function will delete all files containing guestbook records and reset the number of posts to 0. This is a quick way to "reset" your guestbook if you've been adding test posts or want to start over. Since accidentally clearing your guestbook could be a disaster, you will be presented with a confirmation screen before the actual clearing takes place.<br>
<br>
The <b>Export Database</b> function will read each of the "multi-file flat text" database files and save all the records in a single file called "records.dat" in your data directory. The record format remains the same as described below (see <a href="#structure">Database Structure</a> for details), but since all the records are in a single file they may be easier for you to import into another database program such as Microsoft Access or Excel. Future versions of HyperBook may also support CSV (comma separated values) or tab delimited format if there is a need for these formats.<br>
<br>
The <b>Import Database</b> function is essentially the reverse of the export function. It will read all records from a file called "records.dat" stored in the data directory and <i>append</i> them to the HyperBook database. This can be a very powerful feature for importing records from another guestbook program (see <a href="#importing">Importing Databases</a> for more information). However, the lines of data in the record.dat file <i>must be</i> in the HyperBook record format (see <a href="#structure">Database Structure</a> for details). No error checking is performed on these records, they will be imported "as is" and if they are not in the proper format you will corrupt your HyperBook database. So use this feature with extreme caution if you already have records in your HyperBook database (I recommend you back-up the database prior to importing new records). New records will be appended to your database in the order they are found in the records.dat file, so be sure the oldest entries are listed first. Make certain the records.dat file has been CHMOD'ed to allow reading prior to importing. If all goes well, a confirmation will be displayed reporting the number of new records which were imported.

<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center><hr>

<font size="4"><b><a name="color">Administration: Color/Graphic Selection</a></b><br></font>
Your HyperBook guestbook should look like it's part of your website. One way to insure this is to configure the colors and add graphics that match your other pages. The best way to become familiar with the Color/Graphics Section is to play with it... keep trying different color combinations until you find one that works for you. Near the bottom of the page you'll find a Preview Box to give you an idea of how the current colors will look. You may also open your guestbook in another browser window and reload/refresh the screen after each color change for an instant "real world" preview.<br>
<br>
Note that the guestbook is displayed inside a table with a width of 600 pixels. This was done so sites which use frames should be able to display the guestbook within a frame if so desired. Future versions of HyperBook may include separate "header" and "footer" files to further customize the size and look of the guestbook pages.<br>
<br>
The <b>Guestbook Banner URL</b> is a link to the graphic you wish to display at the top of the pages where posts are displayed. HyperBook comes with a sample banner graphic called "guestbook.jpg"... you are welcome to replace this graphic with one of your own design. If you upload the new graphic into the guestbook directory, you will only need to enter the name of the graphic. If it is located outside the guestbook directory, use a "fully qualified" URL (eg. http://www.somedomain.com/graphicsfolder/bannergraphic.gif). If no graphic is supplied (ie. you leave the Guestbook Banner URL field blank), the name of your guestbook will be displayed inside a table in place of the graphic. Since the width if the guestbook table is 600 pixels, it is recommended that your banner graphic not exceed this width.<br>
<br>
The <b>Sign Guestbook Button URL</b> is a link to a graphic which will appear on each display page as a link to the Sign Guestbook page. If no graphic is supplied, a text link will be displayed in it's place. The same rules that apply to the Guestbook Banner URL also apply here.<br>
<br>
The <b>Sign Guestbook Button URL 2 (Mouseover)</b> is a special feature of HyperBook. If both this and a Sign Guestbook Button URL (above) are supplied, they will be used together with a short Javascript to create a mouseover button effect. The first button graphic will be displayed until the mouse pointer passes over it, at which time the second button graphic will be displayed in its place. This can be used to make a button appear to light-up or be pressed into the page when the mouse pointer passes over it. It is recommended that both graphics have exactly the same dimensions (height and width) and have fairly small file sizes (a few kilobytes each). If a visitor to your page has Javascript disabled on their browser, only the first graphic will be displayed, but the link will still work.<br>
<br>
You may also supply a <b>Guestbook Background Image URL</b> similar to the banner and sign buttons. This graphic will generally appear as the background outside the tables displayed by the guestbook, however, if you don't supply color codes for the tables (see below), some browsers will display the background graphic inside these tables. Experiment and see what looks best, but be advised that you should look at the results with both Netscape and Internet Explorer because there may be differences in the way they display your pages.<br>
<br>
The <b>Color Selection</b> boxes is where you enter the color codes for the various areas and text that your guestbook will display. Use the Preview Box as a guide to which colors will be changed. Under the Preview Box you'll find a link to the <b>Pop-up Color Chart</b> which contains the hex codes for the 216 "browser safe" colors. You may use these to help select colors for your guestbook, though you are not limited to these 216 colors. Most of today's graphics cards can display thousands, if not millions, of colors, however older computers may not be able to handle the "non-safe" colors which could produce strange (usually ugly) results. It's up to you whether to use a "safe" color or pick one of the millions in between. Tip: if you double click on a color code in the chart, it will select/highlight that color. You may then copy (control-c) and paste (control-v) it into a color selection input box.

<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center><hr>

<font size="4"><b><a name="password">Administration: Change Password</a></b><br></font>
You may change the Admin password any time you are logged into the Admin section. Your password must be at least 6 characters long (the maximum lenght is 20 characters). Passwords are case sensitive ("MyPassword" is different from "mypassword") and may contain both letters and numbers. It's advisible to use a combination of letters and numbers to make a password difficult to guess.<br>
<br>
It goes without saying that you should either write your password down or be sure to choose one you can remember. HyperBook saves your password in an encrypted format, it would be very difficult to recover. There are no "back doors" to get into HyperBook, the best you could do is comment out the password check lines in the admin.php source code, use the modified copy to get into the Admin section, set a new password and then restore the unmodified version.

<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center><hr>

<font size="4"><b><a name="iplog">Administration: Reset IP Address Log</a></b><br></font>
The IP Log is used to record the IP Address of the last 25 visitors who posted in your guestbook. By logging these IPs, you may use the IP Check feature on the Guestbook Configuration page to put a quota on how many times someone may post in your guestbook (at least within a span of 25 posts). There may be times when you would like to clear the log, which is what this feature will do.

<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center><hr>

<font size="4"><b><a name="updates">Administration: Check for Version Updates</a></b><br></font>
The Version Update page loads a small graphic from Diamond-Back.com based on the version of HyperBook you are currently using. If you have the most current version, you will see a green "No Update Required" graphic. If a routine update has been released with new features, an orange "Update Available" graphic is displayed. If a bug fix or security glitch has been corrected, a red "Update Recommended" message will be displayed. When updates are available, you may click on the link displayed at the bottom of the page for more information and download instructions. Every effort will be made to design updates to be easy to install and without losing any of your existing guestbook posts.

<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center><hr>

<font size="4"><b><a name="register">Administration: Register Program (free)</a></b><br></font>
In addition to using the Check for Version Updates page, you are invited to register your HyperBook guestbook so critical update messages may be e-mailed to you as soon as they become available. You may also have you website linked from the HyperBook page as a user of the program if you wish. There is no fee for registering HyperBook and your information will be kept strictly confidential. Only e-mails regarding HyperBook will be sent to the e-mail address you submit. Hopefully there will never be a critical update needed, but if there ever is, you'll want to know about it ASAP. Along with your form data, the registration e-mail will also send your HyperBook version number and server software version numbers (from the Apache "SERVER_SOFTWARE" Environment Variable, if present). This information is used so we can determine which version your are using and track the servers under which HyperBook has been successfully installed. Note: If you change your e-mail or website address, please resubmit your new information and indicate the previous URL/e-mail so our records may be updated.

<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center><hr>

<font size="4"><b><a name="feedback">Administration: Feedback Form</a></b><br></font>
The Feedback Form is used for submitting bug reports and suggestions for future upgrades. Your general comments regarding HyperBook are also welcome, I would like to know what you find most useful with the program or what you don't like about it. Depending on my workload (which is usually pretty heavy), I may not be able to respond to every message, but I will read them and check into all bug reports. In particular I can't promise to respond to all tech support requests, but will do my best to answer questions pertinent to HyperBook. If you have a question regarding other software products (eg. "How do I upload files with WS_FTP?"), your host's server (eg. "What version of PHP do I have?") or PHP programming (eg. "What does eregi_replace do?") I would suggest checking the product's help file, asking your server admin, reading the PHP docs or joining a PHP developer's list. If your question is about HyperBook, check to see if it was already covered in this document or in the program itself. But if all else fails, ask away and I'll try to get back to you as soon as I can. Note: Along with your form data, the feedback e-mail will also send your HyperBook version number and server software version numbers (from the Apache "SERVER_SOFTWARE" Environment Variable, if present). This information is helpful when responding to tech support requests.

<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center><hr>

<font size="4"><b><a name="language">Alternate Language Configuration</a></b><br></font>
In response to many requests, alternate language support was added to HyperBook version 1.10. All text displayed to guestbook visitors is contained within the "language.conf" file. You are welcome to translate the words/phrases in this file to the language of your choice and upload the new language.conf file in place of the default English configuration file (be certain to CHMOD the file to 777). Note that each word/phrase is terminated by a character 13 (carriage return), this preserves the order of the phrases and must not be changed. To add a break to a phrase, insert an HTML break tag (ie. &lt;br&gt;). To preserve proper formatting, some phases should be kept as short as possible, especially those appearing in the navigation bar (ie. "Entries", "Displaying page", "of", "Previous", "Next", "Go to page" and "Go") and on the display template (ie "Record Number", "Posted", "Name", "Website", "Found", "E-mail" and "Location"). To complete the translation process, remember to also change the Found Options, Welcome and Thank You Messages in the <a href="#configuration">Guestbook Configuration</a> section.<br>
<br>
Alternate language configuration files will be posted for download from the <a href="http://diamond-back.com/software/guestbook/">HyperBook site</a> as they become available. If you have translated the language.conf file to a language not currently available, we would very much appreciate your sharing it with us... please e-mail your file to <a href="mailto:hide@address.com">hide@address.com</a>.<br>
<br>
In addition to supporting languages other than English, the language.conf file can be used to create new uses for HyperBook other than a conventional guestbook. For example, HyperBook has been used as a "Shout Out" page and club notification page. To make HyperBook "look" like something other than a guestbook, all references to "guestbook" may be changed in the language.conf file (eg. "guestbook" changed to "shout out"). If you have an idea for alternate uses of HyperBook we would like to hear about them.

<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center><hr>

<font size="4"><b><a name="structure">Database Structure</a></b><br></font>
All database records are stored in the "data" directory. The "dbconfiguration.dat" file contains the total number of records, next UID, number of record per file and the full pathway to the data directory. The "gbconfiguration.dat" file contains the guestbook configuration (name, colors, additional questions, etc.). The records are contained in the "data" files, numbered from the earliest posts to the most recent (eg. data_1, data_2, etc.).<br>
<br>
The HyperBook record format is as follows: each record is a single line terminated by a line break (character 13 and a linefeed). Records are divided into fields using "pipes": | chr(124). If a pipe is to appear as part of a field, it should first be converted into an HTML entity (&amp;#124;) so it will not be mistaken for a field delimiter. Likewise, all line breaks should be converted to "&lt;br&gt;" tags so that a record will not be prematurely terminated. URLs are stored with the "http://" prefix and will not work properly without it. The only expected fields are name, date and comments, the rest may be left blank (the pipes will still be required to hold their place, eg. a missing e-mail would be || ). UID is a "unique identifier" used when searching for a particular record, it is only used for identifying posts in e-mail notifications and should be left blank in imported records. Note that there are 23 fields in total (counting starts at "0").<br><br>

<table cellpadding="3" cellspacing="0" border="0" bgcolor="#ffffff" align="center"><tr><td>
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff"><tr>
<td><font size="3" face="Arial" color="#000000">00<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">01<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">02<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">03<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">04<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">05<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">06<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">07<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">08<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">09<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">10<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">11<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">12<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">13<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">14<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">15<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">16<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">17<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">18<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">19<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">20<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">21<font color="#ff0000">|</font></font></td>
<td><font size="3" face="Arial" color="#000000">22</font></td>
</tr></table>
</td></tr></table><br>

<table cellpadding="5" cellspacing="0" border="0" bgcolor="#ffffff" align="center"><tr><td>
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff" align="center"><tr>
<td><font size="2" face="Arial" color="#000000"><b>&nbsp; Field &nbsp;</b></font></td>
<td><td><font size="2" face="Arial" color="#000000"><b>Description</b></font></td>
<td><font size="2" face="Arial" color="#000000"><b>&nbsp; Field &nbsp;</b></font></td>
<td><td><font size="2" face="Arial" color="#000000"><b>Description</b></font></td>
</tr><tr>

<td align="center"><font size="2" face="Arial" color="#000000">00</font></td>
<td><font size="2" face="Arial" color="#000000">Name or Handle</font></td>
<td align="center"><font size="2" face="Arial" color="#000000">12</font></td>
<td><font size="2" face="Arial" color="#000000">Question 2</font></td>
</tr><tr>

<td align="center"><font size="2" face="Arial" color="#000000">01</font></td>
<td><font size="2" face="Arial" color="#000000">Date of Post</font></td>
<td align="center"><font size="2" face="Arial" color="#000000">13</font></td>
<td><font size="2" face="Arial" color="#000000">Question 3</font></td>
</tr><tr>

<td align="center"><font size="2" face="Arial" color="#000000">02</font></td>
<td><font size="2" face="Arial" color="#000000">E-mail Address</font></td>
<td align="center"><font size="2" face="Arial" color="#000000">14</font></td>
<td><font size="2" face="Arial" color="#000000">Answer 1</font></td>
</tr><tr>

<td align="center"><font size="2" face="Arial" color="#000000">03</font></td>
<td><font size="2" face="Arial" color="#000000">Homepage Address</font></td>
<td align="center"><font size="2" face="Arial" color="#000000">15</font></td>
<td><font size="2" face="Arial" color="#000000">Answer 2</font></td>
</tr><tr>

<td align="center"><font size="2" face="Arial" color="#000000">04</font></td>
<td><font size="2" face="Arial" color="#000000">Homepage Title</font></td>
<td align="center"><font size="2" face="Arial" color="#000000">16</font></td>
<td><font size="2" face="Arial" color="#000000">Answer 3</font></td>
</tr><tr>

<td align="center"><font size="2" face="Arial" color="#000000">05</font></td>
<td><font size="2" face="Arial" color="#000000">ICQ Number/UIN</font></td>
<td align="center"><font size="2" face="Arial" color="#000000">17</font></td>
<td><font size="2" face="Arial" color="#000000">Admin Comments</font></td>
</tr><tr>

<td align="center"><font size="2" face="Arial" color="#000000">06</font></td>
<td><font size="2" face="Arial" color="#000000">How Found</font></td>
<td align="center"><font size="2" face="Arial" color="#000000">18</font></td>
<td><font size="2" face="Arial" color="#000000">UID</font></td>
</tr><tr>

<td align="center"><font size="2" face="Arial" color="#000000">07</font></td>
<td><font size="2" face="Arial" color="#000000">Location</font></td>
<td align="center"><font size="2" face="Arial" color="#000000">19</font></td>
<td><font size="2" face="Arial" color="#000000">Future Expansion</font></td>
</tr><tr>

<td align="center"><font size="2" face="Arial" color="#000000">08</font></td>
<td><font size="2" face="Arial" color="#000000">Comments</font></td>
<td align="center"><font size="2" face="Arial" color="#000000">20</font></td>
<td><font size="2" face="Arial" color="#000000">Future Expansion</font></td>
</tr><tr>

<td align="center"><font size="2" face="Arial" color="#000000">09</font></td>
<td><font size="2" face="Arial" color="#000000">IP Address</font></td>
<td align="center"><font size="2" face="Arial" color="#000000">21</font></td>
<td><font size="2" face="Arial" color="#000000">Future Expansion</font></td>
</tr><tr>

<td align="center"><font size="2" face="Arial" color="#000000">10</font></td>
<td><font size="2" face="Arial" color="#000000">Remote Host</font></td>
<td align="center"><font size="2" face="Arial" color="#000000">22</font></td>
<td><font size="2" face="Arial" color="#000000">Future Expansion</font></td>
</tr><tr>

<td align="center"><font size="2" face="Arial" color="#000000">11</font></td>
<td><font size="2" face="Arial" color="#000000">Question 1</font></td>
<td align="center"><font size="2" face="Arial" color="#000000">&nbsp;</font></td>
<td><font size="2" face="Arial" color="#000000">&nbsp;</font></td>

</tr></table>
</td></tr></table>
<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center><hr>

<font size="4"><b><a name="importing">Importing Databases</a></b><br></font>
Due to the wide variety of guestbooks in use today, there is no easy "one size fits all" solution for importing records from an existing guestbook into HyperBook. "Remote hosted" guestbooks such as GuestGEAR or Bravenet tend to be the most difficult because the raw data files are usually not available, only the display pages may be used to "slurp up" the old posts. CGI or PHP guestbooks which are run on your own host are somewhat easier to import because the database used by these programs is saved within your account and therefore available to be downloaded and manipulated. In either case, the first (and most difficult) step is to extract the post data from the old guestbook and save it in the HyperBook record format (see above). Once saved in that format, it's relatively easy to use HyperBook's "Import Database" function to complete the task of adding records to your database.<br>
<br>
If you don't have a large number of records in your existing guestbook you could always copy and paste them into HyperBook via the Sign Guestbook form. This is the "low tech" and somewhat tedious approach, but it definitely works. For PHP programmers, the next best solution is to write a "parse script" where an entire page of posts may be entered in a text box, then let the script extract the necessary data (name, date, e-mail, comments, etc.) and save it in HyperBook record format. Just such a script was written during the development of HyperBook for importing one page of GuestGEAR records at a time and will be made available for download as a utility script. However, due to the wide range of formatting options available in GuestGEAR, the utility script will probably require some "tweaking" to work on any particular guestbook. Hence, to be useful as a starting point you'll need some PHP programming ability.<br>
<br>
If you have a guestbook which saves data within your hosting account, importing the records may be easier. While the record format used by other CGI or PHP guestbooks varies, chances are it will be somewhat similar to HyperBook's format (ie. a flat text database). The goal is it determine what order the fields are saved in, then write a script to read in the existing records and resave them in HyperBook format. A utility script for doing this will also be made available for download as a "jumping off point" for programmers.<br>
<br>
I wish I had the time to write custom import scripts for all of the popular guestbooks in use today, but unfortunately a task this large is just too much for one person to handle. Instead, I encourage other PHP programmers to take up the challenge and submit scripts for importing records from other guestbooks, which I'll post as utilities at the HyperBook site.<br>
<br>
If you absolutely, positively <i>must</i> have your old records imported into HyperBook and don't know how to do it yourself, I would suggest hiring a programmer with database experience to assist you. This document contains full details of the HyperBook record format, and the program itself will do half the work via the "Import Database" function. You may also contact me for hire, though I didn't create HyperBook as a "make work" project... most of my clients are corporations interested in developing interactive websites.<br>
<br>
The amount of further development performed in this area will depend on how much interest HyperBook generates. If there are a large number of webmasters interested in using it and importing their existing databases, then I'll try to support this task as much as possible. If the interest is low, then I'll move on to new projects... we'll just have to see what happens.

<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center><hr>

<font size="4"><b><a name="issues">Known Issues</a></b><br></font>
The number one known issue affecting HyperBook, and all other PHP scripts, is the "max execution time" setting when running PHP in "safe mode." Since most PHP installations on community servers are likely to have safe mode on, so this is a concern for many webmasters running PHP scripts. Max execution time determines how long a PHP script is allowed to run... and a premature shutdown could be disastrous during file updating operations. By default, max exe time is set at 30 seconds, though it may be set to any value by the system administrator (for example, it's set to 20 seconds on my host's server). The max exe time doesn't directly determine how much work a PHP script can perform; the speed of the host computer, disk access times and server load will all have an affect on overall script performance.<br>
<br>
To give you a general idea of how well HyperBook is performing on your system, approximate script execution time and time remaining are displayed under the link menu in the various admin sections and in the conformation boxes after some operations. Since the script isn't finished at the point where the execution time is calculated, the actual time will be slightly higher, but the time displayed should be very close to the actual time. If HyperBook was able to determine the max exe time setting on your system, the time remaining will also be displayed. Most operations should require less than a second, but there are a few notable exceptions that you need to be aware of.<br>
<br>
When a record is deleted from the HyperBook database, each higher record (ie. later posts) must be shifted down one to maintain the number of records in each file. If a low record is deleted from a very large database, the number of files that need to be updated could cause a time out error. This would result in a corrupted database due to some data files being updated while others were not. Note that this is only likely to occur with very large databases, and then only when an early (ie. low numbered) post is deleted. When deleting a recently posted message, only the most recent data files will require updating, so there shouldn't be any time out issues regardless of how many total records are present. Therefore, it is advisable to delete unwanted posts sooner rather than later, though under normal circumstances you should be able to safely delete records which are thousands of posts deep. Likewise, if you import a large number of records into the database, it is advisable to remove any unwanted records prior to the import. Of course the database Import and Export functions are also susceptible to time outs, as are name searches since they may require searching all records.<br>
<br>
Despite these limitations, most HyperBook functions do not require accessing more than a few small files, even if there are millions of records in the database. Displaying a page of posts will only require reading one or two data files, editing or saving a new record only requires reading and/or writing to a single file. Since these are the most common operations, HyperBook should function flawlessly even with huge databases. During testing, a database of over 15 thousand posts was used with all delete, import and export functions completing in under 5 seconds. Your results may vary depending on the speed of you host's computer, disk drives and server load. It is recommended that you back-up your data directory prior to performing an operation which could potentially time out, such as deleting a low numbered record from a very large database or importing a large number of records. Performing these operation during off-peek hours (usually early in the morning) may also improve performance due to lower server load. Make a note of the execution times displayed in the link menu and conformation boxes to gauge how well HyperBook is performing on your host's system.<br>
<br>
If you experience time out errors or excessive script execution times, you may wish to contact your system administrator and ask if the PHP max_execution_time could be raised. Some hosts tend to overload their servers with more accounts than can be reasonably handled, if this is the case you should consider finding a host who takes better care of their customers. You're welcome to contact me regarding a better host... mine has been excellent when it comes to providing sufficient resources for their customers.<br>
<br>
Another possible problem area is the inability of PHP to save the Admin's password to a cookie when running HyperBook on a hosting service which displays pop-up ads whenever a page is loaded. Cookie data is sent in the HTTP page header, therefore the "setcookie" function must be executed prior to any data being sent to the browser (which automatically sends the header). Some services add the pop-up script at the start of the page, which seems to trigger the header to be sent before the PHP script has a chance to set the cookie. Alternatives to using cookies will be researched as a work around to this problem.<br>
<br>
Some browsers do not handle cookies correctly, such as Netscape Communicator 4.05 and Microsoft Internet Explorer 3.x. If you are using one of these browsers we recommend upgrading to a more current version. No testing has been (or will be) performed with AOL browsers.<br>
<br>
Note that cookies are stored based on domain name. Since some domains can be accessed with and without the "www" (eg. my guestbook can be accessed at both "http://diamond-back.com/guestbook/" and "http://www.diamond-back.com/guestbook/"), if the password cookie is set from "http://yourdomain.com/guestbook/admin.php" the cookie will not be recognized from "http://www.yourdomain.com/guestbook/admin.php". The solution is to either access the Admin program from exactly the same domain name or log-in again and set a new cookie. If the password is changed, only the cookie for the domain you are logged-in from will be updated.<br>
<br>
File locking in HyperBook version 1.10 is designed to use PHP's operation keywords (LOCK_SH, LOCK_EX and LOCK_UN). For file locking to work properly in versions prior to PHP 4.0.1, these keywords may need to be replaced with the values 1, 2 and 3 respectively. However, if you are using an earlier version of PHP it is strongly recommended that you upgrade.
<br>
As other issues become known they will be announced and hopefully corrected. HyperBook will also be tweaked for better performance wherever possible. Your suggestions and reports are welcome, please use the Feedback Form to contact me.

<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center><hr>

<font size="4"><b><a name="developer">About the Developer</a></b><br></font>
Thomas Pasawicz began programming computers in 1986 with a TI-99/4a and soon upgraded to an Apple ][. Writing in Applesoft, he developed a BBS (Bulletin Board System) for local dial-up use... his first "on line" project. By 1996 he started developing Internet websites and now works as a freelance programmer/designer. In addition to creating corporate websites using HTML, PHP, MySQL and Flash, he also maintains a personal website at <a href="http://diamond-back.com" target="_blank">Diamond-Back.com</a> featuring an ICQ rumor section and a site for his friends to chat at <a href="http://smartasses.org" target="_blank">Smartasses Online</a>. For commercial website development, please see <a href="http://trpwebdesign.com" target="_blank">TRP Web Design</a> for more information.

<center><font size="1"><br><a href="#toc">[ Table of Contents ]</a></font></center>

</font>

</td></tr></table>
</td></tr></table><br>

<table cellpadding="1" cellspacing="0" border="1" bgcolor="#eaeaea" align="center" width="600"><tr><td align="center">
<font size="1" face="Arial" color="#003399">
<i>HyperBook Guestbook v1.00</i> Copyright &copy; 2001 by 
<a href="mailto:hide@address.com">Thomas R. Pasawicz</a>. All rights reserved. &#149; 
<a href="http://diamond-back.com/software/guestbook/"><i>Click here for more info.</i></a>

</font></td></tr></table>
</td></tr></table>


</body>
</html>
Return current item: HyperBook Guestbook