Introduction   Getting Started   Upgrading   Function Reference   Changelog   Support and Feedback

html2bbcode

Usage: string html2bbcode(string html)
Purpose: Converts HTML to BBCode using IPB's native parser
Availability: IPB SDK 1.0

Note: Due to the sheer impracticality of it, and the fact that posts are stored in the forum tables in bbcode format for custom bbcodes, this function will not convert custom BBcodes. bbcode2html(), however, will.

Uses IPB's native BBCode Parser to convert html into BBCode.

// Puts [url=http://ipbsdk.sourceforge.net]ipb sdk[/url] into $bbcode
$bbcode = $SDK->html2bbcode("<a href='http://ipbsdk.sourceforge.net/' target='_blank'>ipb sdk</a>");
See Also: bbcode2html


User Contributed Notes

cow
Alot of the SDK's functions return things already parsed into HTML i.e posts, signatures etc. If you wish to display a form to edit them, this function can be used to retrieve the original BBCode version of it. You should not need to run bbcode2html before posting input to most functions.

Documentation Generated at Sat, 16 Apr 2005 07:36:35 -0700
Find the latest version at http://ipbsdk.sourceforge.net