We write the script of the guest book. Guest book in PHP Zhadibniy guest book html

Golovna / Corisna information

» » GBook

This PHP script will help you to implement the guest book function on your site. Without using any of the MySQL data bases, it is not necessary to make the script work. Gbook script includes silent hard SPAM filters. And also the defender sent to SPAMER.

The script has 2 txt files - header.txt and footer.txt. For additional help of these files, you can add advertising blocks or clients to your guest book. Change the template again and style your site, even if there are no special difficulties. The Gbook program can be translated by my world. Just change the words in one language file.

Advances to the script.

  • Emoticon support.
  • Does not require a MySQL database. All information is saved from the file.
  • Notification of the administrator by mail, about the new notification from the Guest Book.
  • Mist 2 small antispam checks.
  • You can ban the IP address so that you can't get rid of the notification.
  • Take the reminder to the post office, if someone has signed your guest book.
  • Revising the notice: a list of collected (not censored) words before publication. Curve ****
  • Anti-flood function. In order for the koristuvachs not to publish information so often.
  • Special notice.

We have looked at the main possibilities and features of the component of the book “remarks” and have looked at it. In this article, let's finish looking at the expansion options and let's talk about the protection against spam.

Options, which are equipped with Russian prompts, will not be seen. To be looked at less than naytsіkavіshi, important, not familiar with the mind, like on me, nalashtuvannya.

pereglyad

Nalashtuvannya on this deposit (little below) is seen before the entries (updating) of the guest book, as if they were deprived of coristuvach, and that in the entries (comments), as if the administrator of the site was banned.

The numbers in the list below match the numbers a little higher. Include\disable optional options, You will show/receive those other elements of entries and comments.

  1. Replying to Im'ya at the accomplice.
  2. Show the email of the contact.
  3. Show the Website with a friend.
  4. Vіdobrazhati Im'ya at vіdpovіdyakh.
  5. Show the Subject in the comments.
  6. Show Email at the top.
  7. Show Website at the top.
  8. Please enter the date in the form.
  9. dropdown list.

Let's take a look at the options that are missing.

  • Vіdobrazhati Informative. This option is disabled (selected Hi), then in the book of comments in Joomla will not be displayed the same records, but rather a form. As a matter of fact, the book will become just a form of a turning point.
  • Show comments. You can add more comments before writing. The stench is encircled by a black frame on a little thing.
  • Layout on the side. Activate the distribution of book entries on the sides, which is rich.
  • Numbering of pages for promotions. Please note that the links of the records may be displayed on one side.
  • Postorinkove razbittya (Reminder). You can set a value, which will appear on the list (for the little one, No. 9). In fact, the price of the improvement of pagination (post-store navigation).
  • Turn off Cache. You have activated the old cache in Joomla's main settings, having increased this option, add to the cache the side of the book entries. You can also reduce the interest on the server and increase the security of the interest on the sides of the coristuvachs. I recommend vicoristing this option. Varto designate what cashing can be done before the entries in the guest book will not appear immediately after publication (deposit as a cache).

Bezpeka

One of the first five tabs (the little ones below) is fixed by Phoca Guestbook, assigned to security (protection against spam). Vaughn is mainly directed to the appearance of the fenced in place in the comments of the Joomla guest book due to the component itself and according to your rules.

Options, which are equipped with Russian prompts, will not be seen.

For some options, the following parameters are available:

  • Save. If you want to remind me about the fence, it will be saved at the database of the site.
  • Publish As a reminder to avenge the fence, it will be published on the website.
  • Pre-moderation. If it is necessary to avenge it, it will be saved in the database of the site, if it will not be published until the moderator checks it, which will be accepted in the future.
  • Vidhility. If you want to remind me about the fence, it will not be saved from the database of the site.

To show respect, that it is possible to "impose" the application of quiet and other options without care at the borders of all the installation of the component. For example, the status of a publication can be set as an option pre-moderation on deposit Main .

Option Enable HTML scraping allows you to automatically see from the records of the book notes for Joomla 3 usі zaboronenі\insecure HTML tags.

Rechecking

Options and tabs allow you to customize the integration of Phoca Guestbook Joomla and anti-spam services Akismet, Mollom. Services analyze the reports, as if they fill up the books with notes. If the notifications are similar to spam, if you will get one of the messages, put it in the options Block SPAM (Checking the mail). Dії analogous to the same parameters, we will describe more in pіdrozdіl Bezpeka. Yakshcho selected Нi (Harrowed), There will be no recheck for spam for additional services.


