Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#10 | add-a-hook_1775990-7.patch | 2.61 KB | geerlingguy |
#7 | add_a_hook_1775990-7.patch | 3.22 KB | geerlingguy |
#1 | add_a_hook-1775990-1.patch | 1.87 KB | killes@www.drop.org |
Comments
Comment #1
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedPlease see the attached patch
Comment #2
geerlingguy CreditAttribution: geerlingguy commentedLooks 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).
Comment #3
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedFair enough, but can we agree on the format of the hook right now? I'd like to deploy a module that depends on this.
Comment #4
geerlingguy CreditAttribution: geerlingguy commentedLooks good to me, but can you change "honeypot_timelimit" to "honeypot_time_limit"? (I'm away from a computer for a while).
Comment #5
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedSure, 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.
Comment #6
geerlingguy CreditAttribution: geerlingguy commentedSounds good.
Comment #7
geerlingguy CreditAttribution: geerlingguy commentedAttached 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...
Comment #8
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedYes, that looks excellent!
Comment #9
geerlingguy CreditAttribution: geerlingguy commentedRenaming, 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?
Comment #10
geerlingguy CreditAttribution: geerlingguy commentedTestbot, 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.
Comment #11
geerlingguy CreditAttribution: geerlingguy commentedLooks good, fixed in D7: http://drupalcode.org/project/honeypot.git/commit/f6ae9bd
Comment #14
geerlingguy CreditAttribution: geerlingguy commented#13 By kokomi:
How ironic...