Page 1 of 1

Calculating bbcode_bitfield

Posted: Mon Jan 10, 2011 9:26 pm
by GibsonLP
Hi,
I am trying to help a friend migrate from a proprietary forum to phpBB3, everything looks okay except we don't know how to calculate bbcode_bitfield, how can we calculate the bitfield?

Thanks.

Re: Calculating bbcode_bitfield

Posted: Mon Jan 10, 2011 9:34 pm
by Erik Frèrejean
Some information on it can be found here: How to: template_bitfield and BBcodes. Its basically an bitfield constructed out of the BBCode IDs used in the post.

Re: Calculating bbcode_bitfield

Posted: Mon Jan 10, 2011 11:20 pm
by D¡cky
The convertors to phpBB3 pass the posts and signatures through the message parser. This is where the bbcode_uid and bbcode_bitfield are calculated. Have a look in includes/message_parser.php.

Re: Calculating bbcode_bitfield

Posted: Tue Jan 11, 2011 4:19 am
by GibsonLP
Thanks guys.

Re: Calculating bbcode_bitfield

Posted: Tue Jan 11, 2011 4:43 am
by GibsonLP
If I understood it right - the bitfield is simply a uuencoded representation of a list of included bbcode tags?
What about custom bbcode tags? are they not being calculated as well?

In any case - the forum from which my friend is moving doesn't support anything other than quote, would it be safe to say that the converter can simply use gA== in the bitfield whenever a quote is used...?

Thanks again.

Re: Calculating bbcode_bitfield

Posted: Tue Jan 11, 2011 5:03 am
by D¡cky
GibsonLP wrote:gA== in the bitfield whenever a quote is used
I haven't tested, but taking a quick look, it looks like you are correct. The worst that can happen if it is wrong, is the post won't render properly.