Drupal 6

Protecting your website from spam in comments

This article shows how you can effectively protect your website against spam-submissions in comments.

In order to improve the interaction with the visitors of this website, I allowed anonymous users to post comments to all published stories. Since feedback is quite low, I enforced administrator approval of all comments to stay in full control.

However, shortly after enabling comments for anonymous users, I received more and more emails telling me that new comments were posted which needed my approval.

CAPTCHA to the rescue!

Tags: 

Drupal 6: finding out which button is clicked when using a image_button element

When using multiple image_button elements in a form, there's no easy way to found out which one was clicked. This page contains a solution which allows you to identify the clicked image_button.

Recently I was building a module which showed a rather complex form. The form contained a mix of submit button and image_button elements.

In the submit handler I wrote some code to discover which button was clicked.

I made it work in the following case:

Tags: 

You might also be interested in...

Subscribe to RSS - Drupal 6