Secret Manner

This Blog Provides Information About Blog, Blog Tips, Ways And Others

How to Filter Comment SPAM in Blog


One time
ever in this blog there is a comment that did not connect with the discussion and instead gives a row of dirty words smelling porn with accompanying link. How upset do not try? Promotion of porn in our blog posts, finally I delete that comment. Ever also events in blogging?

This time we will learn to filter comments from profanity. Not wearing and not very polite when blogs that we manage and could be a reflection of the blog owner should littered with comments that are likely spam. Profanity it could be a detraction, porn, and also ridicule. How to filter the dirty comments this, not through moderation of comments but by adding the script on our blog.

How to Filter Comments Dirty Blog
1. Log in to Blogger.
2. On the Dashboard page, we select Draft.
3. Then select Edit HTML
4. Tick the Expand Widget Templates
5. Place the following code above the <body>

<script type = 'text / javascript'>
// <! [CDATA [
badwordfilter function (ID) {
var comm = document.getElementById (ID);
var comment = comm.innerHTML;
var reBadWords = / profanity 1 | 2 dirty word | profanity 3 / gi;
comment1 = comment.replace (reBadWords, "****");
comm.innerHTML = comment1;
comm.style.display = "block";
}
//]]>
</ script>

6. Replace dirty word 1, profanity 2, 3 dirty word with the word that you think is inappropriate is displayed in the comments, and you can add more.
7. Find <p> <data: comment.body /> </ p> and replace it with the following code

<p>
<div expr: id = 'Data: comment.id' style = 'display: none;'>
<data: comment.body />
</ div>
<script type = 'text / javascript'> badwordfilter (& quot; <data: comment.id /> & quot;);
</ script> </ p>

8. When finished Save Template.

Now it can be tested, tried comments by using words that have been filtered out earlier, it is the dirty word comment that will be replaced with ****. If your blog does not apply manually moderate comments, it looks like this could be used to keep the blog keep it clean. ;)
Bagikan :
+
Previous
Next Post »
0 Komentar untuk "How to Filter Comment SPAM in Blog"

 
Template By Kunci Dunia
Back To Top