开发者

Does Invision Power Board v3.0.3 store un-encoded versions of message posts?

开发者 https://www.devze.com 2022-12-11 00:44 出处:网络
Edit: This is an IPB (Invision Power Board) forum, not PHPBB as originally posted.My humble apologies.

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开发者_StackOverflow 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号