Jump to content

Archived

This topic is now archived and is closed to further replies.

Jayenkai

Require help with BBCode Code boxes

Recommended Posts

[code]Note : I tried to search, but you try searching for "BBCode Code"..  It really doesn't work!! ;)

I pretty much managed to get the rest of my BBCode working, but when a user posts some code into a code box, the BBCode messes up the code box.
I managed, via the preg_match('{code}',),  split, etc, routine to deal with all the code boxes last, and remove <br>'s and things like that, but what I can't figure out, is how to NOT deal with the code boxes, when doing everything else.

If anyone has a quicky illustration as to how to start with $txt, split out the code, deal with the Not code area, then shove it all back together, in the right order*, then I'd love the help. 

Thanks..

* I had to specify that, since when I tried one method, it ended up dumping all the code boxes at the bottom of the posts![/code]

Share this post


Link to post
Share on other sites
[quote author=Jayenkai link=topic=108279.msg435435#msg435435 date=1158403644]
Note : I tried to search, but you try searching for "BBCode Code"..  It really doesn't work!! ;)

I pretty much managed to get the rest of my BBCode working, but when a user posts some code into a code box, the BBCode messes up the code box.
I managed, via the preg_match('[code]',),  split, etc, routine to deal with all the code boxes last, and remove <br>'s and things like that, but what I can't figure out, is how to NOT deal with the code boxes, when doing everything else.

If anyone has a quicky illustration as to how to start with $txt, split out the code, deal with the Not code area, then shove it all back together, in the right order*, then I'd love the help. 

Thanks..

* I had to specify that, since when I tried one method, it ended up dumping all the code boxes at the bottom of the posts![/code]
[/quote]

If this is your code, I am sure it doesn't work!

Ronald  8)

Share this post


Link to post
Share on other sites
oopsy, messed up sticking an actual {code}  in my post!  Aw well..  I'll edit it in a jiffy.

Thanks for your comment, it helped immensly.
I'll go and do that, now.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.