Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Paskutinis smailas
Parašė Narysx· 2008 Bir. 26 21:06:00
#1
Kažkodėl saite neveikia paskutinis smailas. Štai kodas:
"#\:smailas1: #si" => "<img src='".IMAGES."smiley/kom/smaikas1.png' alt='smiley'>",
"#\:smailas2: #si" => "<img src='".IMAGES."smiley/kom/smailas2.png' alt='smiley'>"
":smailas1:" => "kom/smailas1.png",
":smailas2:" => "kom/smailas2.png"
smailas2 yra tas paskutinis smailas. Pvz forume, smailų sąraše jį rodo. Paspaudus ant jo, teksto laukelyje išmeta ":smailas2:", tačiau parašius postą, jame rodo ne smailą, o užrašą ":smailas2:".
WTF?
Parašė Gugiss· 2008 Bir. 26 22:06:28
#2
gal gale padek ; :s
Parašė RuP3r· 2008 Bir. 26 22:06:18
#3
"#\:smailas1: #si" => "<img src='".IMAGES."smiley/kom/smaikas1.png' alt='smiley'>",
"#\:smailas2: #si" => "<img src='".IMAGES."smiley/kom/smailas2.png' alt='smiley'>",
":smailas1:" => "kom/smailas1.png",
":smailas2:" => "kom/smailas2.png",
Daryk gal taip
Redagavo RuP3r· 2008 Bir. 26 22:06:34
Parašė Gugiss· 2008 Bir. 26 22:06:18
#4
nea.. daryk taip :D
"#\:smailas1\: #si" => "<img src='".IMAGES."smiley/kom/smaikas1.png' alt='smiley'>",
"#\:smailas2\: #si" => "<img src='".IMAGES."smiley/kom/smailas2.png' alt='smiley'>"
Redagavo Gugiss· 2008 Bir. 26 22:06:48
Parašė Narysx· 2008 Bir. 26 22:06:24
#5
Gugys parašė:
nea.. daryk taip :D
"#\:smailas1\: #si" => "<img src='".IMAGES."smiley/kom/smaikas1.png' alt='smiley'>",
"#\:smailas2\: #si" => "<img src='".IMAGES."smiley/kom/smailas2.png' alt='smiley'>"
Taigi taip ir esu padaręs.
Parašė RuP3r· 2008 Bir. 26 22:06:26
#6
Tu čia pirmą kodą davei,kiek žinau xD
Parašė Narysx· 2008 Bir. 26 22:06:52
#7
RuP3r parašė:
"#\:smailas1: #si" => "<img src='".IMAGES."smiley/kom/smaikas1.png' alt='smiley'>",
"#\:smailas2: #si" => "<img src='".IMAGES."smiley/kom/smailas2.png' alt='smiley'>",
":smailas1:" => "kom/smailas1.png",
":smailas2:" => "kom/smailas2.png",
Daryk gal taip
Visvien tas pats.
Parašė Gugiss· 2008 Bir. 26 22:06:56
#8
raskit skirtuma bl... #\:smailas1: ir #\:smailas1\:
Redagavo Gugiss· 2008 Bir. 26 22:06:09
Parašė RuP3r· 2008 Bir. 26 22:06:50
#9
Gugys parašė:
raskit skirtuma bl... #\:smailas1: ir #\:smailas1\:
antras su \ :p
Parašė Gugiss· 2008 Bir. 26 22:06:23
#10
taui va narysxxx bandyk taip
"#\:smailas1\: #si" => "<img src='".IMAGES."smiley/kom/smaikas1.png' alt='smiley'>",
"#\:smailas2\: #si" => "<img src='".IMAGES."smiley/kom/smailas2.png' alt='smiley'>"
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
Parašė Samp_Tevas· 2008 Bir. 26 22:06:37
#12
"#\:smailas1: #si" => "<img src='".IMAGES."smiley/kom/smaikas1.png' alt='smiley'>",
"#\:smailas2:
#si(pakeisk raides i tokias kuriu neturi kiti smailai)" => "<img src='".IMAGES."smiley/kom/smailas2.png' alt='smiley'>"
https://webdnd.com/forum/viewthr...ad_id=4368
cia rasi atsakyma
Parašė Narysx· 2008 Bir. 26 22:06:42
#13
Nu tai padarau paskutinį smailą taip:
"#\:wizards\: #ah" => "<img src='".IMAGES."smiley/kom/wizards.png' alt='smiley'>"
Tada išvis nerodo smailų...
Parašė Creatium· 2008 Bir. 26 22:06:21
#14
"#\:wizards\: #ah" => "<img src='".IMAGES."smiley/kom/wizards.png' alt='smiley'>";
Parašė Narysx· 2008 Bir. 26 22:06:55
#15
Error:
Parse error: syntax error, unexpected ';', expecting ')' in /home/vardas/saitas.lt/maincore.php on line 391
Redagavo Narysx· 2008 Bir. 26 23:06:06
Parašė Narysx· 2008 Bir. 27 18:06:52
#16
Dw padėkit.
Parašė RuP3r· 2008 Bir. 27 18:06:35
#17
Stop Flood
Parašė Narysx· 2008 Bir. 27 19:06:43
#18
Nu koks čia floodas bl, jei po vienos dienos atnaujinu temą, parašydamas postą, kad ji atsirastų tarp aktyvių forumo pranešimų? :@
Parašė MAnjack· 2008 Bir. 27 20:06:50
#19
); uždėk gale tos eilutės.
Parašė Narysx· 2008 Bir. 27 20:06:25
#20
Nu tai tarkim paskutinę eilutę taip padarau:
"#\:raptors: #si" => "<img src='".IMAGES."smiley/kom/raptors.png' alt='smiley'>");
Ir error...
Kas padeda pilnai viską sutvarkyt sumoku 10lt sms.
Parašė Dandžu· 2008 Bir. 27 20:06:38
#21
"#\:raptors: #si" => "<img src='".IMAGES."smiley/kom/raptors.png' alt='smiley'>"
);
}
Redagavo Dandžu· 2008 Bir. 27 20:06:13
Parašė Narysx· 2008 Bir. 27 20:06:51
#22
Parse error: syntax error, unexpected ')' in /home/lklrsn/nbarsn.com/maincore.php on line 396
Redagavo Narysx· 2008 Bir. 27 20:06:19