-->

How to Ban Someone Commenting on Your BlogSpot Blog

How to Block Someone Commenting on Your Blogger Blog - As we know, BlogSpot comment system is integrated with its default comment system that easily lets a commentator leave spam comments like promoting links, writing abusing words and much more. However, Blogger blogs give you the freedom to review the comments before they appear on your blogs.

Check out: How to Get Missing Comment Thread Work in Blogger

Blogger Spam comment protection

There are several reasons you want to ban a user from commenting on your blogger blogs, and one of the reason is to prevent the blogs from spam commentators who frequently send the comments that are considered unethical, rude, contains slander or promotional links which are not good enough to be displayed. To avoid these things occur in future, you need to add a simple jQuery code to your blogger template that will permanently put a spam commenter on the blacklist.

Pay Attention: How to Add Multiple Set Column to Blogger Posts

Spammers engage in this activity in the hope that they can improve their search engine rankings. A few of them carry these tasks because they are not aware of the disadvantages of spam commenting.

Recommended: jQuery Tabs and Accordion for BlogSpot Blogs

To permanently ban a user from commenting on your blog, you have to find his Blogger Profile URL to stop the spammers from accessing your comment form.  If you are among those bloggers, who do not have any idea how to tackle the spam commentators, then you are lucky here.


Banning Spam Commentator With jQuery

  1. Go to Blogger > Theme > Edit HTML 
  2. Add the jQuery code just above the </ body>
  3. <script type='text/javascript'> //<![CDATA[ var spamlist=[  'https://www.blogger.com/profile/xxxxxxxxxx', /* Commentators URL */  'https://blog_name.blogspot.com/', /* Commentators blog URL */ ]; 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!</div>"),      $(this).replaceWith("<span style='color:red'>BANNED USER!</span>");  }) } //]]> </script>

    If the above code does not work for your template, you can try this one:

    <script type='text/javascript'> //<![CDATA[ var spamlist=[  'https://www.blogger.com/profile/xxxxxxxxxx', /* Commentators URL */  'https://blog_name.blogspot.com/', /* Commentators blog URL */ ]; 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!</div>"),      $(this).replaceWith("<span style='color:red'>BANNED USER!</span>");  }) } //]]> </script>
  4. Click Save Theme

Banning Spam Commentator With Conditional Tag

  1. Go to Blogger > Theme > Edit HTML 
  2. Search for the following piece of code inside your theme editor
  3. <b:loop values='data:post.comments' var='comment'>
  4. Add the given conditional tag right below it
  5. <!--Banned--> <b:if cond='data:comment.authorUrl != &quot;https://www.blogger.com/profile/12345678910&quot;'> <!--Banned-->
  6. Now locate the </b: loop> and paste the following code just above it
  7. <!--Banned--> </b:if> <!--Banned-->
  8. Finally, click Save Theme and you are on the go

Before you save your theme, kindly replace the blue text with spammer's blogger URL.

11 Responses to "How to Ban Someone Commenting on Your BlogSpot Blog"

  1. I really like reading through a post that can make people think. Also, many thanks for permitting me to comment!

    reseller smm panel

    BalasHapus
  2. Best work you have done, this online website is really cool with great facts.
    smm panel

    BalasHapus
  3. I learn some new stuff from it too, thanks for sharing your information.
    best Smm panel

    BalasHapus
  4. You made such an interesting piece to read, giving every subject enlightenment for us to gain knowledge. Thanks for sharing the such information with us to read this...
    SMM Panels

    BalasHapus
  5. SMM Panel Pakistan provides the powerful promotion of social media accounts to enable you to Beat your competitors.

    BalasHapus

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel