Autor Zpráva
ajinek
Profil *
hmm mám udělaný guestbook ale jak třeba udělám aby když někdo zadá link aby to byl link? nebo jak filtrovat sprostá slova? jak udělat smajly? díky za rady , sem si vědom že mi to určitě tady nevypíšete ale pokud víte kde otomdle něco najít tak hodte link diks
DJ Miky
Profil
Zkus na hotscripts.com najít už nějaký hotový...
esemeska
Profil
$text = Str_Replace("slovo", "slovo2", $text);

toto nahradi slovo slovem2
ajinek
Profil *
no hotový OK já chci mít svuj :-D , ale kouknu na nějaké GB a nejspíše kouknu jak to tam je dělané :-) :-D
krteczek
Profil
nejlíp je vytvořit array a fci strtr();


$text = "nějaký text který muže obsahovat slovo1 nebo slovo2 nebo nejaké jiné špatné";
$nahrad = array( "slovo1" => "nahrada1", "slovo2" => "nahrada2");

$text = strtr($text, $nahrad);
echo $text; //mělo by vypasat: nějaký text který muže obsahovat nahrada1 nebo nahrada2 nebo nejaké jiné špatné

krteczek
peta
Profil *
ajinek
"jak udělat smajly"
Resim javascriptem JS, http://mracek.xhosting.cz/chat/
(protoze je mensi zprava v databazi)

"jak filtrovat sprostá slova"
Resim PHP, http://mracek.xhosting.cz/chat/

function filterWords($text)
{
$a="[aeiouyáéíóúý]";
$search = array (
"/trtk[aá]/i",
"/((\wop|[^ou]p|^p)i[cč](k?)$a)/i",
"/(kurv$a)|(kuriev)|(kurev)/i",
"/kokot/i",
"/(jeba[lntť])|(jebe)|(jebnu[lntť])|(jeb[kl]$a)/i",
"/(drba[lntť])|(drbe)|(drbnu[lntť])|(drb[kl]$a)/i",
"/debil/i",
"/asshole/i","/bitch/i","/\Wfokya/i","/\Wfok ya/i","/\Wfoksya/i","/fuck/i","/moron/i","/scheise/i","/shit/i","/\Wsu ck/i"
//lasucka,kuriatko,opicka,?pupicky,?spickove
);
$replace = array ();
foreach ($search as $key => $value)
{$replace[$key]="\[pip\]";}
$text = preg_replace($search, $replace, $text);

//if(substr_count($text, "PI*A") > 3) {msgsystem($komu,$n,$sess)}

return $text;
}
... toto je filtrovani s kombinacemi, ale mozna by stacilo si ty kombinace vypsat viz krteczek

"když někdo zadá link aby to byl link"
Resim javascriptem JS, http://mracek.xhosting.cz/chat/
(protoze je mensi zprava v databazi)
(najdi si ve zdrojovem kodu)




a tady jeste jiny system filtrovani
$filter = array(
"bullshit","asshole","shit","scheise",
"www.pokec.sk","www.azet.sk","www.pokec.azet.sk","pokec.azet.sk","www. topchat.sk","topchat",
"zajebať","zajebat","zajebal",
"vytrtkame",
"vyjebaný","vyjebany","vyjebaní","vyjebani",
"vydrbaný","vydrbany","vydrbaní","vydrbani",
"ujebané","ujebane","ujebať","ujebat",
"trtkat",
"skurvený","skurveny",
"pičy","picy","piču","picu","pičoviny","picoviny","pičovini","picovini ","pičovina","picovina","pičou","picou","pičo","pico","pičky","picky", "pičku","picku","pičko","picko","pički","picki","pičí","piči","pici"," piče","pice","pičami","piča","pica",
"kurvy","kurvu","kurvo","kurvi","kurve","kurva","kuriev","kurevský","k urevsky",
"kokoty","kokotov","kokotský","kokotskí","kokotská","kokotmy","kokotmi ","kokotiny","kokotini","kokotina","kokoti","kokota","kokot",
"jebnutých","jebnutych","jebnutým","jebnutym","jebnutý","jebnuty","jeb nutím","jebnutim","jebnutí","jebnuti","jebnutému","jebnutemu","jeblo", "jebko","jebe","jebať","jebat","jebal","jeb",
"drbnutých","drbnutych","drbnutích","drbnutich","drbnutým","drbnutym", "drbnutím","drbnutim","drbnuty","drbnutý","drbnutí","drbnuti","drbko", "drbe","drbať","drbat",
"dojebať","dojebat","dojebané","dojebane",
"bitch","fucking","bitch","moron","sucker","suck","fucker","fuck","fok ya","fok ya",
"webforum"
);

foreach($filter as $vulgarizmus)
{
$text=str_ireplace($vulgarizmus,"<SPAN class=\"cenzura\">[CENZÚRA]</SPAN>",$text);
}
Meldo
Profil
peta
veľmi pekná databáza neslušných slov :-D
Toto téma je uzamčeno. Odpověď nelze zaslat.