eZ Community » Forums » Developer » Fighting spam links in ezxml
expandshrink

Fighting spam links in ezxml

Fighting spam links in ezxml

Tuesday 19 June 2012 7:40:47 am - 4 replies

Just wondering if anyone has also faced the challenge of battling spam in forums where ezxml blocks are used instead of text fields.  I'm want to insert rel="nofollow" with all links whether formed like this or www.spamlink.com or spamlink.com.

Its not straightforward since the content is generally rendered through a single template. Any solutions or suggestions?

Tuesday 19 June 2012 8:25:20 pm

It looks like you might consider an extension/template operator which filters/cleans your content and adds the "no follow" value to an anchor tag.

It shouldn't be too hard to construct a template operator with regex (search) and replace methodology.

Then you need to have a template with the content being sent to the template operator and you should get a cleaned (no follows added) XML block

Sunday 24 June 2012 10:25:38 am

I would take the approach of trying to block spam-bots before they get to your forum. Bad Behavior is a PHP-based spam-killer that works wonders - I'll see if I can get CWA to release the eZ Publish extension they built which incorporated Bad Behavior, onto http://projects.ez.no.

Sunday 24 June 2012 10:50:41 am

Quote from Geoff Bentley :

I would take the approach of trying to block spam-bots before they get to your forum.

Hi Geoff

I wasn't very clear earlier, I have already done that with captcha, there problem I experience are human spammers, registering and then making in-genuine comments with back-links.  Additionally there are genuine back-links when people share resources however adding nofollow should provide the disincentive needed to eradicate the former.

Sunday 24 June 2012 11:08:06 am

Gotcha.  Does overriding content/datatype/view/ezxmltags/link.tpl for the particular XML-block attribute you're using in the forum solve your problem?  You can use class_identifier or attribute_identifier matches for datatype overrides.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu