Parašė Narysx· 2008 Bir. 26 22:06:42
#11
Kai taip padarau, paskutinis smailas veikia tik tokiu atveju, jei jį poste parašau pirmą. Bet... Tada neveikia kuris nors kitas smailas, rašant juos visus. :|
Va visas kodas:
// 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/icon_razz.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'>",
"#\:clap:#si" => "<img src='".IMAGES."smiley/clap.gif' alt='smiley'>",
"#\:confused:#si" => "<img src='".IMAGES."smiley/confused.gif' alt='smiley'>",
"#\:qdead:#si" => "<img src='".IMAGES."smiley/dead.gif' alt='smiley'>",
"#\:qdisapprove:#si" => "<img src='".IMAGES."smiley/disapprove.gif' alt='smiley'>",
"#\:geek:#si" => "<img src='".IMAGES."smiley/geek.gif' alt='smiley'>",
"#\:hug:#si" => "<img src='".IMAGES."smiley/hug.gif' alt='smiley'>",
"#\:laughing:#si" => "<img src='".IMAGES."smiley/laughing.gif' alt='smiley'>",
"#\:mad:#si" => "<img src='".IMAGES."smiley/mad.gif' alt='smiley'>",
"#\:qouch:#si" => "<img src='".IMAGES."smiley/ouch.gif' alt='smiley'>",
"#\:qpinch:#si" => "<img src='".IMAGES."smiley/pinch.gif' alt='smiley'>",
"#\:roll:#si" => "<img src='".IMAGES."smiley/roll.gif' alt='smiley'>",
"#\:shy:#si" => "<img src='".IMAGES."smiley/shy.gif' alt='smiley'>",
"#\:sleep:#si" => "<img src='".IMAGES."smiley/sleep.gif' alt='smiley'>",
"#\:tdown:#si" => "<img src='".IMAGES."smiley/tdown.gif' alt='smiley'>",
"#\:thumbsup:#si" => "<img src='".IMAGES."smiley/thumbsup.gif' alt='smiley'>",
"#\:uhoh:#si" => "<img src='".IMAGES."smiley/uhoh.gif' alt='smiley'>",
"#\:cry:#si" => "<img src='".IMAGES."smiley/cry.gif' alt='smiley'>",
"#\:yes:#si" => "<img src='".IMAGES."smiley/yes.gif' alt='smiley'>",
"#\:no:#si" => "<img src='".IMAGES."smiley/no.gif' alt='smiley'>",
"#\:naughty:#si" => "<img src='".IMAGES."smiley/great.gif' alt='smiley'>",
"#\:fight:#si" => "<img src='".IMAGES."smiley/fight.gif' alt='smiley'>",
"#\:nunu:#si" => "<img src='".IMAGES."smiley/nunu.gif' alt='smiley'>",
"#\:fuck:#si" => "<img src='".IMAGES."smiley/fuck.gif' alt='smiley'>",
"#\:megalol:#si" => "<img src='".IMAGES."smiley/megalol.gif' alt='smiley'>",
"#\:coffee:#si" => "<img src='".IMAGES."smiley/coffee.gif' alt='smiley'>",
"#\:ex: #si" => "<img src='".IMAGES."smiley/icon_exclaim.gif' alt='smiley'>",
"#\:quest: #si" => "<img src='".IMAGES."smiley/icon_question.gif' alt='smiley'>",
"#\:hawks: #si" => "<img src='".IMAGES."smiley/kom/hawks.png' alt='smiley'>",
"#\:celtics: #si" => "<img src='".IMAGES."smiley/kom/celtics.png' alt='smiley'>",
"#\:bobcats: #si" => "<img src='".IMAGES."smiley/kom/bobcats.png' alt='smiley'>",
"#\:bulls: #si" => "<img src='".IMAGES."smiley/kom/bulls.png' alt='smiley'>",
"#\:cavs: #si" => "<img src='".IMAGES."smiley/kom/cavs.png' alt='smiley'>",
"#\:mavs: #si" => "<img src='".IMAGES."smiley/kom/mavs.png' alt='smiley'>",
"#\:nuggets: #si" => "<img src='".IMAGES."smiley/kom/nuggets.png' alt='smiley'>",
"#\:\-pistons: #si" => "<img src='".IMAGES."smiley/kom/pistons.png' alt='smiley'>",
"#\:gsw: #si" => "<img src='".IMAGES."smiley/kom/gsw.png' alt='smiley'>",
"#\:rockets: #si" => "<img src='".IMAGES."smiley/kom/rockets.png' alt='smiley'>",
"#\:\-pacers: #si" => "<img src='".IMAGES."smiley/kom/pacers.png' alt='smiley'>",
"#\:clippers: #si" => "<img src='".IMAGES."smiley/kom/clippers.png' alt='smiley'>",
"#\:lakers: #si" => "<img src='".IMAGES."smiley/kom/lakers.png' alt='smiley'>",
"#\:grizzlies: #si" => "<img src='".IMAGES."smiley/kom/grizzlies.png' alt='smiley'>",
"#\:heat: #si" => "<img src='".IMAGES."smiley/kom/heat.png' alt='smiley'>",
"#\:bucks: #si" => "<img src='".IMAGES."smiley/kom/bucks.png' alt='smiley'>",
"#\:timberwolves: #si" => "<img src='".IMAGES."smiley/kom/timberwolves.png' alt='smiley'>",
"#\:nets: #si" => "<img src='".IMAGES."smiley/kom/nets.png' alt='smiley'>",
"#\:hornets: #si" => "<img src='".IMAGES."smiley/kom/hornets.png' alt='smiley'>",
"#\:knicks: #si" => "<img src='".IMAGES."smiley/kom/knicks.png' alt='smiley'>",
"#\:magic: #si" => "<img src='".IMAGES."smiley/kom/magic.png' alt='smiley'>",
"#\:76: #si" => "<img src='".IMAGES."smiley/kom/76.png' alt='smiley'>",
"#\:suns: #si" => "<img src='".IMAGES."smiley/kom/suns.png' alt='smiley'>",
"#\:blazers: #si" => "<img src='".IMAGES."smiley/kom/blazers.png' alt='smiley'>",
"#\:kings: #si" => "<img src='".IMAGES."smiley/kom/kings.png' alt='smiley'>",
"#\:spurs: #si" => "<img src='".IMAGES."smiley/kom/spurs.png' alt='smiley'>",
"#\:sonics: #si" => "<img src='".IMAGES."smiley/kom/sonics.png' alt='smiley'>",
"#\:raptors: #si" => "<img src='".IMAGES."smiley/kom/raptors.png' alt='smiley'>",
"#\:jazz\: #si" => "<img src='".IMAGES."smiley/kom/jazz.png' alt='smiley'>",
"#\:wizards\: #si" => "<img src='".IMAGES."smiley/kom/wizards.png' 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" => "icon_razz.gif",
"B)" => "cool.gif",
":D" => "grin.gif",
":@" => "angry.gif",
":clap:" => "clap.gif",
":confused:" => "confused.gif",
":qdead:" => "dead.gif",
":qdisapprove:" => "disapprove.gif",
":geek:" => "geek.gif",
":hug:" => "hug.gif",
":laughing:" => "laughing.gif",
":mad:" => "mad.gif",
":qouch:" => "ouch.gif",
":qpinch:" => "pinch.gif",
":roll:" => "roll.gif",
":shy:" => "shy.gif",
":sleep:" => "sleep.gif",
":tdown:" => "tdown.gif",
":thumbsup:" => "thumbsup.gif",
":uhoh:" => "uhoh.gif",
":cry:" => "cry.gif",
":yes:" => "yes.gif",
":no:" => "no.gif",
":naughty:" => "great.gif",
":fight:" => "fight.gif",
":nunu:" => "nunu.gif",
":fuck:" => "fuck.gif",
":megalol:" => "megalol.gif",
":coffee:" => "coffee.gif",
":ex:" => "icon_exclaim.gif",
":quest:" => "icon_question.gif",
":hawks:" => "kom/hawks.png",
":celtics:" => "kom/celtics.png",
":bobcats:" => "kom/bobcats.png",
":bulls:" => "kom/bulls.png",
":cavs:" => "kom/cavs.png",
":mavs:" => "kom/mavs.png",
":nuggets:" => "kom/nuggets.png",
":-pistons:" => "kom/pistons.png",
":gsw:" => "kom/gsw.png",
":rockets:" => "kom/rockets.png",
":-pacers:" => "kom/pacers.png",
":clippers:" => "kom/clippers.png",
":lakers:" => "kom/lakers.png",
":grizzlies:" => "kom/grizzlies.png",
":heat:" => "kom/heat.png",
":bucks:" => "kom/bucks.png",
":timberwolves:" => "kom/timberwolves.png",
":nets:" => "kom/nets.png",
":hornets:" => "kom/hornets.png",
":knicks:" => "kom/knicks.png",
":magic:" => "kom/magic.png",
":76:" => "kom/76.png",
":suns:" => "kom/suns.png",
":blazers:" => "kom/blazers.png",
":kings:" => "kom/kings.png",
":spurs:" => "kom/spurs.png",
":sonics:" => "kom/sonics.png",
":raptors:" => "kom/raptors.png",
":jazz:" => "kom/jazz.png",
":wizards:" => "kom/wizards.png"
Redagavo Narysx· 2008 Bir. 26 22:06:19