---+!! <nop>%TOPIC% *Displays a formattable list of topic attachments, anywhere in a topic.* View permissions are honored: if the user is not allowed to view the referring topic, the attachments are not displayed. %TOC% ---++ Syntax Rules * =%<nop>FILELIST%= - default rendering * =%<nop>FILELIST{format="..." web="webname" topic="topicname"}%= - with specified format/web/topic | *Parameter* | *Comment* | *Example* | | =topic= | Topic name to show attachments of | =<nop>%TOPIC%= | | =web= | Web name of =topic= | =<nop>%WEB%= | | =filter= | Comma separated list of file extensions to be listed |=gif,jpg= | | =format= | Format string. Use the format in the table below | | | =hide= | Wether !FileListPlugin should hide the attachments marked as hidden. Disabled by default, set to "yes", "on" or "1" to enable | | | *Format parameter* | *Comment* | | =$fileName= | Name of the file | | =$fileIcon= | Icon image representing this file type (see %TWIKIWEB%.TWikiDocGraphics) | | =$fileSize= | File size | | =$fileComment= | Attachment comment | | =$fileUser= | Who submitted | | =$fileDate= | When submitted | | =$fileUrl= | URL of the file, assumes =ATTACHURL= path | | =$viewfileUrl= | Full path with =viewfile= as script name | | =$fileActionUrl= | Full path of management URL for this file (for changing properties etcetera) | | =$hidden= | 'hidden' if the attachment is hidden, nothing otherwise | | =$n= | newline character | | =$br= | =<br />= tag | ---++ Test <verbatim> %FILELIST{format="| $fileIcon | [[$fileUrl][$fileName]] ($fileSize) | Submitted by $fileUser on $fileDate | $fileComment |<span class='twikiGrayText'>[[$fileActionUrl][manage]]</span> |" web="%TWIKIWEB%" topic="FileAttachment"}% </verbatim> Output (if installed): %FILELIST{format="| $fileIcon | [[$fileUrl][$fileName]] ($fileSize) | Submitted by $fileUser on $fileDate | $fileComment |<span class='twikiGrayText'>[[$fileActionUrl][manage]]</span> |" web="%TWIKIWEB%" topic="FileAttachment"}% ---++ Plugin Settings * Default format of rendering the attachments: <verbatim> * Set FORMAT = $n * [[$fileUrl][$fileName]] $fileComment </verbatim> * Set SHORTDESCRIPTION = Displays a formattable list of topic attachments, anywhere in a topic. * Set DEBUG = 0 ---++ Plugin Installation Instructions * Download the ZIP file from the Plugin web (see below) * Unzip ==%TOPIC%.zip== in your root ($TWIKI_ROOT) directory. Content: | *File:* | *Description:* | | ==data/TWiki/FileListPlugin.txt== | | | ==lib/TWiki/Plugins/FileListPlugin.pm== | | * Optionally, if it exists, run ==%TOPIC%_installer== to automatically check and install other TWiki modules that this module depends on. You can also do this step manually. * Alternatively, manually make sure the dependencies listed in the table below are resolved. None * Visit =configure= in your TWiki installation, and enable the plugin in the {Plugins} section. ---++ Plugin Info | Authors: | TWiki:Main.VinodKulkarni, TWiki:Main.SopanShewale (2006), TWiki:Main.ArthurClemens (2006) | | Copyright ©: | TWiki:Main.VinodKulkarni, TWiki:Main.SopanShewale (2006), TWiki:Main.ArthurClemens (2006) | | License: | [[http://www.gnu.org/copyleft/gpl.html][GPL]] | | Dependencies: | None | | 17 Dec 2006 - v.0.8 | TWiki:Main.ArthurClemens: reworked for TWiki 4.1 and optimized; activated =filter= parameter, added topic view permission check. | | 03 Mar 2006 - v.0.7 | TWiki:Main.SopanShewale: reworked for TWiki 4 | | 11 Apr 2005 - v.0.6 | TWiki:Main.VinodKulkarni: Initial version | | Home: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC% | | Feedback: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev | | Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal |
This topic: TWiki/
>
FileListPlugin
Topic revision: r1 - 12 Apr 2005 - 09:03:54 -
TWikiContributor
Copyright � by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback