Announcement:

This is a Testing Annocement. I don't have Much to Say. This is a Place for a Short Product Annocement

Sunday, 9 June 2013

Automatically Remove Links From Blogger Comments With jQuery

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!

Share it Please

Islamicvideoportal

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.

0 comments:

Post a Comment

Copyright @ 2013 All Tutorials and Information . Designed by Templateism | Love for The Globe Press