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:
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
  
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]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: censors (30th Mar 08 at 11:54pm UTC) | | can't you just set it as a censor and not tell anyone? | |
|
Marc vChat Developer
     I <3 Rossy
Posts: 3,388 Status: Offline Gender: Male Location: Ontario, Canada Age: 33 Joined:
Additional Groups: Coding Team
  
pmwww | Re: censors (31st Mar 08 at 12:04am UTC) | | can't you just set it as a censor and not tell anyone?
It would be visible when quoting a post. | |
rroll.to— Shorten a link, rickroll your friends. |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: censors (31st Mar 08 at 12:08am UTC) | | 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 | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | 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? (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? | |
|
Alex Bailey Senior Member
   
Posts: 503 Status: Offline Gender: Male Location: Uk Age: 33 Joined:
pmmsnaim | Re: censors (31st Mar 08 at 12:32am UTC) | | Thanks mate, ill try it later | |
ting-tong2k6@hotmail.com |
|