Here on drupal.org we have a lot of issues with spammers from Vietnam and from China. What is nice about them is that they always chose their country correcty. I'd like to be able to specify some extra time for people who ,make certain choices on certain profile fields...

Unsure how this would be implemented.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

killes@www.drop.org’s picture

Status: Active » Needs review
FileSize
1.87 KB

Please see the attached patch

geerlingguy’s picture

Status: Needs review » Needs work

Looks pretty good to me. I'd like to add a couple other alter-able bits in the module over time. As part of this, though, I'd like to add a honeypot.api.php file with examples/docs. Setting to needs work until that's done. I'll try doing it when I get a chance.

Also, I think I'm going to try getting the other patch in #1774150: Various improvements ported before accepting this (just so the versions don't get too disparate).

killes@www.drop.org’s picture

Fair enough, but can we agree on the format of the hook right now? I'd like to deploy a module that depends on this.

geerlingguy’s picture

Looks good to me, but can you change "honeypot_timelimit" to "honeypot_time_limit"? (I'm away from a computer for a while).

killes@www.drop.org’s picture

Sure, we can change it.

When you add more hooks, can you consider one in honeypot_add_form_protection after the user access check? I'd like to count the # of forms a user opens.

geerlingguy’s picture

Sounds good.

geerlingguy’s picture

Status: Needs work » Needs review
FileSize
3.22 KB

Attached patch cleans up the code a little (one of the variables was wrong), and adds honeypot.api.php, which includes the hook documentation. Could you please read through that file and make sure the documentation and proposed usage fits what you're trying to accomplish? I don't know your exact use case, but that seems to me to be how it would work...

killes@www.drop.org’s picture

Status: Needs review » Reviewed & tested by the community

Yes, that looks excellent!

geerlingguy’s picture

Title: time delay should be more configurable » Add hook for time delay additions
Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Renaming, committed (http://drupalcode.org/project/honeypot.git/commit/e7838cb), now need to port to D7.

Also, killes, could you please open a new issue requesting the other hook(s) you would like to see?

geerlingguy’s picture

Status: Patch (to be ported) » Needs review
FileSize
2.61 KB

Testbot, please make sure this is okay... also, it looks like killes opened up #1778296: add hook in honeypot_add_form_protection in response to my request above.

geerlingguy’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

geerlingguy’s picture

#13 By kokomi:

[spammy link] don't know your exact use case, but that seems to me to be looks good.

How ironic...