fix3r Posted January 31, 2007 Share Posted January 31, 2007 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] Quote Link to comment Share on other sites More sharing options...
effigy Posted January 31, 2007 Share Posted January 31, 2007 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 Link to comment Share on other sites More sharing options...
fix3r Posted January 31, 2007 Author Share Posted January 31, 2007 [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. Quote Link to comment Share on other sites More sharing options...
fix3r Posted January 31, 2007 Author Share Posted January 31, 2007 [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. Quote Link to comment Share on other sites More sharing options...
effigy Posted January 31, 2007 Share Posted January 31, 2007 I suggest looking at how the bbcode is handled in these and/or other forums that are open source. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.