views:

164

answers:

1

Edit: This is an IPB (Invision Power Board) forum, not PHPBB as originally posted. My humble apologies.

I'm trying to write a widget that displays a sampling of popular topics in our forum. However, parsing bbcode tags is a bit of a pain. We're using the PEAR BBCodeParser, so handling bbcode tags isn't a problem. But the real issue is that IPB seems to partially encode messages from bbcode to html before storing them in the database. I say partially because certain bbcode tags are converted, others are not.

For example, consider this raw bbcode:

OMG I am [b]so[/b] embarrassed :sweat:

Gets encoded into the database (spefically, the bbprefix_posts table) as

OMG I am [b]so[/b] embarassed <img src="http://mysite.com/frown.gif" class="bbc_emoticon">

So my question is, is there any place in our ipb database where this string is totally unencoded? I figure it must be somewhere, because when you reply to a topic, it populates your textarea box with raw bbcode, including smilies, without any conversion to html.

A: 

Looking at the phpBB help topic on this here, it seems that it doesn't store it totally unencoded, and actually reparses it every time that it either needs to display it, or pull it out of the database for the user. You may want to take a look at the function generate_text_for_display, though the documentation is quite sparse on how this works.

Sean
See my edits. Thanks for taking the time to answer, but I got the name of the product wrong: it's IPB, not PHPBB. Unfortunately I'm coming at this from the database side, rather than looking at the source code so it wasn't immediately obvious which board I was dealing with. Saw bbcode tags and assumed phpbb. My apologies for wasting your time.
NobodyMan