TIP TopicInteractionPlugin is not installed on Foswiki.org.


Improved interaction with attachments and DataForms

This plugin redesigns the way how users interact with topics and attachments in various ways:

Other features are:

  • cross-browser compatible bulk upload of multiple files
  • bulk actions on attachments: delete, move, hide, download as zip archive, create image gallery, insert links
  • thumbnail and lightbox preview of image attachments
  • easy renaming of attachments using modal dialogs
  • easy access to previous revisions of attachments
  • loading the list of attachments via ajax not to slow down display of topics with lots of attachments
  • filtering and pagination for topics with a lot of attachments
  • drag & drop upload for browsers supporting it (currently firefox and chrome only)

To activate you'll need to add topicinteraction to your SKIN path setting in your SitePreferences, like

    * Set SKIN = topicinteraction, pattern

Use the insidetab setting of MetaCommentPlugin to render comments inside a tab at the bottom of the page:

    * Set SKIN = topicinteraction, metacomment, pattern
    * Set COMMENTFORMAT = insidetab

Note you won't need using Foswiki:Extensions/NatSkin as that's integrated automatically.








TopicInteractionPlugin implements some macros to actually implement the user interface. These macros can be used for other purposes too of course.


List all attachments of a given topic. Without any parameters it displays a table of attachments similar to the one generated by the templates at the bottom of a topic. There are a couple of parameters that take regular expressions to limit the number of attachments to be listed.

"<topic>" topic whos attachments we want to query
attr="..." match the attachments' attribute
autoattached="yes,no,undef" limit attachments to those that are (not) autoattached
casesensitive="on/off" specify string comparison mode when filtering attachments, defaults to on
comment="..." match the attachments' comment
maxdate="..." specify latest attachment
maxsize="..." specify biggest attachment
mindate="..." specify earliest attachment
minsize="..." specify smallest attachment
names="..." match the name of attachments to be include in the list
user="..." match the attachments' user who uploaded it
footer="..." format string appended to the result
format="..." how to format each attachment
header="..." format string prefixing the resulting output
separator="..." format string put between each formatted attachment
hidenull="on,off" hide/display the empty result; only the header and the footer are included if set to "off" and there's no attachment at the given topic
nullformat="..." format string to be used when no attachments have been found and hidenull is switched off
nullheader="..." header string to be used when no attachments have been found and hidenull is switched off
nullfooter="..." footer string to be used when no attachments have been found and hidenull is switched off
sort="name,date,size,user,comment,comment:name,random" sort results by specified property
reverse="on/off" enable reverse sorting
limit="..." limit the number of attachments to the given number; by default show all

The following variables can be used in the format parameter:
  • $attr: the attributes
  • $autoattached: the autoattach flag
  • $comment: the comment field
  • $date(<format>): the attachment date using <format> to format the date
  • $date: the attachment date
  • $delete: the action to delete the current attachment
  • $deleteUrl: the url used in the delete action
  • $icon: img tag representing the filetype
  • $iconUrl: the url pointing to the icon used in the img tag
  • $index: the position index of the attachment in the result
  • $move: the action to move the current attachment
  • $moveUrl: the url used in the move action
  • $name: the name of the attachment
  • $path: the path property of the attachment
  • $props: the action to change the properties of the current attachment
  • $propsUrl: the url used in the props action
  • $size: the size in bytes
  • $sizeH: file size in a humanized display (using KB, MB, GB, etc) as needed
  • $sizeK: the size in kilo bytes
  • $sizeM: the size in mega bytes
  • $sizeG: the size in giga bytes
  • $topic: the name of the topic of whose attachments are listed
  • $url: the attachments url
  • $urlpath: the attachments urlpath
  • $user: the user that uploaded the attachment
  • $web: the web name of the current topic
  • $webdav: the action to edit the current attachment using the Foswiki:Extensions/WebDavPlugin
  • $webdavUrl: the url used in the webdav action
  • $wikiuser: the user's home topic that recently changed the current attachment

The header and footer format strings may only contain
  • $count: the number of attachments found

The format, header and footer may contain the standard escape sequences:
  • $dollar: $ sign
  • $n: newline
  • $percnt: % sign
  • $quot: " sign

  header="| *&nbsp;* | *Name* | *Url* | *Size* | *Author* | $n"
  format="| $idnex | $name: | $url | $sizeK |"

%ATTACHMENTS{ header="| # | Icon | Name | Size | Author | Date |$n" format="| $index | $percntMIMEICON{\"$name\" size=\"48\"}$percnt | $name | $sizeK | $user | $date |" }%

Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. "Extensions Operation and Maintenance" Tab -> "Install, Update or Remove extensions" Tab. Click the "Search for Extensions" button. Enter part of the extension name or description and press search. Select the desired extension(s) and click install. If an extension is already installed, it will not show up in the search results.

You can also install from the shell by running the extension installer as the web server user: (Be sure to run as the webserver user, not as root!)
cd /path/to/foswiki
perl tools/extension_installer <NameOfExtension> install

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See https://foswiki.org/Support/ManuallyInstallingExtensions for more help.


