History of LibertyFormats
Version 10 | Current version | |
---|---|---|
LibertyPackage allows developers to specify various formats for data. A plugin can be defined to allow and process data in a certain format. The formats can be enabled by an administrator on the Liberty>Plugins page. Available formats:
Common tags: since some tags do more than just make it easy to edit text, we want to allow the usage of specific tags in any plugin. these include: please edit and comment!
Plugins have three standard functions the LibertyEngine attempts to call at various times. You must name these functions using your format_guid as a prefix, followed by three possible endings. For example, if your format is 'bbcode', then your functions declared in liberty/plugins/format.bbcode.php must look like: bbcode_save_datacalled automatically during object call to LibertyContent::store if the LibertyContent object has the format 'bbcode'bbcode_parse_datacalled automatically during object call to LibertyContent::load if the LibertyContent object has the format 'bbcode'bbcode_verify_data( &$pParamHash )The function called automatically during object call to LibertyContent::store method to verify proper syntax if the LibertyContent object has the format 'bbcode'.It needs to copy the edit field to the 'content_store''data' hash for proper storage. For example: {CODE(in=>php)} function bbcode_verify_data( &$pParamHash ) { $errorMsg = NULL; $pParamHashcontent_store>'content_store'data>'data' = bbcode_check_syntax( $pParamHashedit>'edit' ); return( $errorMsg ); } {CODE} returns an errorMsg if there was a syntax error with the format, else returns null. | LibertyPackage allows developers to specify various formats for data. A plugin can be defined to allow and process data in a certain format. The formats can be enabled by an administrator on the Liberty > Plugins page. Available formats
Common tagsSince some tags do more than just make it easy to edit text, we want to allow the usage of specific tags in any plugin. These include:
Standard functionsPlugins have three standard functions the LibertyEngine attempts to call at various times. You must name these functions using your format_guid as a prefix, followed by three possible endings. For example, if your format is 'bbcode', then your functions declared in liberty/plugins/format.bbcode.php must look like:
It needs to copy the edit field to the 'content_store''data' hash for proper storage. For example; this returns an errorMsg if there was a syntax error with the format, else returns null:
|