TIP UrlEventHandlerPlugin is not installed on Foswiki.org.

%TOPIC%

Lets you react on url parameters and e.g. show a message for the user or redirect him somewhere, show a dialog etc.

Introduction

!!!IMPORTANT!!!!: Please secure the Codes topics, because they can be used for X-Site-Attacks! ALLOWTOPICCHANGE is set to AdminGroup by default. After you added your codes you should also remove the "w" flag on the filesystem to be 100% secure in this point
UrlEventHandlerPlugin enables you to run specific actions on URL specific parameters. This is primary used for triggering confirm, error or simple message dialogs or javascript alerts. An example would be, that you get redirected to an topic after an upload and suddenly an alert opens, and tells you 'File successfully attached to the topic'. You press the OK-Button and keep on working. You also can show complex dialogs or messages in dialogs.
Example for the confirmation message after an attachment has been uploaded to a topic:
/bin/view/Main/WebHome?ueh_type=alert&ueh_confirmcode=attachok

Usage

!!!IMPORTANT!!!!: Please secure the Codes topics, because they can be used for X-Site-Attacks! They are ALLOWTOPICCHANGE is set to AdminGroup by default. After you added your codes you should also remove the "w" flag on the filesystem to be 100% secure in this point

Topics to define the codes

Generally every STARTSECTION{codename} defines on message / url for the specific class

URL parameters

URL parameter allowed values meaning
ueh_type alert,mdialog,autodialog * alert: a javascript alert message will be shown
* mdialog: a jquery.dialog will be shown, including the message
* autodialog: a jquery.dialog will be auto opened, fetching a url
ueh_confirmcode strings defined in the UrlEventHandlerPluginConfirmCodes topic this will be the content of the alert/mdialog which will shown
ueh_errorcode strings defined in the UrlEventHandlerPluginErrorCodes topic this will be the content of the alert/mdialog which will shown
ueh_messagecode strings defined in the UrlEventHandlerPluginMessageCodes topic this will be the content of the alert/mdialog which will shown
ueh_dialogcode only considered for the autodialog option. This defines the code for the section, which defines the URL to fetch for the dialog.


Example for the confirmation message after an attachment has been uploaded to a topic:
/bin/view/Main/WebHome?ueh_type=alert&ueh_confirmcode=attachok


Or for auto-openening a dialog for attachments
/bin/view/Main/WebHome?ueh_type=autodialog&ueh_dialogcode=attach

Installation instructions

  • Just use the installer attached to the topic or even easier, use the configure-system/Extension to easy install it through an user-interface
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the Plugin on the server where Foswiki is running.

TODO

  • implement the message in the dialog ( type=mdialog )
  • let alerts / mdialogs also work, if no JS is activated. In that case, a layer should be added to the body ( in the upper liek FLASHNOTE )
Plugin Author: Foswiki:Main.EugenMayer
Copyright: © Collaborganize ( www.collaborganize.com )
License: GPL (GNU General Public License)
Plugin Version: 26 Jan 2009 (V0.1)
Change History:
26 Jan 2009: initial release
Foswiki Dependency: JQueryCompatibiltyPlugin
CPAN Dependencies:  
Other Dependencies:  
Perl Version: 5.005
Add-on Home: http://foswiki.org/Extensions/UrlEventHandlerPlugin
Feedback: http://foswiki.org/Extensions/UrlEventHandlerPluginDev
Appraisal: http://foswiki.org/Extensions/UrlEventHandlerPluginAppraisal
Related Topic:

-- Foswiki:Main/EugenMayer - 25 Jan 2009
Topic revision: r4 - 02 Feb 2009, EugenMayer
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy