There are several reasons
you want to ban the comments a blogger who frequently post comments that are
considered unethical, abusive, defamatory, or contain elements that relate
religion, race, ethnicity, and of course the unfavorable comments to display.
Unfavorable comments to display them:
* Comments containing SARA (religion, ethnicity, race) *: Can offend an individual, group / group, religion, or discrimination against a particular culture.
* Comments containing SPAM
*: Ordinary to blogger comments that contain an invitation in the form of a
link, hoping someone visiting a link that is inserted into the comments.
To avoid these things, my
friend need to enter a specific code to the blog template.
Here's how its application:
The first way with jQuery
1. Open Blogger >>
Templates >> Edit HTML >> Add the following code before the </
body>
jQuery - Go Widget
//<![CDATA[
var spamlist=[
'http://www.blogger.com/profile/123456789xxx',
/* example URL commentator */
'http://name_blog.blogspot.com/',
' URL third
commentators' /* last URL does not need to be comma */
];
for(var v=0; v<spamlist.length; v=v+1){
$("a[href='"+spamlist[v]+"']").each(function(){
$(this).closest(".comment-block").find(".comment-content")
.replaceWith("<div
class='comment-content' style='color:red'> You have been banned!
Please leave this blog!</div>"),
$(this).replaceWith("<span style='color:red'>BANNED
USER!</span>");
})
}
//]]>
</script>
For those who use a template to hack commenting system, could use this code:
jQuery - Go Widget
<script type='text/javascript'>
//<![CDATA[
var spamlist=[
'http://www.blogger.com/profile/123456789xxx',
/* example URL commentator */
'http://name_blog.blogspot.com/',
'URL third
commentators' /* last URL does not need to be comma */
];
for(var v=0; v<spamlist.length; v=v+1){
$("a[href='"+spamlist[v]+"']").each(function(){
$(this).closest(".comment_inner").find(".comment_body")
.replaceWith("<div
class='.comment_body' style='color:red'>You have been banned!
Please leave this blog!</div>"),
$(this).replaceWith("<span style='color:red'>BANNED
USER!</span>");
})
}
//]]>
</script>
2. Save the template.
The second way to Conditional Tag
Note : This method applies only to systems Threaded
Comment Hack
1. Open Blogger >>
Templates >> Edit HTML >> Find the code below
<b:loop
values='data:post.comments' var='comment'>
Then add this code below
HTML - Go Widget
<!--blacklist-->
<b:if cond='data:comment.authorUrl !=
"http://www.blogger.com/profile/12345678910"'>
<!--blacklist-->
http://www.blogger.com/profile/12345678910
replace with URLs will be banned. After that search the code </ b: loop>,
add this code in it:
HTML - Go Widget
<! - blacklist ->
</ b: if>
<! - blacklist ->
2. Save the template.
Good luck.