Recent Topics

Administrator should not have comments antispam filtered

Started by on Feb 10, 2009 – Contents updated: Feb 10, 2009

Feb 10, 2009 21:40    

Hi, using 2.4.6 essentially out of the box and I go to post the following text in a comment from the post's entry in the backoffice:


Hi Steve!  Yes, well I'd spin it back at you and say that the sub-standard state of voting technology effectively killed off remote early voting... however, I do think it's important to balance the risks involved and using DRE+VVPAT for early voting seems manageable.

As for national stats of residual votes: I'm assuming you want residual votes for the Presidential contest on the ballot.  You can take Michael McDonald's turnout stats here (<a href="http://elections.gmu.edu/Turnout_2008G.html">http://elections.gmu.edu/Turnout_2008G.html</a> ) and subtract them from the reported number of ballots cast with a vote on them for president to get national residual vote stats.  I'm not sure anyone has written anything about this.

This comes back as "Illegal content found (spam?)" (note that I allow `a` tags in comments). That's puzzling because it's very boring text and there's no indication in the error what part of the message triggered the spam filtering.

It's even more puzzling because I posted this as an admin and my admin user settings have the antispam filtering unchecked.

So, it sounds like this could be a bug or a feature request: User groups who have antispam filtering disabled in the "Users" -> "(user group name)" tab should not have their comments antispam filtered!

Feb 10, 2009 21:53

Hi joebeone,

About a year ago I had a similar issue with a posting I couldn't believe contained SPAM. At that point (characters) pointed me to a method to -at least- view what triggered the spamfilter. If I recall correctly we decided to add that as a feature, but it never happened. I believe the antispam measures by B2evo (including a bad url list) are about to be deprecated. For reasonably accurate lists turn to Aksimet.

Good luck

Feb 10, 2009 22:12

Cool! I'll await the beta or whatever 3.0 release. best, Joe

Feb 11, 2009 00:05

Isn't there a back office setting for not antispam filtering by group?

Feb 11, 2009 00:12

There sure is... and it is turned off for administrators (the user I was posting as is an admin). Thoughts?

Feb 11, 2009 00:21

Oh bummer cuz I turned it off for a usergroup I have. See my thoughts are "turning it off doesn't do anything other than remove the mark from the box". Haven't been caught by it myself in a long time though.

Sorry, no worthy help here.

Feb 11, 2009 11:23

Crack open /inc/_core/_param.funcs.php and change the following ( approx 1633 )

		case 'commenting':
			$xhtmlvalidation  = $use_xhtmlvalidation_for_comments;
			$allow_css_tweaks = $comments_allow_css_tweaks;
			$allow_javascript = false;
			$allow_iframes    = false;
			$allow_objects    = false;
			// fp> I don't know if it makes sense to bypass antispam in commenting context if the user has that kind of permissions.
			// If so, then we also need to bypass in several other places.
			$bypass_antispam  = $Group->perm_bypass_antispam;
			break;

¥

Feb 11, 2009 16:35

¥åßßå wrote:

Crack open /inc/_core/_param.funcs.php and change the following ...

That worked with one tweak... the `Group` variable wasn't defined in that function so I had to pull it in (copied from a function above):

		case 'commenting':
			$xhtmlvalidation  = $use_xhtmlvalidation_for_comments;
			$allow_css_tweaks = $comments_allow_css_tweaks;
			$allow_javascript = false;
			$allow_iframes    = false;
			$allow_objects    = false;
			// fp> I don't know if it makes sense to bypass antispam in commenting context if the user has that kind of permissions.
			// If so, then we also need to bypass in several other places.
			$Group = $current_User->get_Group();                    
			$bypass_antispam  = $Group->perm_bypass_antispam;       
			break;

Feb 11, 2009 16:37

Guess I should test code before I post it ... tad hard on my blog though, it doesn't have any antispam entries :p

¥

Feb 19, 2009 21:02

crap... sorry to bring this thread back from the grave:

I noticed that I haven't had any comments since I made this change... unfortunately, the reason is that this seems to have broken commenting for non-logged-in users... the error I get when commenting when I'm not logged in is thus:


Fatal error: Call to a member function get_Group() on a non-object in /home/joehall/public_html/nqb2/inc/_core/_param.funcs.php on line 1644

Anyone have quick suggestions for an if/else for users without a Group? (or other ideas?)

Feb 19, 2009 21:13

if( !empty( $current_User ) )
	$Group = $current_User->get_Group();                    
	$bypass_antispam  = $Group->perm_bypass_antispam;
}
else
{
	$bypass_antispam  = false;
}

	break;

¥åßßå wrote:

Guess I should test code before I post it ... tad hard on my blog though, it doesn't have any antispam entries :p

¥

¥

Feb 19, 2009 21:17

That is missing a {
The second line should be { even though I would put it at the end of the first line.

Feb 19, 2009 21:38

Works like a charm, as always! Thanks and karma be to the almighty b2evo overlords.


Form is loading...

Content Mangement System – This forum is powered by b2evolution CMS, a complete engine for your website.