Foswiki::Plugins::ZonePlugin>=3.1Required for Foswiki < 1.1

Change History

13 Sep 2017: replace outdated plupload uploader with jquery-file-upload
18 Nov 2016: oo-ified core; added humanized file size display, removed flash backend from default; improved webdav integration for one-click editing office documents; fixed sanitizing attachemnt names during upload using the standard mechanism again; removed (optional) dependency on FlexPaperPlugin (flash) in favour of DocumentViewerPlugin (html5); fixed url construction in javascript land; add support for JQPhotoSwipeContrib, a much nicer lightbox image preview; added support for LikePlugin to rate attachments; replaced famfamfam icons with fontawsome ones; added registry entry to use register LibreOffice to be used for one-click edits on windows
11 Oct 2016: using jquery-i18n for translations now
17 Jul 2015: added support for Foswiki-2.0; added support for Foswiki:Extensions/WebDAVContrib
16 Dec 2014: add support for Foswiki:Extensions/MediaElementPlugin to preview audio and video attachments
29 Aug 2014: fully specify rest security
28 May 2014: improve performance on bulk operations on attachments; fixed tooltip poping up automatically
04 Apr 2014: flag rest handlers that don't require authentication
18 Mar 2014: render correct form data when displaying an old revision
20 Feb 2014: fixed permission checking of actions; added one-click editing of office documents
08 Jan 2014: fixed file corruption under Windows; fixed too aggressive renaming of files during upload
12 Dec 2013: fixed initialization of defaults
07 Nov 2013: fixed malformed JSON on some remote procedures
01 Nov 2013: have a checkbox in the properties dialog to mark an image attachment to be used as a thumbnail in search results; better support for WebDavContrib: one-click edit of office attachments; jslinting javascript code (excluding 3rd party upstream code)
08 Apr 2013: fixed html error
14 Mar 2013: default to chunked upload; fixed handling of attachments with commas in their name
01 Feb 2013: fixed error handling; hiding access to edit actions when not authorized anyway; fixed uploading files with special chars in their name; fixed initialization of flash backend; fixed reading foswiki preference settings; fixed uploading files with commas in their name
31 Jan 2013: using ATTACHLINKBOX to control the default state of the "create link" checkbox
25 Jan 2013: fixed auto-start feature; fixed registration of uploader component
18 Jan 2013: improved compatibility with PatternSkin; fixed configure barfing on an undef value
24 Sep 2012: updated to latest plupload version; allow to add arbitary properties, not only comments, createlink, hide-file flags
10 Jul 2012: replaced all simplemodals with jquery-ui dialogs; added nullformat,nullheader,nullfooter to %ATTACHMENTS macro; removed dependency on WebDAVLinkPlugin to render webdav-enabled urls
08 May 2012: fixed silent dependency on DBCachePlugin; fixed integration with PatternSkin; fixed dependency on Foswiki:Extensions/RenderPlugin; fixed interaction with Foswiki:Extensions/MetaCommentPlugin
26 Apr 2012: initial release

Topic attachments
I Attachment Action Size Date Who Comment
LibreOfficeWebDAV.regreg LibreOfficeWebDAV.reg manage 1 K 13 Sep 2017 - 11:00 MichaelDaum  
TopicInteractionPlugin.md5md5 TopicInteractionPlugin.md5 manage 189 bytes 13 Sep 2017 - 11:01 MichaelDaum  
TopicInteractionPlugin.sha1sha1 TopicInteractionPlugin.sha1 manage 213 bytes 13 Sep 2017 - 11:01 MichaelDaum  
TopicInteractionPlugin.tgztgz TopicInteractionPlugin.tgz manage 455 K 13 Sep 2017 - 11:01 MichaelDaum  
TopicInteractionPlugin.zipzip TopicInteractionPlugin.zip manage 517 K 13 Sep 2017 - 11:00 MichaelDaum  
TopicInteractionPluginSnap1.pngpng TopicInteractionPluginSnap1.png manage 15 K 13 Sep 2017 - 11:00 MichaelDaum  
TopicInteractionPluginSnap2.pngpng TopicInteractionPluginSnap2.png manage 108 K 13 Sep 2017 - 11:00 MichaelDaum  
TopicInteractionPluginSnap3.pngpng TopicInteractionPluginSnap3.png manage 97 K 13 Sep 2017 - 10:59 MichaelDaum  
TopicInteractionPluginSnap4.pngpng TopicInteractionPluginSnap4.png manage 43 K 13 Sep 2017 - 10:59 MichaelDaum  
TopicInteractionPluginSnap5.pngpng TopicInteractionPluginSnap5.png manage 35 K 13 Sep 2017 - 10:59 MichaelDaum  
TopicInteractionPlugin_installerEXT TopicInteractionPlugin_installer manage 13 K 13 Sep 2017 - 11:01 MichaelDaum  
Topic revision: r29 - 13 Sep 2017, MichaelDaum - This page was cached on 21 Sep 2017 - 18:26.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License