You can disable one of the services. You need to register on antispam service sites and remove the password keys, so you need to enter the password fields on this tab (picture above).

Also mark the varto, as of 09/20/2015 for cost-free public records of services and limits:

  • Akismet - up to 50,000 rechecks per month. Approximately 1666 transfers for doba.
  • Mollom - up to 50 transfers per doba. Approximately 1500 revisions per month.

On my website, I already have more than 2 years of vicorous Akismet for comments. So far, I have not come across any particular problems.

Trust that zastosuvannya tsikh servіsіv can improve the process of forcing the entry into the book of warnings, the oscillators are back to back on the server of these anti-spam services, there it is processed, and the result of the verification is strengthened. If the connection between your site and the service is overridden, or the override service itself, then there may be a delay in the hour from the moment you press on the “Submit” button and until your site reacts.

Check IP address

On this tab (little below) you can improve the integration of the book of reviews with anti-spam services, as if spam is detected based on the analysis of the IP-address, for which a record is added to your site. There are three services available, in which you need to register and receive valid keys. You can not register (and do not win) all three services. You can experiment and find out what works best for you.

  1. Honey pot.

You can set different values ​​for your profiles if you can enable anti-spam services (option Fenced IP). Dії similar to the same parameters, we will describe more statistics.

It is also possible to set the list of fenced IP addresses manually – option IP blocking.

Phoca Guestbook on tab (Picture below) There are no options for adding captcha to the form of editing entries in the book of notes. On the basis of my own opinion, I can say that captcha is an unmanageable element for viewing your site. I recommend vikoristovuvati її less for gostroї consumption. If nothing else helps, there are no costs for the implementation of what is good for protecting your site from spam.

On my site in the comments, the subscription form for a rose and special notes I don’t have a vicarious captcha. The stagnant goal is less when registering and on the side of the return link. For registration, I plan to enter a captcha in the nearest future, so that I can find an alternative. And I’ll leave the axis in the contacts, to that I will be listed with the helpers either in the comments, or in the special notes. For the price is low reasons (sheets of the form come to me by mail):

  • There is a lot of remembrance on the mailed screenshots. Do not start handily shukati those chi and lances of leaves.
  • Possibility to get notifications to the Spam folder. Were vehemently, if the coristuvachi did not know the leaves for any reason.
  • On special comments and comments before the articles, I react in a richer way due to technical and organizational reasons.
  • There were fluctuations, if the coristuvachi saw lances of leaves with the necessary information.

You can add one or more new captchas: reCAPTCHA, EasyCalc, Math Captcha, TTF Captcha, Mollom Captcha, hnCaptcha, Joomla captcha for captcha. For some of them, there are parameters (picture above). I’ll make sure that adding a few captchas is an extreme challenge. Especially for sites with low visibility and activity of coristuvachs.

For a wiki, for example, reCAPTCHA needs keys. Їx without cost can be taken on websites captcha.

First I look at those methods (nalashtuvannya), yaki do not add, but minimally add to the clarity of the corystuvannya Your book of observations. Ale, in my opinion, the stench will prevent less automation and that blatant rіven zahistu against spam. May be on the verge, which are lower than the recommendation, to be placed at the entrances, if the records can be overwhelmed, whether they are koristuvachs (including non-registered ones).

  1. Update log records to add records (journal log). Tse you can rob in Phoca Guestbook - Settings - Logging, activate offensive options ( Enable Logging). To blame problems with the database, blame Log saving. If it doesn’t help, then turn it on Notice Logging.
  2. Please note the previous moderation. Tse you can rob in option pre-moderation.
  3. Notify admins by email about new entries. Tse you can rob in Phoca Guestbook – Nalashtuvannia – General option Send Email.
  4. Take note of the re-verification of the koristuvach. Tse you can rob in Phoca Guestbook – Nalashtuvannia – General option Vimknut perevіrku koristuvach.
  5. Rechecking.
  6. Set up integration with one or more dekilcom antispam services in set up the component on the tab RevisingIP-addresses.
  7. Specify a unique session suffix. Tse you can rob in option Session suffix.
  8. Enable cleanup of HTML. Tse you can rob in Phoca Guestbook - Settings - Bezpeka option Enable HTML scraping.
  9. Increase the attached field. Tse you can rob in option Show attached fields.
  10. Constantly analyze the journal and make any necessary corrections to the website.
  11. Constantly update all the lists about new entries, moderate them, and on the basis of moderation, make additional corrections to the host site, for example, add IP addresses to the filter, the words and so on.
  12. Enter a list of fenced lines. Tse you can rob in Phoca Guestbook - Settings - Bezpeka options Fence words, Fence whole words. Vrakhovuyuchi features of the language (voiding, vіdmіnyuvannya, raznomanіnіst obscene language too), as well as the inadequacy of this filter (searching for exact zbіgіv), in my opinion, it’s not the same as the more effective options.
  13. Set the exchange to the maximum number of notification symbols. For zamovchuvannyam - 2000. Phoca Guestbook - Settings - Bezpeka option Number of symbols.
  14. Surround a large number of silan, as if they are being picked up by the companions. Tse you can rob in Phoca Guestbook - Settings - Bezpeka option Maximum Url. Set "-1" (no paws), if you don't want to show the strength in the fire.
  15. Specify a list of words that are used to identify messages in the records of the book of comments for Joomla 3. Phoca Guestbook - Settings - Bezpeka option Words-indicators for fence posilan.

