Difference: FileListPlugin ( vs. 1)

Revision 112 Apr 2005 - Main.TWikiContributor

Line: 1 to 1
Added:
>
>

FileListPlugin

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.

Syntax Rules

  • %FILELIST% - default rendering
  • %FILELIST{format="..." web="webname" topic="topicname"}% - with specified format/web/topic

Parameter Comment Example
topic Topic name to show attachments of FileListPlugin
web Web name of topic TWiki
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 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

%FILELIST{format="| $fileIcon | [[$fileUrl][$fileName]] ($fileSize) | Submitted by $fileUser on $fileDate | $fileComment |<span class='twikiGrayText'>[[$fileActionUrl][manage]]</span> |" web="%TWIKIWEB%" topic="FileAttachment"}%

Output (if installed):

txt Sample.txt (30b) Submitted by TWikiContributor on 22 Jul 2000 - 16:37 Just a sample manage
gif Smile.gif (94b) Submitted by TWikiContributor on 22 Jul 2000 - 16:38 Smiley face manage

Plugin Settings

  • Default format of rendering the attachments:
      * Set FORMAT = $n   * [[$fileUrl][$fileName]] $fileComment
  • 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 FileListPlugin.zip in your root ($TWIKI_ROOT) directory. Content:
    File: Description:
    data/TWiki/FileListPlugin.txt  
    lib/TWiki/Plugins/FileListPlugin.pm  

  • Optionally, if it exists, run FileListPlugin_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: 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/FileListPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/FileListPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/FileListPluginAppraisal
 
This site is powered by the TWiki collaboration platformCopyright � by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.FileListPlugin