Prisidėjau į saitą naujų ir dar papildomų smailų, bet dabar nevisi veikia. t.y. kartais veikia kar tais ne ir nesuprantu kodėl. Pavyzdžiui Toks smailas -> <- veikia forume, o komentarose ne :|
Čia gal problema dėl to, kad smailų simboliai susideda dar iš žodžių? :/ Arba juos kaip nors reikia atskirti su šituo ženklu -> \
Maincore.php, smile vieta:
// Parse smiley bbcode into HTML images
function parsesmileys($message) {
$smiley = array(
"#\:\)#si" => "<img src='".IMAGES."smiley/smile.gif' alt='Patenkintas'>",
"#\;\)#si" => "<img src='".IMAGES."smiley/wink.gif' alt='Mirksinti akis'>",
"#\:\(#si" => "<img src='".IMAGES."smiley/sad.gif' alt='Nuliūdęs'>",
"#\:\|#si" => "<img src='".IMAGES."smiley/frown.gif' alt='Nėra žodžių'>",
"#\:o#si" => "<img src='".IMAGES."smiley/shock.gif' alt='Nustebęs'>",
"#\:p#si" => "<img src='".IMAGES."smiley/pfft.gif' alt='Liežuvis'>",
"#b\)#si" => "<img src='".IMAGES."smiley/cool.gif' alt='Kietas Bičas'>",
"#\:d#si" => "<img src='".IMAGES."smiley/grin.gif' alt='Juokinga'>",
"#\:@#si" => "<img src='".IMAGES."smiley/angry.gif' alt='Supykęs'>",
"#\:-b#si" => "<img src='".IMAGES."smiley/ban.gif' alt='BAN'>",
"#\:b#si" => "<img src='".IMAGES."smiley/boxing.gif' alt='Boksas'>",
"#\:-c#si" => "<img src='".IMAGES."smiley/chair.gif' alt='Kėdė'>",
"#\:h#si" => "<img src='".IMAGES."smiley/hi.gif' alt='Labas'>",
"#\:-l#si" => "<img src='".IMAGES."smiley/locked.gif' alt='Rakinam'>",
"#\:r#si" => "<img src='".IMAGES."smiley/respect.gif' alt='Pagarba'>",
"#\:s#si" => "<img src='".IMAGES."smiley/shit.gif' alt='Šūdas'>",
"#\ :-verkia: #si" => "<img src='".IMAGES."smiley/cry.gif' alt='Verkia'>",
"#\ :-dance: #si" => "<img src='".IMAGES."smiley/dance.gif' alt='Šoka'>",
"#\ :-devil: #si" => "<img src='".IMAGES."smiley/devil.gif' alt='Velnias'>",
"#\ :-devilfuck: #si" => "<img src='".IMAGES."smiley/devilfuck.gif' alt='Velnio Fuckai'>",
"#\ :-evil: #si" => "<img src='".IMAGES."smiley/evil.gif' alt='Blogas'>",
"#\ :-fuck: #si" => "<img src='".IMAGES."smiley/fuck.gif' alt='Fuckas'>",
"#\ :-rep: #si" => "<img src='".IMAGES."smiley/repplius.gif' alt='Plius reputacija'>",
"#\ :-rip: #si" => "<img src='".IMAGES."smiley/rip.gif' alt='RIP'>",
"#\ :-showoff: #si" => "<img src='".IMAGES."smiley/showoff.gif' alt='Pagyrūnas'>",
"#\ :-guns: #si" => "<img src='".IMAGES."smiley/twoguns.gif' alt='Du ginklai'>",
"#\ :-viking: #si" => "<img src='".IMAGES."smiley/viking.gif' alt='Vikingas'>",
"#\ :-weak: #si" => "<img src='".IMAGES."smiley/weakbench.gif' alt='Slabakas'>"
);
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",
":-B" => "ban.gif",
":B" => "boxing.gif",
":-C" => "chair.gif",
":h" => "hi.gif",
":-l" => "locked.gif",
":r" => "respect.gif",
":s" => "shit.gif",
" :-verkia: " => "cry.gif",
" :-dance: " => "dance.gif",
" :-devil: " => "devil.gif",
" :-devilfuck: " => "devilfuck.gif",
" :-evil: " => "evil.gif",
" :-fuck: " => "fuck.gif",
" :-rep: " => "repplius.gif",
" :-rip: " => "rip.gif",
" :-showoff: " => "showoff.gif",
" :-guns: " => "twoguns.gif",
" :-viking: " => "viking.gif",
" :-weak: " => "weakbench.gif"
);
foreach($smileys as $key=>$smiley) $smiles .= "<img src='".IMAGES."smiley/$smiley' alt='smiley' onClick=\"insertText('$textarea', '$key');\">\n";
return $smiles;
}
|