To give respect to the addition of a great number of values ​​​​for such a field like: Fence words, Fence words And so far you can increase the size of the Phoca Guestbook database tables, improve your work as a whole and improve the process of editing an entry in the book. For example, after trying to add a list of thousands of words (profanity) and adding a comment, it took a long time. This was not a Phoca Guestbook, but I think that for which component the problem is given, it can also manifest itself.

Ways hover below better at the plan, below descriptions, but more efficient and automatic. Їх varto zastosovuvati at podnanny z vyshchevyladenim list as an addendum.

  1. Allow me to add entries to the book of advice to more registered coristuvachas. Behind the Phoca Guestbook lock, it's the same. More shortly, schob pіd hour of registration buv captcha.
  2. Disable the Javascript editor. Tse you can rob in Phoca Guestbook – Nalashtuvannia – Form option Enable Javascript Editor.
  3. Add the captcha (abo kіlka) to the very form of adding the entry to the book of notes. Tse you can rob in Phoca Guestbook - Settings - Captcha option Clear Captcha. Clear captchas for all koristuvachivs.
  4. Notice the blocking time. Tse you can rob in Phoca Guestbook - Settings - Captcha options Notice the hourі Blocking hour.

Show respect that you can victorious, whether it’s using the methods described above.

I also recommend podbati about the outrageous zahist of your site. If you are given a topic, then check out the series of articles about the defense of the Joomla site. Persh axis (z 12) part. Also think about chimos RSFirewall.

For displaying on the site (near the frontal part) feedback and forms of their addition, serve as a menu item Guest book(Baby below). You can create something in the Joomla menu manager, like any other menu item.


Must be "unique" for this option component, available when the menu item is set, subdivided into five tabs. More options similar to those that were considered in this and the previous article for the component itself. Let's look at the naytsіkavіshi, like on me, parameters. It is also not possible to change, however, for all types of items in the Joomla menu.

  1. Menu item.
  2. Parameters. The number of options were examined at the front stat.
  3. The form.
  4. Revision. These settings were reviewed in this article.

On deposit Menu item (little more) at the drop-down list Select guest book You can select a book that you need to display after pressing on the entire menu item. The creation of books is looked at at the front article “Overview of Phoca Guestbook. Joomla Guestbook.

On the insert (little below) there are options that allow you to change the color of the book design. Notwithstanding, the stylesheet parameters will be tweaked for your website template.

You can read a report about different Joomla templates and work with them in this section.


Please note that the global (global) settings of Phoca Guestbook Joomla are less prioritized for options, if you set your own rules for a particular menu item (which means they stink).

Like a bachite, the component is more functional and flexible in terms of installation. I think that in the future with a wide range of options to protect against spam, this cost-free component of the book of advice for Joomla 3 will be a corny one, who will look for similar expansion.

Bulo told about creation guest book on the site for help with the finished script. Tim, for an hour, on small sites, the guest book is folded up with a number of reminders (ten - fifteen) and rarely popovnyuєtsya new ones. Basically, the book is smeared with spam, various types of advertising and messages sent to the site. As a result, it takes a lot of time to spend on the cleansing and re-verification (moderation) reconciliation.

The main advantages of such an approach are as follows:
- the impossibility of outsiders to insert their wonderful ideas on the side of the guest book, bypassing your strict fenced-in bar'єr,
- it is not required to create a special design, so that rows can be inserted directly on the side of the site,
- You can easily optimize the guest book by adding keywords to the site.

We'll create a form for help from the guest book for help, whether it's an HTML editor or CSS. For our stock, it does not fit the design of the previously reviewed book. button Add a reminder zrobimo picture-posted on the form of the zvorotny zv'yazku (forma_02.html page), which looks like a small window (butt chinny, you can change it!).

