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?
Normally I would move this to suggestions, but seeing as the board is closed I'll move it to Code Requests.
can't you just set it as a censor and not tell anyone?![]()
can't you just set it as a censor and not tell anyone?![]()
It would be visible when quoting a post.![]()
can't you just set it as a censor and not tell anyone?![]()
It would be visible when quoting a post.![]()
So true!![]()
*jumps on this*
Gimme 10/20 mins
<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?![]()
(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!![]()
This will then replace what their posting with (their censor) with the censorthingy.![]()
Questions?
Thanks mate, ill try it later![]()