/** * transform a given text with the preferred html-helper. * * @param unknown_type $text * @return unknown */ function makehtml($text) { global $settings; //include a markup-helper and make use of it switch ($settings['markuphelp']) { case "1": include_once $GLOBALS['path'] . '/loudblog/inc/markuphelp/textile.php'; $textile = new Textile(); $temphtml = $textile->TextileThis($text); break; case "2": include_once $GLOBALS['path'] . '/loudblog/inc/markuphelp/markdown.php'; $temphtml = change_entities(Markdown($text)); break; case "3": include_once $GLOBALS['path'] . '/loudblog/inc/markuphelp/stringparser_bbcode.class.php'; include_once $GLOBALS['path'] . '/loudblog/inc/markuphelp/bbcode.php'; $temphtml = $bbcode->parse($text); break; case "0": $temphtml = "<p>" . change_entities($text) . "</p>"; break; } return $temphtml; }
function inputspam() { //returns the input field for the spam answer global $settings; if (isset($_POST['commentspam'])) { $value = strip_tags(trim(change_entities(stripslashes($_POST['commentspam'])))); } else { $value = ""; } return "<input type=\"text\" name=\"commentspam\" id=\"commentspam\" value=\"" . $value . "\" />"; }
function inputname() { //returns the input field for commentor's name if (isset($_POST['commentname'])) { $value = trim(change_entities(stripslashes($_POST['commentname']))); } else { $value = ""; } return "<input type=\"text\" name=\"commentname\" id=\"commentname\" value=\"" . $value . "\" />"; }