Opened 17 years ago
Closed 15 years ago
#2706 closed enhancement (fixed)
RFE: Spamfilter support!
Reported by: | Michael Medin | Owned by: | Radek Bartoň |
---|---|---|---|
Priority: | normal | Component: | DiscussionPlugin |
Severity: | major | Keywords: | spam filter discussion forum |
Cc: | Trac Release: | 0.11 |
Description
Since I got fed up with all the spam I started getting on my forum page I started looking around for a spam thingy without success so I sat down and added one instead.
It is a bit of hack since I don't know much about neither trac nor python but it seems to work :) The plugin adds an extension point for new posts and new topics and then adds an adapter to the "regular" spam filtering so you need to have the trac anti spam thingy installed and setup and working. I think maybe the adapters might have to be moved to their own module to work regardless of if the anti-spam is installed (since AFAIK tracdiscussion imports *) but I have not tested this.
Also I have only made this patch for 0.10 since I don't have any other version.
MickeM
Attachments (3)
Change History (10)
Changed 17 years ago by
Attachment: | tracdiscussion-anti-spam-patch.diff added |
---|
Changed 17 years ago by
strange, the svn diff disregarded new files... well, here is the spam.py
comment:1 Changed 17 years ago by
Status: | new → assigned |
---|
By a coencidence I wanted to implement this yesterday, becase spammers on my site really annoys me, but I didn't find a time. Thanks for your patch, I'll try to apply it ASAP.
comment:2 Changed 17 years ago by
Keywords: | discussion added; discussuion removed |
---|
Hi.
Thanks for your spamfilter + discussion hack, it seems to be working in our trac (www.tribler.org). However the webadmin pages for tracdiscussion do not work anymore:
Traceback (most recent call last):
File "/data/trac-production/usr/lib/python2.3/site-packages/trac/web/main.py", line 388, in dispatch_request
dispatcher.dispatch(req)
File "/data/trac-production/usr/lib/python2.3/site-packages/trac/web/main.py", line 238, in dispatch
resp = chosen_handler.process_request(req)
File "build/bdist.linux-x86_64/egg/webadmin/web_ui.py", line 119, in process_request File "build/bdist.linux-x86_64/egg/tracdiscussion/admin.py", line 37, in process_admin_request File "build/bdist.linux-x86_64/egg/tracdiscussion/api.py", line 38, in init
AttributeError: 'DiscussionWebAdmin' object has no attribute 'discussion_manipulators'
Do you have the same problem, or do you know a solution?
comment:3 Changed 17 years ago by
Appending
discussion_manipulators = ExtensionPoint(IDiscussionManipulator)
to DiscussionAdmin class in admin.py should fix your problem.
BTW: Commit of this patch will not be so soon, I'm making some internal changes that should be made before and currently I don't have much time to work on Trac's plugins.
comment:4 Changed 17 years ago by
Priority: | high → normal |
---|---|
Summary: | [PATCH] Spamfilter support! → RFE: Spamfilter support! |
Because I don't care much about 0.10 branch clearness and because it's used more than 0.11 branch, I applied you patch almost without changes. 0.11 must wait for better implementation.
Changed 16 years ago by
Attachment: | tracdiscussion-0_11-anti-spam-patch.diff added |
---|
hacked spam path for 0.11 branch
comment:6 Changed 16 years ago by
Trac Release: | 0.10 → 0.11 |
---|
I just hacked together a quick patch to get spam filtering on 0.11 don't know if this is already "in there somewhere" but I did not find it so I added it (pretty much the same as before).
I tried doing it on trunc but I could not get trunc to work properly so I reverted back to 0.11 "stable" branch.
Please feel free to let me know if it works or not.
Michael Medin
comment:7 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Implemented in r6309.
anti-spam-fiter-path