From 0f185543bb9851fddc137f81a1e2a1d21589bc83 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Wed, 5 Oct 2011 14:36:01 +0200 Subject: Backend, frontend and 404 handlers partially implemented. * Backend layout done. * Frontend theoretically done (untested). * 404 handler done * Added textprocessors.php --- ratatoeskr/sys/textprocessors.php | 78 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 ratatoeskr/sys/textprocessors.php (limited to 'ratatoeskr/sys/textprocessors.php') diff --git a/ratatoeskr/sys/textprocessors.php b/ratatoeskr/sys/textprocessors.php new file mode 100644 index 0000000..3e67b01 --- /dev/null +++ b/ratatoeskr/sys/textprocessors.php @@ -0,0 +1,78 @@ + object. The used textprocessor is determined by the $texttype property. + * + * Parameters: + * $translationobj - The object. + * + * Returns: + * HTML + */ +function textprocessor_apply_translation($translationobj) +{ + return textprocessor_apply($translationobj->text, $translationobj->texttype); +} + +if(!isset($textprocessors)) +{ + $textprocessors = array( + "Markdown" => array("Markdown", True), + "Plain Text" => array(function($text) { return str_replace(array("\r\n", "\n"), array("
", "
"), htmlesc($text)); }, True), + "HTML" => array(function($text) { return $text; }, True) + ); +} + +?> -- cgit v1.2.3-70-g09d2