MENU

Additional anti-spam feature in Gbook module

  Previous article Next article  

The Gbook guestbook module for CMS Made Simple™ has a built-in anti-spam feature. It uses the b8 statistical (Bayesian) spam filter. At one of my websites where I use the GBook module I noticed spammers are getting more clever trying to by-pass the filter and it leaves me more work checking ham or spam...

I found a really simple method to hide and show the form. When there is no form, a bot can't fill it in...

  How to use

Open the guestbook content page in the Admins page-editor and set WYSIWYG off in the Options tab.
Replace the GBook tags with the following code:

{$showform = $smarty.get.showform|default:''}

{if $showform == '1'}
  {Gbook|replace:"{root_url}/guestbook":"{root_url}/guestbook?showform=1" action='form'}
{else}
  <p><a href="{$page_alias}?showform=1" rel="nofollow">Show the form</a></p>
{/if}

{Gbook}

Note: Change the URL's in the code above to the one of your guest book page!

Basically it takes these steps:
  • Read the "showform" parameter from page URL
  • Only show the form when having the showform parameter in the page URL and the value is 1
  • If not show the message button, when clicked it reloads the page *with* the showform parameter
  • Show the current guest book entries

Afterwards you can always change the parameter name and/or the value. Or even set the date ( {$smarty.now|date_format:"%e"} is now 21 ) as value, so it changes every day... Let your imagination run wild :)

  Working example

Show the form »



Buy Me A Coffee


  Comment Form

ReviewManager

Click here to open the form

ReviewManager

  13 Comments

Buy Me A Coffee

CMS Made Simple - Tutorials, Tips and Tricks - CMSMS

Additional anti-spam feature in Gbook module

  Article optimized for CMSMS 2.x

  Author:
  Last tested in: CMSMS 2.2.19
  Last updated: 17-11-2020
  Comments: 13
  http://cms.ms/qJoX


Buy Me A Coffee




Advertisement


Ads help me to help you! Thanks!

Ads help me to help you! Buy products from these advertisers!