The Guestbook plugin is available at my website as Download. The actual version is 0.8. The guestbook will be continously enhanced. It is an advantage to take a look what's new time by time.
Download the zip-file from Download and unzip it into the folder .cmsimpleplugins. Take care to check the "use folder names" option while unzipping. After unzip you should have the following structure:
4.1 Installation and Build in to your WebsiteFirst you should create a own main page with <H1>, or subpages with <H2> or <H3>, as a container for the guestbook..Plug the guestbook in your CMSimple-page by adding the line
#CMSimple $output.= GBlist();#or
#CMSimple $output.= GBlist(cFilename);#
into your text, directely following to the heading. You can copy the text line directly from the description here. But please take care to control the HTML-code directly and delete, if necessary, the < FONT >-tags. The result should exactly look like shown above. If it looks like the following line
#CMSimple $output.= GBlist();#you should delete all tag, because these tags are causing errors.
Specifying the filename cFilename is optionally. The specified filename should not contain any language shortcut or an file extension, both will be added automatically. If you specify as cFilename the string 'MyGuestbook', there will be a file with the name 'MyGuestbook_en.txt' used, if you use English as language. The splitting of the guestbook into a own part for each language can be switched off by setting the option common_guestbook to True. In this case only one guestbook will be used for all languages.
If you specify no filename, the GBook plugin will use the default string 'Guestbook' as first part of the filename.
4.2 Calling outside of Menu StructureIf you want to integrate the GBook guestbook in the same matter as the default guestbook of CMSimple, this means not visible in the menu structure, but instead of that visible as separate link in the navigation area, you have to the following steps:
First you have to create an own page for the guestbook as described under 4.1. For hiding the guestbook in the normal menu/navigation structure, the addition command hide is necessary. So the following lines must be inside of the guestbook page:
#CMSimple hide #
As next step, you have to insert the link to the new guestbook into the template file. You have to exchange the following code
The path specified after "index.php?" is the menu structure you have choosen for storing / organizing the guestbook in your website. In this example the main menu is called Contact and the submenu, where the guestbook page is called has the name Guestbook. After this steps the default guestbook from CMSimple will be no longer shown and instead the GBook guestbook will be called.
4.3 Calling in Member Area (Memberpages)
If the GBook guestbook should be available in a member area, where only logged in members are having access, the following steps have to be proceeded:
First an own page, as described under 4.1, has to be created
for the guestbook. For hiding the guestbook page in the normal menu
structure (it should be visible only for members) the additional
#CMSimple hide #
As next line the commands for the memberpage and GBook plugins
must be entered. Both command must be specified in one
#CMSimple ... # command:
#CMSimple $output.=memberspage("Access denied","0"); $output .= GBlist(); #
This means, first the access will be checked and if successful, the guestbook will be shown.
GBook supports the use of multiple languages. There are no specific commands necessary. Gbook detects automatically which language is currently used and choose the dependent guestbook file.
At the moment the plugin comes with the following languages:
Danish, many thanks to Per Kongebro
If your language is not listed above, you can create your language as well. Just copy an exiting language file (e.g. en.php), rename this file according to the used language and translate the texts inside.
At this point I like to say "Thank you very much" to all the people, which have sent their translations to me!
Please feel free to send new languages files to me. I will include them in the very next setup, the author will be mentioned!
The GBook plugin is individually adaptable to the desired
functionality and layout by several settings.
The following settings are available:
date format: Use this field for defining how the date of the message should be displayed on the screen. The values of the field are the same as the date() function of PHP allows.
Use this field for defining how the time of the message should be
displayed on the screen.The values of the field are the same as the
date() function of PHP allows. The date() function of PHP is used as
well for date values as well for time values.
captcha: The captcha code is a string combinations of five characters and number, which must be entered by the user, if this setting is set to true. Does this value not match with the original captcha code, the new guestbook entry will not be stored. This setting avoids most of all spam entries. Possible values for this field are True or False.
ask for email:
This field defines if the user will be asked for his e-mail address or
not. Possible values for this field are True or False.
ask for website: This option is for setting up if the user should be prompted for his website / homepage or not. Possible values for this field are True or False.
ask for title: This option defines if the user will asked for a title of his message or not. Possible values for this field are True or False.
mandatory title: This option defines if the user must enter a value into the field Title or not. This option can be set to True only when the option ask for title is set to True too. Possible values for this field are True or False.
This field defines if maybe contained HTML code should be removed or
not. Possible values for this field are True or False.
Normally it is strongly recommended to set this option to True
for removing HTML code. This avoids bad links to websites which are
containing viruses, trojans and other ugly stuff.
items per page: With this option the administrator can define how many items per page should be displayed. Are there more entries in the guestbook, the plugin will split the content onto so many pages as necessary.
num of pages: This setting specifies how many page links will be shown left and right close to the actual page number in the navigation bar at the bottom of the guestbook.
This field specifies to whom an info e-mail, that there is a new entry
in your guestbook, should be sent. In this field you can specify more
than one e-mail address. All e-mail addresses must be separated by a
This option defines if the visitor which has created a new message in
the guestbook will get an automatically send mail to thank him.
Possible values for this field are True or False.
The text of the thank mail is available in the section Language
and can be modified as you prefer.
thank sendfrom: This field
contains the e-mail address which will be shown as sender.
This option allows to switch on and off the functionality of creating
new guestbook entries. Possible values for this field are True
This option can be used eg. when your guestbook is under maintenance or
your have some other problems. Normally this option should be set to True.
spam words: Since version 0.8
this option is no longer used. Use instead the option blocked words.
show creator: At the bottom of the guestbook will be a link to the author shown. If this text should not be shown this field must be set to False. Switching off this display is only possible after contacting the author. Possible values for this field are True or False.
show narrowlink: This option allows to switch on or off the links to previous "< Back" and next "Next >" page. Possible values are True or False.
show email: This options specifies if the e-mail address of the guestbook visitor will be shown or not. Possible values for this field are True or False. This option has no influence if the e-mail address will be stored or asked from the user (see also ask_for_email) or not. It's only for switching on/off the display.
show website: This option allows to define if the address of the homepage will be shown or not. Possible values for this field are True or False. This option has no influence if the homepage address will be asked from the user (see also ask_for_website) or not. It's just for switching the display on/off.
show ip addr: This option specifies if the ip address of the visitor will be shown or not. Possible values for this field are True or False. This option has no influence if the ip address will be stored (see store_ip_addr) or not. This setting is just for switching the display on/off.
store ip addr:This option allows to define if the ip address of the visitor will be retrieved and stored or not. Possible values for this field are True or False.
enables or disables the support for using smileys. If this option is
switched on on the upper right corner of the message field a toolbar
with the available smileys will be displayed. If the user clicks on one
of the smileys the depending code will be copied into the message
field. Possible values for this field are True or
List of supported smileys:
blocked words: This field contains a list of all words, which will be used to identify the guestbook entry as spam. Contains a message words, which are classified as spam, this message will be not stored and a hint will be displayed instead.
This option is used on creating new entry in the guestbook as well as on importing an old guestbook. Regular expressions are allowed.
blocked IPs:This option allows to block visitor by their IP address. If the IP address matches the specified range, the new message will not be stored and a hint will be displayed instead. The specification can be a single IP address line 127.0.0.1 (=localhost) or a IP range like 192.168.0.1-192.168.0.255.
blocked domains: With this option it is possible to domains or part of domains which should be used for denying the access. If the search string matches, the entry will not be stored and a hint will be displayed instead. Multiple search stings are allowed and must be separated by the character |. Regular expressions are allowed.
blocked countries: With this option you can block visitors from a country by specifying its top level domain. There are multiple entries possible, separated by the character |. Regular expressions are allowed.
For using this option, the package IPFILES must be installed. For installing the package the file ipfiles.zip must be unzipped in the directory include. This package must be downloaded separately.
common guestbook: This option allows to specify that for all languages only one common guestbook has to be used. Possible values for this field are True and False.
quarantine time: With this option it ios possible to define, if a new entry should be displayed immediately or after a specified time is gone. The value for the quarantine time is calculated in hours. Until the quarantine time is expired, the text $plugin_tx['gbook']['txt_quarantine_notice'] will be displayed. During this time the webmaster has the oportunity to check the entry. When the time is expired, the guestbook entry will be displayed. The value 0 switches off this function.
stylesheet.css in the folder css. In this file all colors, fonts and font sizes for the guestbook are defined there. There are four different color definitions already predefined: Blue, yellow, gray and green. These definitions can be used easily just by renaming the files, eg. rename the file stylesheet.green.css into stylesheet.css to use the green color definition.
According to these color definitions the GBook installation contains also matching smileys. The smileys with the different colors are stored under the folder images in the subfolders blue, green and yellow gespeichert. To use one of these smiley sets just copy the content in the folder images. If you are using eg.the stylesheet yellow, so have to copy the smileys from the folder yellow one level higher in the folder images, for using yellow smileys.
The stylesheet file can be modified of course. The entries have the following meaning:
For importing a CMSimple guestbook, please click the button . The following pages offers several options. These options can have heavy influence to the success and quality of the following import. The guestbook of CMSimple is storing all messages directely as HTML text. Therefore it is quite complicate to detect, where eg. the message text or where and how the author or the date is stored
The following options are available:
Save-Options: The default setting is Append to GBook file . When you choose this option all items of the old guestbook will be append automatically to the new guestbook on importing the guestbook. Contains your new GBook guestbook only some test entries, which should be deleted anyway, you can choose the option Overwrite existing GBook file . If you choose this option all entries of the GBook guestbook will be overwritten with the guestbook entries of the CMSimple guestbook..
Conversion Options: The option Use server name as username replace the name of the user with the name of the server. This can by helpful eg. when the recognition of the username doesn't work in any cases. or the name of the user should not be shown.
The option Use Spam filter enables the filtering of all new imported entries for spam. All texts defined in the field 'Spam Words' will be compared with the guestbook message which will be imported. If a text matches with a message, this message will be skipped and not imported.
Use the option Scan Format for defining which date and time format was used for storing these values. These settings cannot be read automatically. Therefore you have to specify them manually.
Possible values are e.g.:
%s, %d. %d. - if the date format is like March, 13. 2006
%d.%d.%d - if the date format is like 24.03.2006
The option Parameter order defines, the order of the values for day, month, year, hours, minutes und seconds. The number 1 is for the day, 2 for the month, 3 for the year, 4 for the hours, 5 for the minutes and 6 for the seconds.
The option Value for Posted allows to change the predefined value of the field 'Posted'. This is necessary e.g. if you're using CMSimple Plus which adds in the source code the additional string ' am ' to the field 'Posted'. In this case you have to add the string ' am ' at the end of the option 'Value for Posted'.
Other Options: The Debug Mode shows addtional output during the import. This can be helpful on errors or not exactly recognized data.
Info: The fields Used Date Format and Used GBook language file are shown just for information and cannot be changed.
When you have set up all settings and you're sure to import the CMSimple guestbook, press the button .
If not press to return to normal editor of the GBook guestbook file.
Importing the original guestbook may take some time. Please wait until a summary of the import is shown. As last step of the import you have to press the button to finish the import. The new content of guestbook will be shown in the textbox and can be edit, if necessary.
It is highly recommended to backup the guestbook file before running the reorg function!