tags, and leaves your textarea as-is so you can edit, etc. This also prevents <, etc., being transformed into "<" in the textarea. ;o) (or © corz.org 2004-> */ // saves typing.. $corz_root = $_SERVER['DOCUMENT_ROOT']; // do your own thing here.. @include ($corz_root.'/inc/init.php'); //@include ($corz_root.'/inc/doc-type.php'); // include the bbcode parser, very important. require ($corz_root.'/blog/inc/cbparser.php'); if (isset($_POST['cvrt-text'])) { $text = ($_POST['cvrt-text']); } else { $text = ''; } if (get_magic_quotes_gpc()) { $text = stripslashes($text); } // you posted some text.. if (isset($_POST['preview'])) { // this is the main line. // this line is all you need for basic convertion jobs. $converted = bb2html($text); // we can do some error checking, too.. if ($converted == '') $converted = "tags don't balance!\n\nin other words, you have opened a tag, but not closed it, or something..\ngo back and try again!"; } else { $converted = ''; } if (stristr(@$_SERVER['HTTP_ACCEPT'],'application/xhtml+xml')) { $doc_content = 'application/xhtml+xml'; } else { $doc_content = 'text/html'; } echo ' convert text to html (xhtml 1.0 strict) tags with the php text converter tool. (accepts bbcode)
Disneyland 1972 Love the old s
'; @include ($corz_root.'/inc/header.php'); echo '

bbcode capable text to html converter..

Convert text to html with this tool. Put plain text in, get xhtml tags back..  (hint: you can use bbcode)
hit "preview" to get back your html tags.
 
'; // rough tidy-up..
	$in = array("
", "\n\n"); $out = array("
\n", "\n"); echo htmlentities(str_replace($in, $out, $converted)), '
'; do_bb_form($text,'', '', false, '', false, '', '', 'cvrt', true, false); echo '
'; @include ($corz_root.'/inc/footerx.php'); echo '
'; ?>