<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>HelpOnSpam</title></articleinfo><para>Wikispam is getting more and more annoying. Wiki pages get high ratings in search engines because of the strong linking between the pages (and each other via <ulink url="https://techwiki.helsinki.at/HelpOnSpam/InterWiki#">InterWiki</ulink> links). This makes them a valuable target to increase the ranking of other pages. </para><para>But you can use a strong wiki community and also some technical means to avoid or remove spam on your wiki. </para><section><title>TextChas</title><section><title>What is a TextCHA?</title><para>It is a pure text alternative to <emphasis>CAPTCHAs</emphasis>. MoinMoin uses it to prevent wiki spamming and it has proven to be very effective. </para><para>Features: </para><itemizedlist><listitem><para>for page save, ask a random question </para></listitem><listitem><para>match the given answer against a regular expression </para></listitem><listitem><para>q and a can be configured in the wiki config </para></listitem><listitem><para>multi language support: a user gets a textcha in his language or in language_default or in English (depending on availability of questions/answers for the language) </para></listitem></itemizedlist><para>Tips for answering: </para><itemizedlist><listitem><para>you need to answer the textcha for e.g.: </para><itemizedlist><listitem><para>page save </para></listitem><listitem><para>attachment upload </para></listitem><listitem><para>user profile creation </para></listitem></itemizedlist></listitem><listitem><para>you do not need to answer the textcha for e.g.: </para><itemizedlist><listitem><para>page preview (if you do, it will remember what you entered, though) </para></listitem><listitem><para>user profile changes </para></listitem></itemizedlist></listitem><listitem><para>it is usually a simple/short answer </para></listitem><listitem><para>it compares case-insensitive </para></listitem><listitem><para>sometimes you can find the right answer by reading some important pages of the wiki </para></listitem></itemizedlist></section><section><title>TextCha Configuration</title><para>Tips for configuration: </para><itemizedlist><listitem><para>have 1 word / 1 number answers </para></listitem><listitem><para>ask questions that normal users of your site are likely to be able to answer </para></listitem><listitem><para>do not ask too hard questions </para></listitem><listitem><para>do not ask &quot;computable&quot; questions, like &quot;1+1&quot; or &quot;2*3&quot; </para></listitem><listitem><para>do not ask too common questions </para></listitem><listitem><para>do not share your questions with other sites / copy questions from other sites (or spammers might try to adapt to this)  </para></listitem><listitem><para>you should at least give textchas for 'en' (or for your language_default, if that is not 'en') as this will be used as fallback if MoinMoin does not find a textcha in the user's language </para></listitem></itemizedlist><para>In your wiki config, do something like this: </para><screen><![CDATA[    textchas_disabled_group = u"TrustedEditorGroup" # members of this don't get textchas
    textchas = {
        'en': { # silly english example textchas (do not use them!)
            u"Enter the first 9 digits of Pi.": ur"3\.14159265",
            u"What is the opposite of 'day'?": ur"(night|nite)",
            # ...
        },
        'de': { # some german textchas
            u"Gib die ersten 9 Stellen von Pi ein.": ur"3\.14159265",
            u"Was ist das Gegenteil von 'Tag'?": ur"nacht",
            # ...
        },
        # you can add more languages if you like
    }]]></screen><para>Note that <ulink url="https://techwiki.helsinki.at/HelpOnSpam/TrustedEditorGroup#">TrustedEditorGroup</ulink> from above example can have groups as members. </para></section></section><section><title>BadContent / LocalBadContent</title><para>You can ban certain content within contributions by listing regular expressions on the your '<ulink url="https://techwiki.helsinki.at/HelpOnSpam/BadContent#">BadContent</ulink>' page. </para><para>If a user tries to save a page and its content matches any of these regular expressions, then saving that page will be denied (until the offending content is removed from the editor). </para><para>You can also enable an automatic update of <ulink url="https://techwiki.helsinki.at/HelpOnSpam/BadContent#">BadContent</ulink> via your wikiconfig. This is enabled by this line: </para><screen><![CDATA[    from MoinMoin.security.antispam import SecurityPolicy]]></screen><para>see <ulink url="https://techwiki.helsinki.at/HelpOnSpam/HelpOnConfiguration/SecurityPolicy#">HelpOnConfiguration/SecurityPolicy</ulink> </para></section><section><title>Remove Spam Action</title><para>If you are a <ulink url="https://techwiki.helsinki.at/HelpOnSpam/HelpOnSuperUser#">SuperUser</ulink>, you can use this action to mass-revert changes of some spammer (or some other <emphasis>bad guy</emphasis>). </para><orderedlist numeration="arabic"><listitem><para>Select &quot;Remove Spam&quot; from the available actions. </para></listitem><listitem><para>Select the user (usually part of the IP) </para></listitem><listitem><para>Select &quot;Revert All&quot; </para></listitem><listitem><para>You will see how moin tries to revert his edits. This does not work in every case, so you may have to clean up some of his edits manually. </para></listitem></orderedlist></section></article>