You are here: addons4webgui > Home > Macros
User: Visitor
Navigation
News
Login
ExtFileList

Documentation

ExtFileList Macro for WebGUI

What's this?:

With this WebGUI macro, it is possible to provide files in a explorer style list for download (like apache).

System requirements:

  • Web server (tested on Apache 2).
  • WebGUI (tested on WebGUI V7.4.x).
  • Perl module MIME::Types.
  • Icon images, like apache icons (/icons).

Files:

  • WebGUI/docs/Macro_ExtFileList.html: This document here.
  • WebGUI/docs/Macro_ExtFileList.tmpl: Description and content to create a new template for this macro.
  • WebGUI/lib/WebGUI/Help/Macro_ExtFileListMacro.pm: Help file.
  • WebGUI/lib/WebGUI/Macro/ExtFileListMacro.pm: WebGUI macro.
  • WebGUI/lib/WebGUI/i18n/English/Macro_ExtFileListMacro.pm: Texts in english language.
  • WebGUI/lib/WebGUI/i18n/German/Macro_ExtFileListMacro.pm: Texts in german language.

Installation:

  1. Download the package source from http://sourceforge.net/projects/addons4webgui.
  2. Extract it (or copy the files from it) over the into your WebGUI install. Example: tar xvfz /path/to/Macro_ExtFileList-x.x.x.tar.gz /path/to/WebGUI.
  3. Edit the WebGUI conf file to add the ExtFileList macro to the macro list.
  4. Create a new template with namespace ExtFileList (see file WebGUI/docs/Macro_ExtFileList.tmpl).
  5. Restart web server.

Usage:

ˆExtFileList([FolderPath],[FileUrl],[IconUrl],[TemplateId],[Title],[NoSubfolders]);

Example: ˆExtFileList("/data/files","/downloads","/icons","iYpk6yCLwlOEvbog2LQj9w","Test",1);

Macro parameter description:

  1. FolderPath - the absolute path to the files. (e.g. /data/files).
  2. FileUrl - the file url path to the files, relative path from DocumentRoot (e.g. /downloads or /uploads/files)
  3. IconUrl - the url path to the icons directory, relative path from DocumentRoot (e.g. /icons, like apache icons).
  4. TemplateId - the id of a template with namespace ExtFileList.

Troubleshooting:

See web server log file and/or webgui log file.

Changelog:

V1.1.0:
  • Added new file icon routine (deleted the old one)
  • Added new parameter [NoSubfolders]
V1.0.1:
  • Renamed and updated this document
V1.0.0:
  • First release
Copyright 2008-2009, studio4master
Licensed under the GNU General Public License (GPL) V3

http://addons4webgui.studio4master.ch

            Valid CSS!  
Running on WebGUI 7.6.25-s4m-20090617
Copyright (c) 2001-2009 by studio4master