Rafael Souza wrote ...
> Excuse me if its already exists. My suggestion to comments extension is to
> have a spam-filter option, for people that don't want to have a spam-filter
> (maybe it appears only if a same ip is throwing more than one or two
> comments).
Such a feature doesn't exist in the comments extension, but it would be
trivial to add the simple case. For example, add a new config variable
named comments.bypass_spam_filter, set it's value as appropriate for
your site, and apply the following change to Comment#auto_approve?
--- a/app/models/comment.rb
+++ b/app/models/comment.rb
@@ -47,6 +47,7 @@ class Comment < ActiveRecord::Base
# comment, this method will return true
def auto_approve?
return false if Radiant::Config['comments.auto_approve'] != "true"
+ return true if Radiant::Config['comments.bypass_spam_filter']
if simple_spam_filter_required?
passes_logic_spam_filter?
elsif akismet.valid?
I wouldn't recommend doing such a thing unless you're in a controlled
environment where you won't be hit by spambots.
--
David Cato
[email protected]
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant