Jump to content
GIGN Forum

Recommended Posts

// Parse smiley bbcode into HTML images
function parsesmileys($message) {
$smiley = array(
 "#\:\)#si" => "<img src='".IMAGES."lbg/smile.gif' alt='smiley'>",
 "#\;\)#si" => "<img src='".IMAGES."lbg/wink.gif' alt='smiley'>",
 "#\:\(#si" => "<img src='".IMAGES."lbg/sad.gif' alt='smiley'>",
 "#\:\|#si" => "<img src='".IMAGES."lbg/frown.gif' alt='smiley'>",
 "#\:o#si" => "<img src='".IMAGES."lbg/shock.gif' alt='smiley'>",
 "#\:p#si" => "<img src='".IMAGES."lbg/pfft.gif' alt='smiley'>",
 "#b\)#si" => "<img src='".IMAGES."lbg/cool.gif' alt='smiley'>",
 "#\:d#si" => "<img src='".IMAGES."lbg/grin.gif' alt='smiley'>",
 "#\:@#si" => "<img src='".IMAGES."lbg/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",
 ";)" => "wink.gif",
 ":|" => "frown.gif",
 ":(" => "sad.gif",
 ":o" => "shock.gif",
 ":p" => "pfft.gif",
 "B)" => "cool.gif",
 ":D" => "grin.gif",
 ":@" => "angry.gif"
);
foreach($smileys as $key=>$smiley) $smiles .= "<img src='".IMAGES."lbg/$smiley' alt='smiley' onClick=\"insertText('$textarea', '$key');\">\n";
return $smiles;
}

Šajā kodā...

Man tur nedaudz direktorija mainīta, bet tas nekas...

Tur pievieno klāt gan apakšējo, gan aukšējo...

BTW - Skatos baigi aizrāvies ar Fusion smile.gif Prieks...

Edited by MeTroiD
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...