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] Link to comment https://forums.phpfreaks.com/topic/36420-quote-bbcode-corrupting-tables/ 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? Link to comment https://forums.phpfreaks.com/topic/36420-quote-bbcode-corrupting-tables/#findComment-173687 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. Link to comment https://forums.phpfreaks.com/topic/36420-quote-bbcode-corrupting-tables/#findComment-173924 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. Link to comment https://forums.phpfreaks.com/topic/36420-quote-bbcode-corrupting-tables/#findComment-173943 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. Link to comment https://forums.phpfreaks.com/topic/36420-quote-bbcode-corrupting-tables/#findComment-173949 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.