====== Medialist Plugin ====== ---- plugin ---- description: This plugin shows a list of media files for a given wikipage which are either linked in the page itself or belong to its namespace. If there is no media directory named like the page the plugin looks for media in the next upper namespace author : Michael Klier email : chi@chimeric.de type : syntax lastupdate : 2007-01-12 compatible : devel > 2007-06-26 > 2006-11-16 depends : conflicts : similar : tags : medialist, attachments ---- ^ Download | [[http://www.chimeric.de/_src/plugin-medialist.tgz|plugin-medialist.tgz]] | ===== Description ===== This plugin shows a list of media files for a given wikipage which are either linked in the page itself or belong to its namespace. If there is no media directory named like the page the plugin looks for media in the next upper namespace. Note, the plugin is aware of your ACLs. :!: **Because the plugin parses the page [[doku>parser|instructions]] of the wikipage you`ll see the correct output not in the preview but after the page is saved!** :!: ===== Installation ===== Download the archive and unpack it into ''/lib/plugins''. * [[http://www.chimeric.de/_src/plugin-medialist.tgz|.tgz]] Plugin Manager The plugin is also available via darcs. % cd /lib/plugins % darcs get http://chimeric.de/_dev/darcs/dokuwiki/plugins/medialist ===== Syntax ===== {{medialist>wikipage}} ===== Demo ===== You can see the plugin in action [[http://www.chimeric.de/_demo/plugin:medialist|here]]. ===== Resources ===== * [[http://darcs.chimeric.de/darcsweb.cgi?r=medialist;a=summary|Darcs Repository]] * [[http://www.chimeric.de/_dev/codereference/nav.html?dokuwiki/plugins/medialist/index.html|Source Code Documentation]] ===== Discussion ===== Suggestion: For output use the ''pagelist'' plugin by Ester Brunner, if found useful. --//Viktor, 2007-04-03// > Hmmm, I don`t thinks it`s a really good idea to add plugin dependencies to this small plugin, maybe using it optional. --- //[[chi@chimeric.de|chi]] 21.08.2007 21:40// ==== Display sizes of listed media ==== Adding the following one-liner will append the size of the listed media to the output: --- syntax.php-00000000 Wed Jan 17 00:54:57 2007 +++ syntax.php Wed Jun 20 14:06:39 2007 @@ -134,6 +134,7 @@ $out .= 'title="' . $link['title'] . '">'; $out .= $link['name']; $out .= ''; + $out .= '    (' . filesize_h(filesize(mediaFN($item['id']))).')'; return ($out); } --//Thanos, 2007-06-20// > Great Idea! Will be added in the next release! --- //[[chi@chimeric.de|chi]] 21.08.2007 21:40//