How To Block Spam Comment Bots Inward Blogger
How Comment Spam Bots Work?
Blogger (service) is a used past times millions of blogs in addition to websites. Therefore, all these websites uses the same Blogger commenting system unless they are using a third-party commenting system. This means, it makes it a lot easier for spam bots to notice blogs in addition to ship service spam comments.
Some spam bots are smart plenty to fill upwardly captcha in addition to flexible plenty to response dissimilar questions to fool the website's spam prevention system. This means, the best way to tackle spam bots is to completely block them from commenting on your website.
Method#1: Blocking Spam Bots inward Blogger Using b:if Condition
In the kickoff method, nosotros volition block bots using b: if condition. Therefore, to ban a user from commenting on your site, you lot lead keep to notice his Blogger Profile URL in addition to using b: if status halt him from accessing comment form. This volition blacklist a specific user's Blogger profile in addition to he volition no longer last able to brand or run across whatsoever comments on your site.
- To notice a user's Blogger Profile URL, acquire to your comment department in addition to left click on the names of the comment posters.
- Now listing of options volition last appear, from the listing choose "Copy link address" equally it is shown inward the screenshot below:
- After copying the profile URL, acquire to Blogger >> Template >> Edit HTML >> Search for </body> in addition to simply below it glue the next code:
- Now inward the higher upwardly code, replace https://www.blogger.com/profile/XXXXXXXXXX with the Blogger profile URL you lot copied earlier. Keep inward hear this volition ban solely 1 user to ban to a greater extent than users you lot lead keep to glue the higher upwardly code over again inward your template but amongst dissimilar profile URL.
- Once everything is done, relieve the template. Take a await at the screenshot below to the results:


<b:if cond='data:comment.authorUrl!= "https://www.blogger.com/profile/XXXXXXXXXX"' >
<script>
$(".comment-form").replaceWith("<p style=" color: #111; text-align: center; border: 1px corporation #d2d2d2; padding: 13px; font-size: 15px; ">You are Banned from Commenting on this site</p>");
</script>
</b:if>
Method#2: Blocking Spam bots inward Blogger amongst jQuery:
In the minute method, nosotros volition block bots using jQuery.
- Go to Blogger >> Template >> Edit HTML >> search for the ending </body> tag in addition to correct higher upwardly it glue the next jQuery code:
- Now inward the higher upwardly code, supervene upon https://www.blogger.com/profile/XXX with the Blogger profile URL that you lot would similar to ban. You tin ban unlimited users past times adding profile links inward the higher upwardly codes.
- Once everything is done, press "Save Template". Take a await at the screenshot below to the results:

<script type='text/javascript'>
//<![CDATA[
//Block Spam Comment Bots inward Blogger
//Black List Blogger Profiles
var spamlist = [
'https://www.blogger.com/profile/XXX', //First Ban User
'https://www.blogger.com/profile/XXX', //Second Ban User
'https://www.blogger.com/profile/XXX' //Third Ban User
];
for (var v = 0; v < spamlist.length; v = v + 1) {
$("a[href='" + spamlist[v] + "']").each(function() {
$(this).closest(".comment-block").find(".comment-actions, .datetime, .comment-replybox-thread, .comment-block")
.replaceWith("");
$(this).closest(".comment-block").find(".comment-content")
.replaceWith("<div class='comment-content' style='color:red'>This user's comment has been removed!</div>");
$(this).replaceWith("<span style='color:red'>BANNED USER!</span>");
})
}
//]]>
</script>
Baca Juga

Post a Comment
Post a Comment