Jump to content

quote bbcode corrupting tables


fix3r

Recommended Posts

I have my quote bbcode that I use on my custom forums that I did, but for some reason, when ever I use it, it somehow seem's to corrupt my tables (posts) to look like crap. Could anyone point me in the right direction of what I am doing wrong?

[code]
function parse($i) {
$i = preg_replace("/\[quote=\"([a-zA-Z :\_\/\.\-]+)\"\]/","<br /><table width=\"100%\" cellspacing=\"0\" cellpadding=\"5\" style=\"border: 1px solid #000000; background: #262626;\"><tr><td><span style=\"font-size: 12px;\">Originally Posted By <b>$1</b><br /><i>",$i);
$i = preg_replace("/\[\/quote\]/","</i></span></td></tr></table>",$i);

return $i;
}
[/code]
Link to comment
Share on other sites

[quote author=effigy link=topic=124799.msg518037#msg518037 date=1170257335]
I'm not sure I follow, but it sounds like your regex is working fine. Have you tried giving the span a class and using CSS, instead of using the whole table contraption?
[/quote]

Okay, what happen's is, when I use the quote bbcode. For every post it has <table>...</table> What happens is it cuts off my table and then starts it back up again and pretty much corrupts my html.
Link to comment
Share on other sites

[b]With Quotes:[/b]
[img]http://img267.imageshack.us/img267/6448/withquotesrl7.png[/img]

[b]Without Quotes: [/b]
[img]http://img201.imageshack.us/img201/6801/withoutquotesvi0.png[/img]


Ugh, now my whole bbcode is getting messed up. If anyone has any bbcode for colors, ect, that they would like to share that replaces the WHOLE code, not just if you type in [color="red"] it will replace it and then if you don't do the other thing right it won't replace that.
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.