Przeszukiwałem to forum oraz inne i mam problem z bbcode w newsach.. wszedzie jest prawie identyczny kod, ale nie wiem jak go uzyc!
Tu mam kod, zapożyczony od jednego z userów:
<?php
function bbcodetohtml($text) {
$text = str_replace("","<center>", $text);
- "
,"</center>", $text);
$text = str_replace("[aragorn]","<img src=images/emot/arag.gif title=Aragorn>", $text); $text = str_replace("[boromir]","<img src=images/emot/boro.gif title=Boromir>", $text); $text = str_replace("[gandalf]","<img src=images/emot/gand.gif title=Gandalf>", $text); $text = str_replace("[gimli]","<img src=images/emot/gim.gif title=Gimli>", $text); $text = str_replace("[legolas]","<img src=images/emot/lego.gif title=Legolas>", $text); $text = str_replace("[saruman]","<img src=images/emot/saru.gif title=Saruman>", $text);
return $text;
}
?>
zdaje mi sie to banalne, ale naprawdę nie wiem jak zrobic zeby działał ten kod
wpisuje np:
echo '[ b] dasdsadsa [ /b]'; (oczywiscie bez spacji) i wychodzi mi na stronie [ b] dasdsadsa [ /b]
jak mam to uzyc..

?
z góry dzięki za pomoc