Re: Help with a UBB Code style parser...
| From: | Manuel Lemos | Date: | Wed, 11 Jun 2003 11:59:20 +0000 |
| Subject: | Re: Help with a UBB Code style parser... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151053@lists.php.net to get a copy of this message | ||
Hello,
On 06/11/2003 08:49 AM, Bix wrote:
Hi all... I already have a bbcode style parser for my content ie: $output = str_replace("[b]",'<b>',$output); $output = str_replace("[/b]",'</b>',$output); $output = str_replace("[i]",'<i>',$output); $output = str_replace("[/i]",'</i>',$output); $output = str_replace("[img]",'<img src=\"',$output); $output = str_replace("[/img]",'\">',$output); etc... But I need to make a link parser ie: [url=http://xxx.xxx/blah]Link Title[/url] to produce a link of <a href="http://xxx.xxx/blah" target="_new">Link Title</a>You may want to try this class: Class: UBBCode http://www.phpclasses.org/ubb -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/