GUEST BOOK
company "Pupkin and partners"

23.10.2011
Ivan Ivanovich
Moscow

Building a website for your company.
All zrobili shvidko that yakіsno.
Dear supporters of the SEOMARK company! I recommend you to my friends.

admin. Get ready to help!
21.10.2011
Gubkin
London

Vitaєmo from the cob of the guest book.
Thanks for the success of the robot and happiness in a special life.

Company "Gubkin and Partners".

admin. Thank you!

The code of the request "Add a reminder" is offensive:
.

Here in JavaScript You specify the page address (forma_02.html), the width and height of the new window (500x600 pixels) and the first position on the monitor screen (upper left corner). There are no daily peculiarities and it shows you the information you need about the representative: name, address, e-mail, ICQ, etc.

In times of successful overstrength, the following message appears:
"Dyakuёmo for the strength of your admonition.
After re-verification by the administrator of the site
it will be added to the guest book.
"
The new text of the PHP-side for the examined stock:





Advice


if (isset($_POST["name"])) ($name = $_POST["name"];)
if (isset($_POST["mess"])) ($mess = $_POST["mess"];)
if (isset($_POST["city"])) ($city = $_POST["city"];)

If (empty($name))
{
echo " Not specified im'ya!

";

}
else
if (empty($mess))
{
echo " Notice not written!

";
echo "Rotate to complete form";
}
else
{
$to=" [email protected]"; // Enter your address here
$headers = "Content-type: text/plain; charset = utf-8";
$subject = "Information in the guest book";
$message = "Sent name: $name \nLocation: $city \nMessage: $mess";
$send = mail($to, $subject, $message, $headers); //Edit sheet
if ($send == "true")
{
echo "

Diakuemo for the strength of your admonition.";
echo "

After re-verification by the administrator of the site
it will be added to the guest book.";
}
else
{
echo "

Notification not sent. We bring our vibachennya.";
echo "

Try to repeat your strength in the future or contact us by phone.";
}
}
?>

hello to readers website)

In this article, we can see Phoca Guestbook - a component of a guest book for Joomla sites.

What can you say about this component... It's even simpler and easier to manage in the administration, I can get enough of it for posting ads on your site.

Possibilities Phoca Guestbook:

  • choice of access rights for koristuvachiv;
  • filtering of irrelevant words and phrases;
  • blocking IP address;
  • the exchange of a number of other symbols;
  • captcha;
  • modernization of the review (review by the moderator);
  • zvnіshnіy vyglyad vіdgukovіv (kolіr, vіdobrazhennya imeni, vіdobrazhennya e-mail and site address).

Let's take a look at the component.

After installation, Phoca Guestbook does not require global adjustments.

Control panel:

  • Posts - all messages filled with koristuvachs;
  • Guestbooks – categories (created guest books);
  • Info - Information about updating the component.

As you can see, on the little right hand there is the "Parameters" button. If you click on it, you can more customize the guest book and the component itself.

Parameter

Value

Display Subject In Form

