Post

Remove Active Link In Blog Comment

Tuxnoob - This time i will share how to remove active link on blog comment. If uncomfortable for spam comments on blog comment, you can use this trick.

One of spam comment a recurring this where the comments there is an active link, there is even a link that is embedded in the word.

For remove active link there are several ways for turn off active link in blog comment, in here i will share 4 trick for remove active link in blog comment.

  • Find this code </head> or use ctrl+f for simplify search
  • Copy and paste this script onto </head>

<!–Turn Off Active Link and removed–> <script src=’https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js’ type=’text/javascript’></script> <script type=’text/javascript’> $(function() { $(‘#comments p’).find(‘a’).remove(); }); </script>

  • And save template

explanation : for up script are colored light blue, if in blog has available and should don’t use this script

  • Find this code ]]></b:skin> and put this script under code ]]></b:skin> {This also code can put up </head> or <body>;

<script src=’http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js’ type=’text/javascript’></script> <script type=’text/javascript’> $(function() { $(‘#comments p’).find(‘a’).remove(); }); </script>

  • Save template

explanation : for up script are colored light blue, if in blog has available and should don’t use this script

This code for note of warning if active link will be included to blog comment 

<script src=’https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js’ type=’text/javascript’/> <script type=’text/javascript’> jQuery(document).ready(function(){ jQuery(“#comments p”).find(“a”).replaceWith(“<span> Do Not Use Active Link.</span>”); }); </script>

explanation : for up script are colored light blue, if in blog has available and should don’t use this script

Put this script on <body>  

<script type=’text/javascript’> //<![CDATA[ function blockLinks(parentID, children) { var parent = document.getElementById(parentID), content = parent.getElementsByTagName(children); for (var i = 0; i < content.length; i++) { if (content[i].innerHTML.indexOf(‘</a>’) !== -1) { content[i].innerHTML = “<mark>No live link!!!</mark> Do Not Spam in Here!”; content[i].className = “spammer-detected”; } } } blockLinks(‘comment-holder’, ‘p’); //]]> </script>

There is tutorial for Remove Active Link In Blog Comment.

Thanks, may be useful and happy blogging !!!

This post is licensed under CC BY 4.0 by the author.