Parašė JaWa· 2008 Gru. 18 10:12:34
#1
Sveiki , kas galit pagelbeti su smailais ?pridejau maincore smailu (tie kur pazymeti , tuos pridejau)
// Parse smiley bbcode into HTML images
function parsesmileys($message) {
$smiley = array(
"/\:\)/si" => "<img src='".IMAGES."smiley/smile.gif' alt='smiley'>",
"/\;\)/si" => "<img src='".IMAGES."smiley/wink.gif' alt='smiley'>",
"/\:\(/si" => "<img src='".IMAGES."smiley/sad.gif' alt='smiley'>",
"/\:\|/si" => "<img src='".IMAGES."smiley/frown.gif' alt='smiley'>",
"/\:o/si" => "<img src='".IMAGES."smiley/shock.gif' alt='smiley'>",
"/\:p/si" => "<img src='".IMAGES."smiley/pfft.gif' alt='smiley'>",
"/b\)/si" => "<img src='".IMAGES."smiley/cool.gif' alt='smiley'>",
"/\:d/si" => "<img src='".IMAGES."smiley/grin.gif' alt='smiley'>",
"/\:@/si" => "<img src='".IMAGES."smiley/angry.gif' alt='smiley'>",
"/\:rol:/si" => "<img title='Roll' src='".IMAGES."smiley/roll.gif'>",
"/\:uhoh:/si" => "<img title='Uh-Oh!' src='".IMAGES."smiley/uhoh.gif'>",
"/\:no:/si" => "<img title='No' src='".IMAGES."smiley/no.gif'>",
"/\:shy:/si" => "<img title='Shy' src='".IMAGES."smiley/shy.gif'>",
"/\:lol:/si" => "<img title='Laugh' src='".IMAGES."smiley/laugh.gif'>",
"/\:rip:/si" => "<img title='Dead' src='".IMAGES."smiley/dead.gif'>",
"/\:yes:/si" => "<img title='Yes' src='".IMAGES."smiley/yes.gif'>",
"/\:mad:/si" => "<img title='Mad' src='".IMAGES."smiley/mad.gif'>",
"/\:bigeek:/si" => "<img title='Big Eek' src='".IMAGES."smiley/bigeek.gif'>",
"/\:bigrazz:/si" => "<img title='Big Razz' src='".IMAGES."smiley/bigrazz.gif'>",
"/\:smilewinkgrin:/si" => "<img title='Smile-Wink-Grin' src='".IMAGES."smiley/smilewinkgrin.gif'>",
"/\:sourgrapes:/si" => "<img title='Sour Grapes' src='".IMAGES."smiley/sourgrapes.gif'>",
"/\:confused:/si" => "<img title='Confused' src='".IMAGES."smiley/confused.gif'>",
"/\:upset:/si" => "<img title='Upset' src='".IMAGES."smiley/upset.gif'>",
"/\:sleep:/si" => "<img title='Sleep' src='".IMAGES."smiley/sleep.gif'>",
"/\:jupi:/si" => "<img title='Sleep' src='".IMAGES."smiley/jupi.gif'>",
"/\:prof:/si" => "<img title='Smile' src='".IMAGES."smiley/prof.gif'>",
"/\:kill:/si" => "<img title='Smile' src='".IMAGES."smiley/kill.gif'>"
);
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, $shout=0) {
$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",
":rol:" => "roll.gif",
":uhoh:" => "uhoh.gif",
":no:" => "no.gif",
":shy:" => "shy.gif",
":lol:" => "laugh.gif",
":rip:" => "dead.gif",
":yes:" => "yes.gif",
":mad:" => "mad.gif",
":bigeek:" => "bigeek.gif",
":bigrazz:" => "bigrazz.gif",
":smilewinkgrin:" => "smilewinkgrin.gif",
":sourgrapes:" => "sourgrapes.gif",
":confused:" => "confused.gif",
":upset:" => "upset.gif",
":shy:" => "shy.gif",
":sleep:" => "sleep.gif",
":prof:" => "prof.gif'>",
":kill:" => "kill.gif'>"
);
if (!$shout) foreach($smileys as $key=>$smiley) $smiles .= "<img src='".IMAGES."smiley/$smiley' alt='' onClick=\"insertText('$textarea',
'$key');\">\n";
else foreach($smileys as $key=>$smiley) $smiles .= "<img src='".IMAGES."smiley/$smiley' alt='' onClick=\"insertTextSB('$textarea',
'$key');\">\n";
return $smiles;
}
o stai ka man rodo :
Kur dar reikia ka keisti ?