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 24 ) as value, so it changes every day... Let your imagination run wild :)

  Working example

Show the form »




  Comment Form

Click here to open the form


  0 Comments

No comments yet...

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.7
  Last updated: 22-11-2017
  Comments: 0
  http://cms.ms/qJoX

Advertisement



Ads help me to help you! Thanks!

Ads help me to help you! Thanks!

Ads help me to help you! Thanks!