Wefis Cmdline Options
How to hook wefis into your website...
Wefis accepts certain options which could allow you to integrate it into your website... The following document attempts to demonstrate the various possibilities...
Introduction to this text
In the following text we discuss the various options to pass to wefis. To be precise, these are the options to be passed to index.cgi. You should normally not need to access any of the other files, and doing so incorrectly may result in a security issue. When passing an option, you should append it to the filename. Thus setting the opeion option1 would require you linking to the file index.cgi?option1=[value]. Any extra options set after that are appended via an '&' sign, such as in the following example: index.cgi?option1=[value]&option2=[value]&option3=[value]. In a website setting, you should generally give the full path to index.cgi, such as: http://www.website.com/wefis/index.cgi?option=value&option2=value.
Security. You are surely thinking that placing a link to wefis on your website (such as 'edit the text here' type links) are a security hazard. In reality, all links are passed through the prasi authentication system, and so all users are authenticated before being allowed to continue with the desired action. If they are not logged in, or do not have access to a particular ressource, they are duly informed of the fact.
You may also like to use prasi throughout your website, so that the user ever only has to enter his/her password once. This is documented in the prasi API.
Starting wefis from a particular location [path]
If you wish to start wefis from a certain directory, you need to set the path option to be the absolute path to the desired folder. This will start wefis showing the selected directory. Please ensure that the user has access to this directory, or he will be unable to view it, and that it actually exists. Example: index.cgi?path=/root/usr/home/web/.
Starting wefis in edit mode [edit]
If you wish to start wefis in edit mode, all you need to do is set the edit option to be the absolute path of the file you want to edit. This will start wefis showing the edit window. Upon cancel or save, the user will be redirected towards his/her root folder, unless used in conjunction with the path option.
Placing a link back to your page [url]
You may like to place a link back to your page in the left menu, so that the user can easily return to the previous page. The required option is url. This can be a normal link, or can be javascript (in which case prepend it with javascript:). It is placed directly insde the A HREF tag, so please avoid characters such as ", unless escaped...
Starting wefis in fullscreen edit mode [fullscr_edit]
If you wish to start wefis in fullscreen edit mode, all you need to do is set the fullscr_edit option to be the absolute path of the file you want to edit. This is similar to the fullscreen edit option used from within wefis. Please note: this will not run external plugins which may deal with that particular file, and is thus a text-only editor. When the file is saved, the window will close, so the link to it should open a new window...
If you find bugs, or would like to donate to this project, please go to our project page: Project Page.
We would like to thank sourceforge.net for their support:
Close