Parašė Dweinas333· 2008 Rugp. 5 19:08:23
#7
// Parse smiley bbcode into HTML images
function parsesmileys($message) {
$smiley = array(
"#\:)#si" => "<img src='".IMAGES."smiley/smile.gif' alt='smiley'>",
"#\:D#si" => "<img src='".IMAGES."smiley/bigsmile.gif' alt='smiley'>",
"#\:|#si" => "<img src='".IMAGES."smiley/speechless.gif' alt='smiley'>",
"#\:(#si" => "<img src='".IMAGES."smiley/sadsmile.gif' alt='smiley'>",
"#\;)#si" => "<img src='".IMAGES."smiley/wink.gif' alt='smiley'>",
"#\:p#si" => "<img src='".IMAGES."smiley/toungueout.gif' alt='smiley'>",
"#B)#si" => "<img src='".IMAGES."smiley/cool.gif' alt='smiley'>",
"#\;(#si" => "<img src='".IMAGES."smiley/crying.gif' alt='smiley'>",
"#\:@#si" => "<img src='".IMAGES."smiley/angry.gif' alt='smiley'>"
);
foreach($smiley as $key=>$smiley_img) $message = preg_replace($key, $smiley_img, $message);
return $message;
}
// Show smiley icons in comments, forum and other post pages
function displaysmileys($textarea) {
$smiles = "";
$smileys = array (
":)" => "smile.gif",
":D" => "bigsmile.gif",
":|" => "speechless.gif",
":(" => "sadsmile.gif",
";)" => "wink.gif",
":p" => "tangueout.gif",
"B)" => "cool.gif",
";(" => "crying.gif",
":@" => "angry.gif"
);
kur nepadejau?
Redagavo Dweinas333· 2008 Rugp. 5 19:08:04