Werbung
Auf meinem Blogs haben sich in der Weihnachtszeit die Spammer mit bestimmten Produktnamen (gewisse Stiefel, der derzeit in Mode sind) und den üblichen blauen Pillen festgesetzt und mir teilweise über 1500 Kommentare pro Tag in die Datenbank geladen. Natürlich sind die meisten von Akismet als Spam erkannt worden, ein kleiner Teil ging aber in die Moderationsqueue oder sogar direkt aufs Blog. Ich habe mich dann ein wenig mit den WordPress-Funktionen auseinander gesetzt, fand jedoch nur die Möglichkeit, Kommentare in die Moderations- oder in die Spamqueue zu senden, wenn diese bestimmte Worte enthalten. Es gibt wohl derzeit (WordPress Version 3.3.1) keine Funktion um Kommentare mit bestimmten Wörtern direkt zu blocken und gar nicht erst auf die Datenbank durch zu lassen.
Also habe ich mich mit den WordPress-Hooks und Filtern auseinander gesetzt und das Plugin WU – Block Comments geschrieben. Dieses bindet sich nahtlos in das Menü „Diskussion“ ein und bietet dem Nutzer die Möglichkeit, eigene Wörter für die Blockierung von Kommentaren festzulegen:
Schreibt ein Nutzer einen Kommentare mit einem dieser Wörter, so wird der Kommentar mit „Your comment contains spam-words :(
“ blockiert.
Ich habe mich soeben für eine Veröffentlichung auf der WordPress-Plugin-Seite beworben und werde es die kommenden Tage darüber dann veröffentlichen.
During Christmas my blog was flooded with comments regarding certaint boots of a special brand. Unfortunately some of these posts were not catched by Akismet and went to the moderation-queue or directly to the blog. As this was not acceptable to me, i’ve decided to investigate the capabilities of wordpress. Unfortunately it is only possible to send comments to the moderation- or the spam-queue when certain words are found. I wanted to really block them. So i wrote a plugin which provides a possibility to block comments based on words of a predefined list. This list is edited through the „Discussion“-Settings in the Admin-Section of the Blog (see Screenshot above). Blocked comments get a reply: „Your comment contains spam-words :(
“ and nothing will be logged in the database.
I have requested to publish the plugin on the WordPress Plugin Page and will distribute the plugin from there in the next few days.
Thanks for the plug in. I’ve extended it a little to allow regular expressions to be used as blocks. This allows phrases to be attacked not just words and prevents the problem of comments being rejected because part of a word contains a block word.
Of course a blog owner would need to know regular expression to use the change. But if they do not then are able to continue to block on words only.
Here’s the modification to the ‚wp_2_block_comments‘ function:
Thanks for the plugin! Helps me dealing with the Gucci, Vuitton and Nike avalanches. 😉
Perhaps you should mention that it’s possible to limit matches to whole words (and not parts of them like in your example “press” in “Wordpress”). Just add a space before and after the word in the keyword list. Of course, trailing spaces are not very well visible in that list, but it works.
This plugin is awesome! Thank you very much! It dramatically reduced the number of spam comments on my blog and I can now identify Akismet false positives much easier.
However, I noticed that the plugin does not block some spam comments with certain words typical for spam. I have these words both on the Blocklist and on the Blacklist and comments containing these words get through to the spam folder. Maybe they are being sent there before WU – Block Comments has a chance to act? Is it OK to have the same words on the Blocklist as on the Blacklist?
Great plugin but there is something wrong with the characters encoding. For example I would like to block all comments with the html formatting:
. Unfortunately adding
<strong>
to the blacklist results in<strong>
which does not work…