'pearwiki_save_data', 'load_function' => 'pearwiki_parse_data', 'verify_function' => 'pearwiki_verify_data', 'auto_activate' => $auto_activate, 'description' => 'Pear Wiki Syntax Format Parser. Requires Text_Wiki Pear extension. If you are running linux you can try running: su -c \'pear install Text_Wiki\'. More info here', 'edit_label' => 'Pear Text_Wiki Syntax', 'edit_field' => ' 'PearWikiSyntax', 'plugin_type' => FORMAT_PLUGIN ); $gLibertySystem->registerPlugin( PLUGIN_GUID_PEARWIKI, $pluginParams ); function pearwiki_save_data( &$pParamHash ) { static $parser; require_once 'Text/Wiki.php'; if( empty( $parser ) ) { $parser =& new Text_Wiki(); } } function pearwiki_verify_data( &$pParamHash ) { $errorMsg = NULL; $pParamHash['content_store']['data'] = $pParamHash['edit']; return( $errorMsg ); } function pearwiki_parse_data( &$pData, &$pCommonObject ) { static $parser; require_once 'Text/Wiki.php'; if( empty( $parser ) ) { $parser =& new Text_Wiki(); } $xhtml = $parser->transform($pData, 'Xhtml'); global $gLibertySystem; // create a table of contents for this page // this function is called manually, since it processes the HTML code if( preg_match( "/\{maketoc.*?\}/i", $xhtml ) && @$gLibertySystem->mPlugins['datamaketoc']['is_active'] == 'y' ) { $xhtml= data_maketoc($xhtml); } return $xhtml; } ?>