I'm having trouble.. I'm trying to parse bbcode phpbb gives me from post entries , but it is giving me odd bbcodes like this: [b:53cb5]I. Master Fisherman[/b:53cb5] [b:53cb5][url=http://www.digg.com/gaming_news/World_of_Warcraft_Burning_Crusade_Outlanders_Guide_to_Master_Fishing:53cb5]digg it![/url:53cb5][/b:53cb5] Code (markup): it is giving me a colon and a random alphanumeric string as the $uid for it... how can i just ignore this and parse the bbcode like that normally. you can see it @ www.gnomeproblem.com
I'm still having trouble because the odd :uid thing that phpbb gives me.. because of this i can't use the class yet how can i get rid of the stupid uid?
Your best bet would be solving why the phpbb code isn't working correctly. Failing that you should be able to remove the garbage using a regular expression $cleaned_bbcode_string = preg_replace("/\[b:[0-9a-z]{5}\]/", "[b]", $weird_bbcode_string); PHP: You would need something similar for the closing tag and all the other tags.
thanks, now my question is this: how can i comebine these two functions into one: $post_info[] = preg_replace("/\[b:[0-9a-z]{5}\]/", "[b]", $row); Code (markup): $post_info[] = preg_replace("/\[\/b:[0-9a-z]{5}\]/", "[/b]", $row); Code (markup): edit: uhm they're not displaying correctly i think vb's function is bugged... check out what i have here: http://www.madebyai.com/clipboard/get/4285d05b6a11f49f14fa8ffb46ce3e692b7f08c9454554e2.txt Code (markup):
i fixed that.. now another question. how can i modify that code to work with a [ url ] bbcode? [url=http://img186.imageshack.us/my.php?image=teleportercp8.gif:ea8a0][img]http://img186.imageshack.us/img186/2955/teleportercp8.th.gif[/img][/url:ea8a0] Code (markup):