Revision [2533]
This is an old revision of IncludeRemote made by DarTar on 2004-11-27 14:06:19.
Including Remote Wikka Content
An interesting solution for making freshly-updated HelpInfo wikka documentation available to end users, without distributing the whole documentation package, might be to create a {{help page="PageName"}} plugin allowing to retrieve content from the main wikka server, using something like the raw method.
Here's how it might function:
- the user of a wikka distribution opens a local WikkaDocumentation page containing {{help page="HelpInfo"}};
- the plugin connects to the main wikka server,
- it retrieves a raw version of HelpInfo with no header and footer (i.e. the mere page content in wikka syntax),
- it parses the retrieved page for internal links and translates them into local links for retrieving remote content (links pointing to remote URLs need not be translated),
Can you provide an example of this? This is the item that I think will be hardest to implement. -- JsnX
The link might be translated as a local link to the same page with a GET parameter read by the plugin, for instance if the remote page contains: [[ACLInfo Access Control documentation]] this will be rendered locally as: <a href="WikkaDocumentation?page=ACLInfo">Access Control Documentation</a>. Alternatively, we might restrict local navigation of remote pages to one node and render links to other remote pages as masked interwikilinks: [[Wikka:ACLInfo Access Control Documentation]] -- DarTar
- and finally, it prints locally the documentation contents.
- if a connection is not available, a splash page with a static link to http://wikka.jsnx.com/HelpInfo and a short text is printed;
A similar plugin might be used also for bug notifications and other kinds of "centralized" content.
Notes:
- no MySQL connection to the central database is needed, provided that a method exists for retrieving pure page content with the header and footer stripped;
- when displaying locally a remote page, a box (like a grey float at the top of each fetched page) should alert the user that he is actually retrieving remote content. Otherwise the risk is to be "trapped" on the main wikka server without realizing it!
- when local and remote pages with the same name exist, the user should be given the choice which of the two pages he wants to display. This can be easily implemented with a check for tag existence on the local server and then by appending to <a href="WikkaDocumentation?page=ACLInfo">Access Control Documentation</a> something like [[ACLInfo (*)]]
-- DarTar
CategoryDevelopment