Welcome to the private homepage of Stephan Klimek. Mainly this a place to publish articles of my current interests, to host some of my software projects in development and to provide some personal stuff. This site was developed using the excellent dokuwiki framework. For further info you can have a look at the Inprint page and use this Contact form for any feedback or requests.

Software Index

Media Listing Plugin

This plugin shows file listings of media directories. It was inspired by the dirlisting plugin. It has many options and flags to control the generated listing.

Usage

Syntax

{{medialisting>[options] [flags]}}
  • Option values follow option names separated by equal signs (=).
  • Option values have to be enclosed by double quotes () like title=“Download Section”.

Options

OptionDescriptionExample
dirroot directory for listing (this is a sub dir under the media folder)dir=“docs”
maskfilter for directory items matched against their base name (this is regular expression)mask=“\.pdf$” or mask=“\.(pdf|zip)$”
titletitle of listing (the pipe sign forces a line break)title=“File Index”
sortsort items by a field: (basename, fullname, size, mtime, ctime (default is basename)sort=“size”
limitrestrict how many items are displayedlimit=“2”

Flags

FlagDescription
sizeshows file size in human readable form
ctimeshows file creation date and time in format YYYY-MM-DD
mtimeshows file modification date and time (same format like ctime)
commalistdoes not render a table but a comma separated list of directory items (comma lists are always aligned to the left)
reversereverts sort order
recursiveincludes sub directories
headerdisplays header
nicebeautifies file names by changing underscores to blanks and removing file extensions
smallgenerates a single column table without fixed width

Installation

Download the plugin and unpack the archive under the dokuwiki plugin directory.

Download

Examples

Embedding a directory listing as comma separated list as part of an unordered list

Source:
  * Some things
  * {{medialisting>dir="images" mask=".*" limit=2 commalist nice}}
  * More things
Result:

Embedding directory listings in tables

Source:
^Section^Files^
|Demo 1|{{medialisting>dir="images" mask=".*" reverse sort="mtime" limit=2 mtime ctime size}}|
|Demo 2|{{medialisting>dir="images" mask=".*" reverse sort="mtime" limit=2 mtime ctime size}}|
Result:
SectionFiles
Demo 1
free64.png5Kb2006-12-082007-07-19
freedb64.png9Kb2006-12-082007-07-19
Demo 2
free64.png5Kb2006-12-082007-07-19
freedb64.png9Kb2006-12-082007-07-19

Embedding directory listings in boxes using the divclass plugin

Source:
<divclass box half left green nobullets noindent|Left>
{{medialisting>dir="images" mask=".*" limit="2" nice small}}
</divclass|sorted>
 
<divclass box half right red nobullets noindent|Right>
{{medialisting>dir="images" mask=".*" limit="2" nice reverse small}}
</divclass|reverse sorted>
Result:
Left

Right

Showing all columns with header reverse sorted by modification time and limited to 2 items

Source:
{{medialisting>dir="images" mask=".*" reverse sort="mtime" limit=2 mtime ctime size header}}
Result:

 
free64.png5Kb2006-12-082007-07-19
freedb64.png9Kb2006-12-082007-07-19

Showing a small listing

Source:
{{medialisting>dir="images" mask=".*" reverse sort="mtime" limit=2 mtime ctime size small header}}
Result:

software/dokuwiki/plugins/medialisting.txt · Last modified: 2007-01-26 18:19 by admin
init24.de = chi`s home Mac OS X Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Valid CSS Valid XHTML 1.0 Recent changes RSS feed