Closed (fixed)
Project:
Guestbook
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
30 May 2006 at 19:53 UTC
Updated:
13 Mar 2007 at 20:32 UTC
hi,
i wrote a function to avoid guestbook from spam. the spam-words are hard-coded for the moment. this could be much better.
http://drupal.org/node/61054#comment-124898
is it interesting for someone else?
ciao
jochen
Comments
Comment #1
fholldorffIt's a nice temporary solution but isn't better to use the spam module and make the guestbook module to work with the spam module?
Comment #2
JumpingJack@drupalcenter.de commentedHere is a simple rudimentary integration of the spam-module 2.1.2 it's working fine for me with guestbook 4.7.0 on drupal 4.7.2.
There are just a few lines of code to insert in guestbook.module
In guestbook.module do:
after line 1 add the code to include spam.module:
include_once "modules/spam/spam.module";at the end of guestbook.module before "?>" insert the following function:
after line 391 add the code to call spam-module to check the entry for spam, before inserting the entry
the new code should look like:
ready!!!
Comment #3
majabee commentedI inserted this script into my guestbook / spam module exactly the way it was suggested but nothing happened , the spam filter still doesn´t filter the spam out of my guestbook. I created custom filters and url filters, but when i scan the filter always shows no matches even when i know that there is spam witch matches the filters. Or do I have to set something in the settings ? but there is no checkbox for filter guestbook entries? Please help i´m getting so much spam!!
Comment #4
JumpingJack@drupalcenter.de commentedIs your spam-module generally working? Is it working for example in comments?
Did you code everything correct? Try to filter everything as spam, by coding:
Now every entry must be spam. If it isn't so, the integration of the spam-module is not correct.
The hack is working very well for me.
Good luck
Comment #5
ljjbrosens commentedI also have lots of problems with spam in my guestbook. I am not a pro but could my idea work?
All spam enters by linking automaticly to the name /?q=guestbook.
If users of guestbook.module were able to choose an own name for this module, different from "guestbook" than the spamrobots could not reconise the guestbook. In the menu of our sites we could use our own given name.
So, is it possible in the php code to give the link to the guestbook an other name unknown for spammers?
In that way we do not need a spamfilter at all.
Could this work?
Met vriendelijke groet,
Leo
Comment #6
ljjbrosens commentedIt seems to work.
In the files " guestbook.install " and " guestbook.module " and " nl.po " I renamed all the strings " guest ", " GUEST ", " Guest " in a string by own choice. I also renamed the two files and the module directory in the same way.
After first deactivating and removing the old questbook module I copied the renamed version and all worked well.
Now I have a same guestbook functionallity but not with the easy to track guestbookname.
I hope spamrobots will not find me now.
?
Met vriendelijke groet,
Leo
Comment #7
hba commentedspam.module is integrated in 5.x
Comment #8
(not verified) commented