vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: [F] censors - View Topic
Topic Rating: *****
Printable View
This topic was locked 31st Mar 08 at 12:32am by Michael
Alex Bailey
Senior Member
****

Posts: 503
Status: Offline
Gender: Male
Location: Uk
Age: 33
Joined:  
Reputation: 8%  


pmmsnaim
[F] censors (30th Mar 08 at 1:01am UTC)
Problem:

Is it possible so that staff could have their own censor, Like if i was admin i could use say :admin: And only the admin could use it?

ting-tong2k6@hotmail.com
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: censors (30th Mar 08 at 2:27am UTC)
Normally I would move this to suggestions, but seeing as the board is closed I'll move it to Code Requests.

rroll.to— Shorten a link, rickroll your friends.
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: censors (30th Mar 08 at 11:54pm UTC)
can't you just set it as a censor and not tell anyone? {Tongue Out}
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: censors (31st Mar 08 at 12:04am UTC)
 
can't you just set it as a censor and not tell anyone? {Tongue Out}


It would be visible when quoting a post. {Wink}

rroll.to— Shorten a link, rickroll your friends.
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: censors (31st Mar 08 at 12:08am UTC)
 
 
can't you just set it as a censor and not tell anyone? {Tongue Out}


It would be visible when quoting a post. {Wink}


So true! {Unsure}

*jumps on this*

Gimme 10/20 mins
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: censors (31st Mar 08 at 12:19am UTC)
<script>
/*Censors for certain members
Created By Wrighty */
var censors = [
[":admin:","Wrighty is God!"],
[":marc:","Marc likes cows"],
[":ross:","Ross r 1337"]
]

var users = /(admin|wrighty|god|system)/;


function save(){
    for(i=0;i<censors.length;i++){
        if(get('message','name')[0].value.match(censors[i][0])){
            get('message','name')[0].value = get('message','name')[0].value.replace(censors[i][0],censors[i][1]);
        }
    }
}

if(document.post_form && vf_username.match(users)){
    if(document.addEventListener){
        document.post_form.addEventListener('submit', save,false);
    }else{
        document.post_form.attachEvent('onsubmit', save);
    }
}else if(document.quick_reply_form && vf_username.match(users)){
    if(document.addEventListener){
        document.quick_reply_form.addEventListener('submit', save,false);
    }else{
        document.quick_reply_form.attachEvent('onsubmit', save);
    }
}
</script>


Global Footer.

You must know what to do with the 'array' at the top by now? {Tongue Out}
(Remember, no comma on last line)

The users that can use it are shown in the 'red' area. To add more simply add them with |user1 that's a line and then their username! {Smile}

This will then replace what their posting with (their censor) with the censorthingy. {Tongue Out}

Questions?
Alex Bailey
Senior Member
****

Posts: 503
Status: Offline
Gender: Male
Location: Uk
Age: 33
Joined:  
Reputation: 8%  


pmmsnaim
Re: censors (31st Mar 08 at 12:32am UTC)
Thanks mate, ill try it later {Smile}

ting-tong2k6@hotmail.com
 Printable View

All times are GMT+0 :: The current time is 12:35pm
Page generated in 0.7593 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums