One way of combating spammers in your Blogger blog’s Comments section is by preventing the use of HTML-based codes that enables the embedding of hyperlinked texts. This would be no problem if you’re using a third-party commenting system like Disqus or Intense Debate that gives its users the option to disable embedding of HTML code.
But what if you want to stick with Blogger’s default commenting system? Well, fortunately there’s Nitin Maheta, a Blogger user who was kind enough to share a tutorial that’ll teach you how to give Blogger’s commenting system the same feature by turning links into simple text. All takes is using a little bit of jQuery. Just simply follow the instructions below.
  • In your Blogger dashboard, head over to Design and then on Template.
  • Click on Edit HTML.
  • Search for the </body> tag and then copy/paste the code below just right above it.
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'/>
<script>$('.comment-content a[rel$=nofollow]').replaceWith(function(){return ($(this).text());});</script>     
NOTE: If you already have the part that’s highlighted in red already in your template’s code then exclude it and just copy the remainder of the code.
  • Save your template and you’re done. By pasting the above code in your template, all the hyperlinked text in a comment will be converted to simple [unclickable] text.
OR, if you’d rather have the hyperlinked texts removed entirely than just disabling the hyperlinked text, then copy/paste this code below instead. Again, if you already have the one that’s highlighted in red inside your template’s code then just skip copying that part.
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'/>
<script>$('.comment-content a[rel$=nofollow]').hide());</script>
  • Save your template and that’s it. You’re done!

0 comments:

Post a Comment

 
Top