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.
In an attempt to fight comment spam on a couple of my Drupal sites I need access to the spammer's IP address. This is easy to retrieve from the comments table.
Unfortunately the Token module does not yet provide this token for comment tokens.
Attached patch to token_comment.inc
version 1.3.4.10 provides the missing token.
Feedback is welcome. I hope it will make it eventually in the Token module.
Cheers,
Olivier
Comment | File | Size | Author |
---|---|---|---|
#5 | token_comment-1.3.4.10.inc_.diff | 1.23 KB | ShutterFreak |
#2 | token_comment-1.3.4.10.inc_.diff | 1.25 KB | ShutterFreak |
token_comment-1.3.4.10.inc_.diff | 1.17 KB | ShutterFreak | |
Comments
Comment #2
ShutterFreak CreditAttribution: ShutterFreak commentedRe-submitting as "diff -up" instead of "diff -u"...
Comment #3
ShutterFreak CreditAttribution: ShutterFreak commentedtoken_comment-1.3.4.10.inc_.diff queued for re-testing.
Comment #5
ShutterFreak CreditAttribution: ShutterFreak commentedDoah. Use UNIX line ends (\n) instead of MS Windows (\r\n).
Hope this time it will pass.
Comment #6
ShutterFreak CreditAttribution: ShutterFreak commentedAny chance this will make it into Token?
Comment #7
ShutterFreak CreditAttribution: ShutterFreak commentedIs there a reason why this does not make it in the token module?
Comment #8
adellefrank CreditAttribution: adellefrank commentedI tested out the patch in #5 and it works great...thanks!
Comment #9
adellefrank CreditAttribution: adellefrank commentedMight I suggest this be added? It works and is very simple. Hopefully, a random drupalista. :)
Comment #10
colanNew features need to go into the latest dev branch first.