(So ​​| So (obov'yazkovo) | Hі) show or attach the Object field to the form, set as the Subject field will be required

Display Name In Form

(So ​​| So (obov'yazykovo) | Ні) show or attach the name field in the form, install, so the Name field will be required

Display Email In Form

(So ​​| So (obov'yazkovo) | Hі) show or attach the e-mail field to the form, insert the e-mail field, as required

Display Website In Form

(So ​​| So (obov'yazkovo) | Hі) show or attach the Site field in the form, set the field so that the site is displayed

Display Content In Form

(So ​​| So (obov'yazkovo) | Ні) show or attach instead of fields in the form

Enable Javascript Editor

(So ​​| Hі) Turn off or turn off JavaScript Editor

Display Path In Javascript Editor

(So ​​| Hі) show or add information about the route to the JavaScript editor

(Help | Display) Set so that the form can be displayed.

(Top | Bottom) Select

Display Required Sign

(So ​​| Ні) Set for the fermentation of the fields, as needed

(Tak | Ні) Set up a reminder to display.

width (in pixels)

height (in pixels)

Set the width of the table (table, for which form is displayed, for pixels)

Parameter

Value

If you don’t register a correspondent, you can give me a name for the promotion. For example: Guest

Username or Name

(Im'ya koristuvacha | Іm'ya) choose im'ya, as I can be seen at the guest's book (Im'ya koristuvacha or really im'ya koristuvacha)

Disable User Check

(Hi | Tak) Revalidation of the coristuvacha (the inclusion of this parameter is not recommended)

Registered Users Only

(So ​​| Ні) Yes, so, only registered coristuvachs can add new notifications

(So ​​| Ні) If so, then you will be reminded after the praise of the administrator

edit sheet

Parameter

Value

Display Name In Post

(Tak | Ні) show or attach im'ya (im'ya koristuvacha) (guest book)

Display Email In Post

(So ​​| Ні) show or attach an e-mail (guest book)

Display Website In Post

(So ​​| Ні) show or add the site in the (guest book)

Set date format

Set font color

Second Font Color

Set another font color (date font color)

background color

Set color of ashes

Installed color cordon

Pagination Default Value

Set default value for side numbering

Insert the numbering of the sides. Vіdokremlyuyuyutsya one kind of one coma (,)

Pagination Hide All

(So ​​| Ні) all values ​​will be attached (numbering of pages)

Parameter

Value

Forbidden Word Filter

Insert fenced words that do not appear in the interface. Words are cremated one by one coma (,)

Forbidden Whole Word Filter

Insert all reserved words that do not appear in the interface. Words are cremated one by one coma (,)

Save post with forbidden words

(So ​​| Ні) If so, then posts, if they include reserved words, will be saved in the guest book (the reserved words will be attached, if saved)

Add IP, if you want to block. Add skin IP to coma (,)

Maximum Characters

By setting the maximum number of symbols, stinks can be saved in the database

Set the maximum number of URLs that can be displayed in the listings (0: none, the number of URLs will be displayed in the listings, -1: all URLs will be displayed in the listings, for example 3: only three of the URLs will be displayed in the listings)

Not Allowed URL Identification Words

Type of words, which is significant for allowing the URL in the notification. Vіddіlіt skin word coma (,). Example: /,. htm. A.S.P. JSP. PHP, www.,. com. ORG.

Remembrance or remembrance of the Nazis Captcha

Change this parameter only in that case, you do not complete the captcha.

Enable Captcha-Users

(All | Not registered) Parameter for displaying captcha for groups of coroners (to show captcha is registered)

Standard Captcha Characters

Numbers, small letters, uppercase characters, as they look like in a standard Captcha image

Math Captcha Characters

Numbers, small letters, uppercase characters that will be displayed in Math Image Captcha

TTF Symbols

Numbers, small letters, uppercase characters, which will be displayed in the TTF Captcha image

TTF Captcha Characters

To display the re-captcha, enter the public code

reCAPTCHA Public Key

Install Recaptcha Public Key

Enable Akismet Spam Protection

(Hi | So) Overrides all data of the new geustbook entry in Akismet - a web service for checking spam

Block Spam (Akismet)

(Hi | So) Block posts that didn't pass the review in Akismet

Insert the Akismet API key that you need to hack in Akismet-Spam. Take yours at https://akismet.com/signup/ free of charge

The main URL of your site. (The URL is responsible for including the http:// prefix)

Enable HTML Purifier

(Hi | So) Turn off or turn off HTML Purifier

Set session suffix (Select security function to change session name, set unique suffix, for example: a100b20c3)

Enable Hidden Field

(Ні | So) Increase or remove the attachment of the field. Deyakі spam-bots try to fill in all the fields on the site, as if the stench fills the same field, if the person does not bachel, the entry will not be added to the guest book.

(So ​​| Hі) Increase cache.

Enable Detecting Incoming Page

(So ​​| Ні) Increase or decrease the manifestation of the input sides. This is the security function. If you notice it, then the side, from which the post came to the guest book, will be saved and displayed in the interface.

A large number of articles have been written on the topic of writing guest books, most of them have described the process of writing not in full, but in part. Before that, the books were written as simple as possible, and they could not do anything, let's say, how to add some information. In this article, I am trying to report on the process of creating a guest book with an indestructible set of functions. The guest book is written in PHP for the help of text files to save data.

Otzhe, first of all, we need to sort out the files. We will have chotiri, if you want you can go to one, but then you will be lied to.

File #1 - guestbook.inc.dat

Let's make yoga, let's empty it and give it to you right (0777-*nix, rwx/rwx/rwx)

Sudi zapisuvatimutsya all the information ... So-so! Same in one file! Ale don't lie. I especially verified it on the WallSt server. database size 5, 10, 100, 250, 500, 1000 Kb! Galmuvannya was less than 1000 Kb of books, turn, over 3000 middle records! You need to stitch її s too much.

File #2 - config.inc

File #3 - gb.php

guest book

*Im'ya:
Email:
*Note: