Wiki source code of AntiSpam Techniques
Version 2.2 by Vincent Massol on 2016/10/13
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{box cssClass="floatinginfobox" title="**Contents**"}} | ||
2 | {{toc/}} | ||
3 | {{/box}} | ||
4 | |||
5 | The XWiki project offers several solutions to help fight spam. These are especially useful when XWiki is used as a public site. | ||
6 | |||
7 | = Correct Permissions = | ||
8 | |||
9 | The first thing to do is to make sure you have not left comments open to anyone since this for sure will get you a lot of spam. | ||
10 | |||
11 | What you should do is either allow the Comment right only to registered users or at least ask for Captcha for anonymous users (see below). | ||
12 | |||
13 | Here are some scripts to help you remove comment spam: | ||
14 | * [[snippets:Extension.Remove All Anonymous Comments]] | ||
15 | * [[snippets:Extension.Remove All Comments]] | ||
16 | |||
17 | = CAPTCHA = | ||
18 | |||
19 | You can enable [[Captchas>>https://en.wikipedia.org/wiki/CAPTCHA]] both on the [[registration screen>>extensions:Extension.Administration Application||anchor="HActivatingcaptchas"]] and for [[comments>>extensions:Extension.Administration Application||anchor="HRights"]]. | ||
20 | |||
21 | You can also use the [[XWiki Catpcha module>>extensions:Extension.Captcha Module]] if you need a tighter integration in your own wiki pages / wiki application. | ||
22 | |||
23 | = Notifications = | ||
24 | |||
25 | You can choose to be [[informed by mail>>extensions:Extension.Watchlist Application]] (even in real time) about changes done to your wiki, and thus be able to quickly revert spam. | ||
26 | |||
27 | You can also install the [[IRC Bot Application>>extensions:Extension.IRC Bot Application]] to get instant IRC notifications when a page in the wiki is modified. | ||
28 | |||
29 | = Delayed Indexing = | ||
30 | |||
31 | You can implement [[Delayed Indexing>>http://c2.com/cgi/wiki?DelayedIndexing]] to discourage spammers. It tells search engines to not index pages that were recently updated. On an active wiki, spam will be removed very quickly by community members. Once a page has not been edited for a while, you can assume the community approves of the pages content and thus is spam-free. | ||
32 | |||
33 | This can be achieved by editing the "HTTP META INFO" section of the [["Page Element" Administration section>>extensions:Extension.Administration Application||anchor="HPageElements"]]. For example you could decide to wait 5 hours after a page has been created before allowing it to be indexed by using: | ||
34 | |||
35 | {{code}} | ||
36 | #if ($datetool.getDate().time - $doc.getCreationDate().time < 5*24*60*60*1000) | ||
37 | <meta name=“robots” content=“noindex,nofollow” /> | ||
38 | #end | ||
39 | {{/code}} | ||
40 | |||
41 | = AntiSpam Application = | ||
42 | |||
43 | Last but not least, you could install the [[AntiSpam Application>>extensions:Extension.AntiSpam Tool Application]] which provides 2 main features: | ||
44 | * Ability to prevent spam from being entered (by filtering on keywords) | ||
45 | * UI to easily remove spam content and all content entered by some given user | ||
46 | |||
47 | = Others = | ||
48 | |||
49 | * [[snippets:Extension.Delete Spam Users]] |