View Single Post
  #19  
Old 07-14-2009, 06:04 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I finally scripted this into Zodiac today, instead of censoring swears with just stars I wrote a function to do the whole @#$!% thing.

REPLACE (percentsign) with the actual character

PHP Code:
//#CLIENTSIDE
function getCensored(str) {
  
temp.symbols "!@#$(percentsign)&";
  
temp.int(random(0symbols.length()));
  for (
temp.0temp.str.length(); temp.i++) {
    
temp.newstr @= symbols.charat((temp.temp.i) (percent signsymbols.length());
  }
  return 
temp.newstr;

Usage..

PHP Code:
//#CLIENTSIDE
// Assuming we're using Dusty's Replace Text Function
temp.str "This sentence doesn't contain any stupid swears";
temp.swear "stupid";
temp.str replacetext(temp.strtemp.sweargetCensored(temp.swear)); 
__________________
Quote:
Reply With Quote