As stated in the README file, php3guest is quite easy to configure. Anyway, here is a comprehensive description of all variables which can be set in
php3guestrc.php
Variable |
Sensible default |
Explanation |
scriptname |
'php3guest.php' |
php3guest often references back to itself in <a href> links. Thus it has to know it's name. I use index.php, which is set as a DirectoryIndex
in the apache config; you may want to use php3guest.php or any other name you like.
If you do not use a name which is recognized by your webserver as a DirectoryIndex, you can set $scriptname=$PHP_SELF; and PHP will put the file's
name in automagically. |
viewHTMLentries |
1 |
In my old guestbook, someone entered some HTML code, referencing a javascript to refresh the page and thus move any visitor to some sex site.
If this is turned to 1, visitors will see HTML code interpreted, that means, they can reference any picture they like, execute javascript or do many many
other senseless or sensible things.
If you want to forbid this, turn it to 0, and visitors will just see the tags as entered.
Note that this setting can be changed by runtime parameters such as the "viewhtml" URL variable. |
usableWithoutJavascript |
1 |
Display a button to select language or rely on the JavaScript features of visitors' browsers? (1 = enable button, 0 = disable button) |
entriesPerPage |
10 |
This is the number of entries viewed as a single page. I render 10 a sensible value, you might as well render other values more useful. |
linkNewWindow |
1 |
Links in entries (visitor's homepages) may be opened in a new window (1) or the original one (0). |
db_host |
'localhost' |
The host mySQL runs on. In most cases, this will be localhost, but may be any other computer. Note that you will have to have the rights to connect
to this computer via mysql. |
db_user |
'nodody' |
The mySQL user connecting the DBMS. As far as I know (well, I do not know to much about DBMS - 9'o clock in the morning is too early for me, that's when
my database lectures took place some years ago :), "nobody" is commonly used, but it may be any other user with sufficient mySQL rights. |
db_pass |
'' |
The user's mySQL password. Argh, you know what this is. |
db_db |
'guestbook' |
The name of the database for your guestbook as set up with the "mysqladmin create" command |
db_table |
'guestbook' |
Name of the table containing your guestbook. You can use this to put more than one guestbook in your database. |
ownerPass |
'anythingyoulike' |
Your Password. Note that this password is transmitted in clear text (as long as you don't use SSL/TLS);
local users will probably be able to read this config file and read the password. They might as
well be able to view the mySQL database directly! |
mailEntries |
1 |
If you want to get email when a visitor submits a new entry, set this to 1, otherwise set it to 0 |
mailEntriesSubject |
'New entry in your guestbook' |
Subject for mails concerning new entries to your guestbook |
mailEntriesTo |
'Idont@know-your.email' |
The email adress to which to send new entries |
mailEntriesFrom |
'Guestbook <wwwrun@yourdomain.com>' |
The account to send emails from |
defaultLanguage |
'english' |
The default language, if $language is not set otherwise or php3guest.$language.inc does not exist. Note that a file called php3guest.$defaultLanguage.inc should
always exist, php3guest will not work otherwise!
See README for further details on language modules. |
possibleLanguages |
'english deutsch danish big5' |
Your selection of installed language packages you want visitors to have access to |
maxEntryLength |
8192 |
Want to prevent jokers from flooding your guestbook? You can set this variable to a maximum entry length (in characters). "$maxEntryLength=8192;" means that
no Entry may be longer than 8192 characters (8 kB). |
publishMail |
0 |
Set this to "1" to publish visitors' email addresses. When set to 0 (default), the mail address is visible in admin mode only. |
antiSpamImage |
1 |
Request a code input from a visitor. A small image is created representing a number (a little hard to read). Setting this to 0 will deactivate this spam protection feature. |
forbiddenWords[][] |
|
forbiddenWords is a two-dimensional array that lets you create a list of words which are not allowed in the guestbook. These words probably will include phrases that are
obviously spam (such as the well-known drugs and home-loan phrases...). The first array (first brackets) contains a sequence number, the second array takes a "word" and a "rejectText".
A sample forbidden word setup might look like this:
forbiddenWords[0]["word"] = "valium";
forbiddenWords[0]["rejectText"] = "I don't need no f****g valium";
forbiddenWords[1]["word"] = "home loan";
forbiddenWords[1]["rejectText"] = "No spam, please.";
|