|
KB Categories
· Getting Started
· General Info
· FTP / Uploading
· Email
· Billing
· Scripting / CGI
· PHP
· SSI
· .htaccess
· CGI-BIN
· FormMail
· Guestbook
· Stats / Logs
· MS Frontpage Extns
· eCommerce
· Secure Telnet (SSH)
· MySQL Database
· Show all categories
· Support Home
Search KB
Ask a Question
If you are unable to find the answer to your question in our KB, please Contact Us.
|
|
Guestbook: Can I change the way the guestbook works?
|
There are a number of variables which can be set to change the way the guestbook operates - such as being able to set the number of guestbook entries per page, the timezone of the entries etc.
The variables are stored in the file:
/home/$user/$domain-www/cgi-bin/guestbook.pl
which can be edited using the File Manager option in your CP. The options you may want to edit are:
Number of Guestbook Entries per page
# guestbook entries per page;
$entries = 20;
Accepting HTML in entries
It is recommended that you do not allow html tags, as you may get undersirable images or other content added to your guestbook. The drfault is translate, which causes html code to be printed as text rather than executed as code.
# allow html tags - 0=no; 1=yes; 2=translate
$html_tags = "2";
Number of seconds until redirect after entry
After adding an entry, a thanks message is displayed momentarily, then the visitor is redirected to the guestbook main page. The default is 3 seconds.
# time to redirect to guestbook after entry
$redirect_sec = "3";
The timezone for guestbook entries
You can adjust the time displayed by the guestbook to match your timezone. Server time is EST, which is 5 hours behind GMT. So to adjust to GMT you would change the number to +5.
# time offset - add one hour = +1 ; subtract one hour = -1
$fix_time = 0;
Font and Background colour for entries
The background colour can be specified either as a web color (e.g. #EFEFEF) or as a word (red, blue, white, yellow, green, black etc). Fonts are listed in order of preference.
# entry bgcolor
$entry_bg = "#EFEFEF";
$font_face = "Verdana, Arial";
Mandatory Guestbook fields
Here you can set which fields are required to be submitted. By default only Name and message are required.
%required = (
username => "yes",
email => "no",
url => "no",
message => "yes"
);
Swear word filtering
You can turn bad word filtering on or off, and set the words to filter out.
$remove_bad_words = "yes";
@bad_words = ("word1","word2","word3","word4","word5","word6");
Note: Unless you know what you are doing, it is not recommended that you edit any of the other variables as this may cause the script to stop working correctly.
Last update: 2005-07-05 14:08
Author: admin
Average rating: 0 of 5 (0 Votes )
|
| You can add notes to this KB entry | Content Overview: Guestbook |
|
|
|