Uses javascript to create a popup window containing either a hidden pre-rendered part of a topic, or a TWiki request that is dynamically requested and served.
To create a popup dialog when a topic is first viewed, leave the anchor undefined.
This will allow you to create a popup Comment Edit box:
%POPUP{anchor="<span class='twikiButton'>add comment</span>" popuptext="%COMMENT%" popuptexttype="tml"}%
or a popup menu of webs
%POPUP{
anchor=" *listofwebs* "
anchortype="onmouseover"
popuptext="%WEBLIST{"| [[$name.WebHome][$name]] |"}%"
popuptexttype="tml"
popuplocation="below"
border="off"}%
there is only one popup window at a time, so if the clicks on an anchor while another popup is up, it will be replaced by the new one.
Syntax Rules
%POPUP{}%
parameters are
- anchor="" - the text that is the click target that causes the POPUP to come up (if this is not set, or an empty string, then the popup is shown on page load REMEMBER, only one popup open at a time)
- anchortype="" - action done to trigger the popup - onclick,onmouseover ('onclick' is default)
- popuptitle="" - what will be displayed in the popup title (not shown if border="off")
- popuptext="" - what will be displayed in the popup
- popuptexttype ="" - tml, rest
- popuplocation="" - general location relative to the anchor (center, below) - center is default
- border="" - show the border & close button (defaults to 'on') - if you select not to show the border and close button then there is an onmouseleave that closes the window
Plugin Settings
Plugin settings are stored as preferences variables. To reference
a plugin setting write
%<plugin>_<setting>%
, i.e.
%JSPOPUPPLUGIN_SHORTDESCRIPTION%
- One line description, is shown in the TextFormattingRules topic:
- Set SHORTDESCRIPTION = Creates a dynamic popup window
- Debug plugin: (See output in
data/debug.txt
)
Plugin Installation Instructions
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 TWiki is running.
- Download the ZIP file from the Plugin web (see below)
- Unzip
JSPopupPlugin.zip
in your twiki installation directory. Content: File: Description: data/TWiki/JSPopupPlugin.txt
Plugin topic data/TWiki/JSPopupPlugin.txt,v
Plugin topic repository lib/TWiki/Plugins/JSPopupPlugin.pm
Plugin Perl module
- use the configure script to enable
- Test if the installation was successful:
%POPUP{anchor="
Clicking here should popup" popuptitle="testing" popuptext="This is a popup text" popuptexttype="tml"}%
Plugin Info
Related Topics: TWikiPlugins,
DeveloperDocumentationCategory,
AdminDocumentationCategory,
TWikiPreferences
--
SvenDowideit@wikiring.com -
WikiRing.com