Parašė lilas· 2008 Bir. 19 14:06:06
#8
Apie 300 eilute ziurek
function parsesmileys($message) {
$smiley = array(
"#\:\)#si" => "<img src='".IMAGES."smiley/smile.gif' alt=':)'>",
"#\;\)#si" => "<img src='".IMAGES."smiley/wink.gif' alt=';)'>",
"#\:\(#si" => "<img src='".IMAGES."smiley/sad.gif' alt=':('>",
"#\:\|#si" => "<img src='".IMAGES."smiley/frown.gif' alt=':|'>",
"#\:o#si" => "<img src='".IMAGES."smiley/shock.gif' alt=':O'>",
"#\:p#si" => "<img src='".IMAGES."smiley/pfft.gif' alt=':P'>",
"#b\)#si" => "<img src='".IMAGES."smiley/cool.gif' alt='B)'>",
"#\:d#si" => "<img src='".IMAGES."smiley/grin.gif' alt=':D'>",
"#\:@#si" => "<img src='".IMAGES."smiley/angry.gif' alt=':@'>",
"#\:trumpas_kodas:#si" => "<img src='".IMAGES."smiley/smailo_nuoroda.gif' alt='apraymas xD'>",
);
foreach($smiley as $key=>$smiley_img) $message = preg_replace($key, $smiley_img, $message, 4);
return $message;
}
// Show smiley icons in comments, forum and other post pages
function displaysmileys($textarea) {
$smiles = "";
$smileys = array (
":)" => "smile.gif",
";)" => "wink.gif",
":|" => "frown.gif",
":(" => "sad.gif",
":o" => "shock.gif",
":p" => "pfft.gif",
"B)" => "cool.gif",
":D" => "grin.gif",
":@" => "angry.gif",
":trumpas_kodas:" => "smailo_nuoroda.gif"
Matai kur rasyskinta ta redaguok