Re: UBB Code correct use
| From: | Richard Lynch | Date: | Tue, 11 Jan 2005 19:35:59 +0000 |
| Subject: | Re: UBB Code correct use | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-206103@lists.php.net to get a copy of this message | ||
Bruno B B Magalhães wrote:
> Hi people,
>
> I have a small class that encodes and decodes ubb code, no problem with
> this.. But..
> Did you get what my question is? :)
> What is the correct order... I mean, because I am having problems when
> editing an article all the BRs are being duplicated, and other problems
> that have to do with the order.
*ONLY* call your routines to change [b] to <b> and new-line to <BR> in
"Display"
Database ---> UBB Decode ---> Display
* Of course, if you have a "Preview" in your UBB, then that's also a
"Display"
But you'll go *NUTS* if you try to convert back and forth as often as you
are now.
Minimize the number of times you need to use your decoder.
In fact, you should *NEVER* need to go from <B> to [b] unless you import
content from some outside source to 'seed' your forum.
--
Like Music?
http://l-i-e.com/artists.htm