March 18, 2024, 09:05:27 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Revolution X, where Coding meets Graphics.
 
  Home Help Search Arcade Affiliates Staff List Calendar Members Login Register  

Block Post Links from Guests

Pages: [1]   Go Down
  Print  
Author Topic: Block Post Links from Guests  (Read 4886 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
Tenth year Anniversary Nineth year Anniversary Search
« on: March 15, 2009, 12:10:49 pm »

Footers:
Quote
<script>
var ShowGuest = "<font color='red'>[Only registered users can see links. Please <a href='/?action=login'>Login</a> or <a href='/?action=join'>Register</a>]</font>";

if(location.href.match(/topic,/i)){
//Created by Agent Moose (revolutionx.smfforfree3.com)
var name = document.getElementsByTagName("span");
for(v=0;v<name.length;v++){
if(name[v].innerHTML.match(/Hello <b>(.*)<\/b>/i)){
if(!RegExp.$1) $("div.post a").replaceWith(ShowGuest);
};};};
</script>
Original Request: http://revolutionx.smfforfree3.com/index.php/topic,437.0.html

I have no idea why, but this code didn't want to work with me when I used all javascript.

Anyway, I got it done Smiley

You may edit the red text.

Enjoy Smiley
Report Spam   Logged


Share on Facebook Share on Twitter

Qub1
©opy®ight
Member
Member
Offline Offline

Gender: Male
Posts: 42


The copyrighter


View Profile WWW
Badges: (View All)
« Reply #1 on: March 15, 2009, 01:47:47 pm »

Thanks for making, moose, but for some reason i can't use this one and the post blocker for certain boards, because i have guides on my forum that are members only, and links that are members only. Could you please take a look at it?
Report Spam   Logged



Simple Plan
~ A wide community.

Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
Tenth year Anniversary Nineth year Anniversary Search
« Reply #2 on: March 16, 2009, 05:56:11 pm »

So, you want this code to only block link's in certain boards, right?
Report Spam   Logged


Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #3 on: March 29, 2009, 01:50:49 am »

do we even edit
Code:
<font color='red'>[
and
Code:
a>]</font>";
Report Spam   Logged






Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #4 on: March 29, 2009, 01:51:30 am »

or we just edit
Code:
Only registered users can see links. Please <a href='/?action=login'>Login</a> or <a href='/?action=join'>Register
Report Spam   Logged






Danidemps
Exclusive
Exclusive
Offline Offline

Gender: Male
Posts: 269


View Profile WWW
Badges: (View All)
« Reply #5 on: March 29, 2009, 02:09:07 am »

you can edit <font color='red'>[  To any colour you want and

<a href='/?action=login'>Login</a> or <a href='/?action=join'>Register
The register part makes it so they have to register before use =)
Report Spam   Logged
Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #6 on: March 29, 2009, 02:43:20 am »

hmm for some reason its not working
Report Spam   Logged






Qub1
©opy®ight
Member
Member
Offline Offline

Gender: Male
Posts: 42


The copyrighter


View Profile WWW
Badges: (View All)
« Reply #7 on: March 29, 2009, 02:03:06 pm »

yeah, same problem here Shocked
Anyway, i made my own code so i don't really need it anymore  Tongue
Report Spam   Logged



Simple Plan
~ A wide community.

Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #8 on: April 03, 2009, 12:04:02 am »

not working Sad help plz
Report Spam   Logged






Andrew
Exclusive
Exclusive
Offline Offline

Gender: Male
Posts: 539



View Profile WWW
Badges: (View All)
Combination Topic Starter Poll Voter
« Reply #9 on: June 25, 2009, 01:07:05 pm »

hmm weird...I tested it before and it worked fine, now its not working for me either.

Nothing in it was edited, I used this code:
Code:
<script>
var ShowGuest = "<font color='red'>[Only registered users can see links. Please <a href='/?action=login'>Login</a> or <a href='/?action=join'>Register</a>]</font>";

if(location.href.match(/topic,/i)){
//Created by Agent Moose (revolutionx.smfforfree3.com)
var name = document.getElementsByTagName("span");
for(v=0;v<name.length;v++){
if(name[v].innerHTML.match(/Hello <b>(.*)<\/b>/i)){
if(!RegExp.$1) $("div.post a").replaceWith(ShowGuest);
};};};
</script>
Report Spam   Logged

Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #10 on: June 26, 2009, 01:31:03 am »

Same.
I just copied the code up above.
Not doing anything  Angry
Report Spam   Logged






Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy