Title: [CODE] Block links in posts to guests Post by: Qub1 on March 16, 2009, 09:47:30 am This code will simply block all links in your posts to guests, and replaces them with some text. I know Agent Moose made this code too (on my request =D), but somehow its not working, so I made my own. This one is much simpler btw =D.
Here, I made a preview (this one is fake, it's just to get the look of it): [Only registered users can see links. Please Login or Register] There is also a preview if you log-out ;D Thats with this link: www.alink.com There are two versions, one where the whole sentance is a link, and another where there are two words (login and Register. Text Version: Put this in your footers: Quote <script> You can edit the red text as you wish, that will be displayed instead of the link.<!-- Guest Links Blocker --> <!-- This script is made by Qub1. Find more scripts like this at http://qub1.smfforfree.com/ --> if ($("td.windowbg2 span.middletext b").html() != null) { $("div.post a").replaceWith('<font color="red">[Only registered users can see links. Please <a href="/?action=login">Login</a> or <a href="/?action=join">Register</a>]</font>'); }</script> Link Version: Put this in your footers: Quote <script> You can edit the red text as you wish, this is what will be displayed instead of the link.<!-- Guest Links Blocker links mod --> <!-- This script is made by Qub1. Find more scripts like this at http://qub1.smfforfree.com/ --> if ($("td.windowbg2 span.middletext b").html() != null) { $("div.post a").attr("href", "?action=join").html("<font color='red'>[Only registered users can see links. Please <a href='/?action=login'>Login</a> or <a href='/?action=join'>Register</a>]</font>"); }</script> Thanks for reading! ~ Qub1 Title: Re: [CODE] Block links in posts to guests Post by: mojobojo82 on March 28, 2009, 03:37:46 am umm none of them work |