4.30.1Class Wiki

Service Managing WIKI based contents.

Class Wiki( instance ) from \
                 Service(( instance))

Plugin management.

This Wiki service resolves plugin requests in wiki texts by generating a Nest.emit message named "wiki_plugin_", where name is the name of the required plugin.

As plugin defitions are application (wiki) globals, the instance of the wiki and its configuration are irrilevant. The wiki plugin handler just need to generate a string reply that is inserted in its place in the final rendered page.

The function is invoked as


   function wiki_plugin_<name>( parms, node, standout, page )

where params, node and standout are the Falcon wiki renderer parameters:

The Nest system defines the following plugins, which are registered as the wiki service is loaded:

Javascript management

This service adds a javascript function in the Nest.headings called function nest_wiki_insertText( text, mode ), where text is the text to be inserted, and mode can be 'image', 'file' or null. Calling this function results in the desired text (possibly a link to an internal file or image) to be inserted at the current cursor position in the text area having the CSS id nest_wiki_area.

The function can be called back by the Uploader service.

Note: Nest.headings must be properly called for this to work.

Methods
getBlankReturns a blank page that can be used to fill the update parameters.
getPageReturns the full record of the given page.
initializeInitializes the wiki system, creating the entity through the data manager.
linkDeleteReturns the link that requests to delete the current page.
linkGoToPageReturns the link that needed to follow a page.
linkModyReturns the link that requests to modify the current page.
pluginLoads a plugin and returns its result.
removePageRemoves a page.
setEntitiesCreates the entities in a data manager.
updatePageUpdates (or creates) a page with new contents.

Methods

getBlank

Returns a blank page that can be used to fill the update parameters.

getBlank()
ReturnA blank page record.

getPage

Returns the full record of the given page.

getPage( page_name )
page_name The id of the page to be retreived.
ReturnThe page data on success, nil on failure.

initialize

Initializes the wiki system, creating the entity through the data manager.

initialize( ename )
ename The name of the entity to be created.

linkDelete

Returns the link that requests to delete the current page.

linkDelete( [wid],[page] )
wid The ID of the wiki page to be handled, or nil for current page.
page If given, ask to handle the request to the given page ID.
ReturnThe href to follow to delete the current wiki page.

linkGoToPage

Returns the link that needed to follow a page.

linkGoToPage( wid, [page] )
page If given, ask to handle the request to the given page ID.
ReturnThe href to follow to modify the current wiki page.

linkMody

Returns the link that requests to modify the current page.

linkMody( [wid],[page] )
wid The ID of the wiki page to be handled, or nil for current page.
page If given, ask to handle the request to the given page ID.
ReturnThe href to follow to modify the current wiki page.

plugin

Loads a plugin and returns its result.

plugin( page_name, pname, params, node, sout, page )
page_name The page to be removed.
Returntrue on success, false if the page cannot be created.

removePage

Removes a page.

removePage( page_name )
page_name The page to be removed.
Returntrue on success, false if the page cannot be created.

setEntities

Creates the entities in a data manager.

setEntities( dm, ename )
dm The datamanager under which the WIKI entities are to be published.
ename The name of the entity.

updatePage

Updates (or creates) a page with new contents.

updatePage( pageEntry )
pageEntry The page entry to be sent to the db.
Returntrue on success, false if the page cannot be created.
Raise
NestError in case of wiki generation or database error.

if the pageEntry.comp_cnt value is not valorized, compiles automatically the wiki content.

On success sends an "fmwiki_pupd" message.

Made with http://www.falconpl.org