Witam, używam takiego skryptu bbcode :
<?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;
}
function htmltobbcode($text) {
$text = str_replace("<img src=images/emot/arag.gif title=Aragorn>","[aragorn]", $text); $text = str_replace("<img src=images/emot/boro.gif title=Boromir>","[boromir]", $text); $text = str_replace("<img src=images/emot/gand.gif title=Gandalf>","[gandalf]", $text); $text = str_replace("<img src=images/emot/gim.gif title=Gimli>","[gimli]", $text); $text = str_replace("<img src=images/emot/lego.gif title=Legolas>","[legolas]", $text); $text = str_replace("<img src=images/emot/saru.gif title=Saruman>","[saruman]", $text); $text = str_replace("[golum]","<img src=images/emot/golum.gif title=Golum>", $text);
return $text;
}
?>
Czy mógłby mi powiedzieć ktoś jak w tej funkcji użyć wstawiania obrazków?
Od razu uprzedzę, że nie chce korzystać z generatora bbcode dostępnego w internecie...