LibertyFormats
Data format plugins
Page Contents
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
- Markdown
- Tiki Wiki format (default)
- HTML format
- PEAR Text_Wiki
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:- {toc} - creates a table of contents from a given structure.
- { maketoc} - creates a table of contents from the headings within a page.
- ((WikiWords)) - might be useful as well, since these wouldn't be recognised otherwise.
- {rss id=x} - RSS streams
- {cookie} - not entirely sure what this is used for, but it certaily wouldn't be accessible through css.
- {mm} - Freemind mindmap integration. (See link for more details)
- please edit and comment!
Standard functions
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_data - called automatically during object call to LibertyContent::store if the LibertyContent object has the format 'bbcode'
- bbcode_parse_data - called 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; this returns an errorMsg if there was a syntax error with the format, else returns null:
function bbcode_verify_data( &$pParamHash ) { $errorMsg = NULL; $pParamHash['content_store']['data'] = bbcode_check_syntax( $pParamHash['edit'] ); return( $errorMsg ); }
Related Items
Documentation » Technical Documentation
Documentation geared towards developers and people who want to learn about the core processes of bitweaver
HEAD ON! Support has been added for Pear::DB! • Oracle Reservations for Two • ReleaseTwo: Shedding that last bits of our roots, finding the core of our being • getContentList • How to add a pagination to an object list • Moving bw in another directory • pma and mysql • safe mode on / open_base_dir • sequence and auto • The package I am currently developping is suddenly desactivated • APIDocumentation • Archived Picture Upload with Fisheye under Windows • Bitweaver and Browser Cookies • bitweaverCVS • bitweaverFeatures • bitweaverPerformance • CodingGuidelines • CreatingServices • CssSchema • InstallbitweaverDoc • IntegrationTutorial • LibertyFormats • LibertyMime • LibertyServices • phpdoc content status • PortingTikiWikiPackages • PrototypeAjaxObject • PrototypeReference • SamplePackage • SearchPackageDevNotes • TUTORIAL - Displaying Icons ONLY to AUTHORS of the page • Tutorial - Liberty Plugins • Tutorial - Liberty Plugins II • UsersDoc
Comments