Project

General

Profile

Paste
Statistics
| Branch: | Revision:

root / drupal7 / sites / all / modules / honeypot @ 4019484b

Name Size Revision Age Author Comment
  js 9525582e over 6 years Assos Assos Weekly update of contrib modules
  tests 4019484b over 4 years Assos Assos Weekly update of contrib modules
LICENSE.txt 17.7 KB f7a2490e over 10 years Assos Assos git mv htmltest drupal7
README.md 2.45 KB 9525582e over 6 years Assos Assos Weekly update of contrib modules
docker-compose.yml 556 Bytes 9525582e over 6 years Assos Assos Weekly update of contrib modules
honeypot.admin.inc 8.73 KB 9525582e over 6 years Assos Assos Weekly update of contrib modules
honeypot.api.php 3.21 KB f7a2490e over 10 years Assos Assos git mv htmltest drupal7
honeypot.info 340 Bytes 4019484b over 4 years Assos Assos Weekly update of contrib modules
honeypot.install 5.21 KB 4019484b over 4 years Assos Assos Weekly update of contrib modules
honeypot.module 18.9 KB 4019484b over 4 years Assos Assos Weekly update of contrib modules
honeypot.test 16.1 KB 4019484b over 4 years Assos Assos Weekly update of contrib modules

Latest revisions

# Date Author Comment
4019484b 12/18/2019 11:11 PM Assos Assos

Weekly update of contrib modules

bc175c27 08/16/2018 02:18 AM Assos Assos

Weekly update of contrib modules

c304a780 03/01/2018 04:07 AM Assos Assos

Weekly update of contrib modules

9525582e 01/18/2018 01:10 AM Assos Assos

Weekly update of contrib modules

ca92d645 03/16/2016 10:48 PM Assos Assos

Weekly update of contrib modules

b720ea3e 09/09/2015 10:50 PM Assos Assos

Weekly update of contrib modules

0ef18d70 07/29/2015 10:45 PM Assos Assos

Weekly update of contrib modules

2c8c2b87 06/17/2015 10:47 PM Assos Assos

Weekly update of contrib modules

55670b15 06/04/2014 10:39 PM Assos Assos

Weekly update of contrib modules

f7a2490e 02/13/2014 03:56 PM Assos Assos

git mv htmltest drupal7

View revisions

README


Honeypot

Build Status

Installation

To install this module, place it in your sites/all/modules folder and enable it on the modules page.

Configuration

All settings for this module are on the Honeypot configuration page, under the Configuration section, in the Content authoring settings. You can visit the configuration page directly at admin/config/content/honeypot.

Note that, when testing Honeypot on your website, make sure you're not logged in as an administrative user or user 1; Honeypot allows administrative users to bypass Honeypot protection, so by default, Honeypot will not be added to forms accessed by site administrators.

Use in Your Own Forms

If you want to add honeypot to your own forms, or to any form through your own module's hookformalter's, you can simply place the following function call inside your form builder function (or inside a hookformalter):

honeypot_add_form_protection(
  $form,
  $form_state,
  array('honeypot', 'time_restriction')
);

Note that you can enable or disable either the honeypot field, or the time restriction on the form by including or not including the option in the array.

Testing

Honeypot includes a docker-compose.yml file that can be used for testing purposes. To build a Drupal 8 environment for local testing, do the following:

  1. Make sure you have Docker for Mac (or for whatever OS you're using) installed.
  2. Add the following entry to your /etc/hosts file: 192.168.22.33 local.drupalhoneypot.com
  3. Run docker-compose up -d in this directory.
  4. Install Drupal: docker exec honeypot install-drupal 7.x (optionally provide a version after install-drupal).
  5. Link the honeypot module directory into the Drupal modules directory: docker exec honeypot ln -s /opt/honeypot/ /var/www/drupalvm/drupal/web/sites/all/modules/honeypot
  6. Visit http://local.drupalhoneypot.com/user and log in using the admin credentials Drush displayed.

Note: If you're using a Mac, you may also need to perform additional steps to get the hostname working; see Managing your hosts file in the Drupal VM documentation.

Credit

The Honeypot module was originally developed by Jeff Geerling of Midwestern Mac, LLC (midwesternmac.com), and sponsored by Flocknote (flocknote.com).

Also available in: Atom