Forum OpenACS Development: Re: XoWiki

Collapse
15: Re: XoWiki (response to 1)
Posted by Gustaf Neumann on
Hi everybody! On the usual place is now a new an slightly improved verison of XoWiki.

The biggest change is a the integration of XoWiki with a file-selector which can be used to select images from the file store or to make internal links to files of certain types in the file store. The file-selector was originally developed by Günther Ernst from the Learn@WU-project. I have invested a few days to remove our local dependencies, to make it more configurable, flexible, and easier to integrate.

The file-selector is now configured from the richttext form specification (see below for an example), where one can specify the folder_id, or the file-store, or some pattern for file types.

In oder to use xinha in a richtext field, one has to use editor xinha in the options of the richtext form field specification. The following options for xinha may be specified:

  • editor: xinha
  • height: height of the xinha widget (e.g. 350px)
  • width: width of the xinha widget (e.g. 500px)
  • plugins: tcl list of plugins to be used in xinha. The new plugin for the oacs file selector is called OacsFs. If no options are specified, the following plugins will be loaded:

    GetHtml CharacterMap ContextMenu FullScreen
    ListType TableOperations EditTag LangMarks Abbreviation
The following options are used by the OacsFs plugin
  • folder_id: the folder from which files should be taken for the file selector. Can be used alterantive with fs_package_id, whatever more handy in the application.

  • fs_package_id: the package id of the file_storage package from which files should be taken for the file selector. Can be used alterantive with folder_id, whatever more handy in the application. If nothing is specified, the globally mounted file-store is used.

  • file_types: SQL match pattern for selecting certain types of files (e.g. pdf files). The match pattern is applied on the MIME type of the field. E.g. a value of %text/% allows any kind of text files to be selected, while %pdf% could be used for pdf-files. If nothing is specified, all file-types are presented.

Here is an example for the use of the xinha widget with some options:

   text:richtext(richtext),nospell,optional
	  {label Inhalt}
	  {options {editor xinha plugins OacsFs height 350px file_types %pdf%}}
	  {html {rows 15 cols 50 style {width: 100%}}}
The changes for richtext and blank-master, as well an updated version of xinha, and the OACS file-selector widget are commited to the oacs-5-2 branch.

Caveat: the three adp-files needed for the OpenACS file selector (insert-image, insert-ilink and file-selector) are currently part of the xowiki package, since acs-templating is per default not mounted. Does anyone has some suggestions, where these files should go?

The picture gallery in http://media.wu-wien.ac.at/download/xowiki-doc/index.html contains now a screen shot of the file-selector. In addition, i have added a screen shot with a wiki-page with a complex form on it (this would be some challenge in a classical wiki) and the documentation of XoWiki as a wiki page.

i hope, somebody finds this useful.