File Listing Plugin

Allows you to list the files using appropriate format, anywhere in the topic.

Syntax Rules

%FILELIST% - Default rendering%FILELIST{format="..." web="webname" topic="topicname"}% - With specified format/web/topic.

The format can be specified with following variables:

Variable Explanation
$fileName Name of the file
$fileIcon Icon image representing this file type
$fileSize Size of the file
$fileComment Comment attached to this file
$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 etc.
$n inserts newline character.
$br inserts BR tag

Test it

(You would have to create a topic called Sandbox.TopicWithAttachment and attach a set of files there.)

Input

%FILELIST{format="   * [[$fileUrl][$fileName]]: Submitted by $fileUser on $fileDate. Size=$fileSize. $fileComment [[$fileActionUrl][Manage this.]]" web="Sandbox" topic="TopicWithAttachment"}%

Output - if installed

Plugin Settings

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = %FILELIST% macro allows you to reference the list of attachments anywhere in the topic, as per the given format.

  • Default Format of rendering the attachments:
    • Set FORMAT = ' * $fileName? : $fileComment $n'

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

Plugin Installation Instructions

  • Instructions for Admins:
    • Download the ZIP file from the Plugin web (see below)
    • Make sure to add $TWiki::cfg{Plugins}{<nop<FileListPlugin}{Enabled} = 1; in TWiki.cfg file for Dakar Release.
    • Unzip FileListPlugin.zip in your twiki installation directory. Content:
File: Description
data/TWiki/FileListPlugin.txt Plugin Topic
data/TWiki/FileListPlugin.txt,v Plugin Topic Repository
lib/TWiki/Plugins/FileListPlugin.pm Plugin Module

Plugin Info

Plugin Author: TWiki:Main.VinodKulkarni
Plugin Version: 11 Apr 2005 (v0.6)
Change History:  
11 Apr 2005: Initial version: v0.6, One non-standard function, TWiki::handleNativeUrlEncode used in this code. May break with new versions of twiki.
03 Feb 2006 Version: v0.7 Modified to support Dakar Release - TWiki:Main.SopanShewale
CPAN Dependencies: none
Perl Version: 5.0
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/FileListPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/FileListPluginDev

Related Topics: TWikiPreferences, TWikiPlugins, EmptyPlugin

Topic revision: r15 - 2007-08-23 - 10:14:27 - ChrisHogan
 
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 Everiware? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.FileListPlugin