QUB1
June 19, 2021, 07:11:00 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Qub1! Here you can find all my scripts!

This site has got some secret previews. Below you can see how to find them:
What:                  How-to:
The secret menu - Type: alakazaam
 
  Home Help Search Gallery Staff List Login Register  

[CODE] Block links in posts to guests


Pages: [1]
  Print  
Author Topic: [CODE] Block links in posts to guests  (Read 605 times)
Qub1
Administrator
Newbie
*****

Rate: +0/-1
Posts: 13


View Profile
« 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  Grin
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>
<!-- 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>
You can edit the red text as you wish, that will be displayed instead of the link.

Link Version:
Put this in your footers:
Quote
<script>
<!-- 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>
You can edit the red text as you wish, this is what will be displayed instead of the link.

Thanks for reading!
~ Qub1
« Last Edit: March 30, 2009, 12:44:35 am by Qub1 » Report Spam   Logged

Share on Facebook Share on Twitter

mojobojo82
Newbie
*

Rate: +0/-0
Posts: 1


View Profile
« Reply #1 on: March 28, 2009, 03:37:46 am »

umm none of them work
Report Spam   Logged

Pages: [1]
  Print  
 
Jump to: