Jump to content

Require help with BBCode Code boxes


Jayenkai

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]
Link to comment
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)
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.