====== directorylist Plugin ====== ---- plugin ---- description: Specify a directory and this plugin will list all contained items and make them downloadable. author : alexwenzel email : alexander.wenzel.berlin@gmail.com type : Syntax, Action lastupdate : 2017-10-03 compatible : Binky, 2013-12-08 depends : conflicts : similar : filelist tags : filesystem, directory, files, intranet downloadurl: https://github.com/alexwenzel/dokuwiki-plugin-directorylist/archive/master.zip bugtracker : https://github.com/alexwenzel/dokuwiki-plugin-directorylist/issues sourcerepo : https://github.com/alexwenzel/dokuwiki-plugin-directorylist/ donationurl: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YP4LDRJFB9F94 screenshot_img : https://raw.githubusercontent.com/alexwenzel/dokuwiki-plugin-directorylist/development/example1.png ---- ===== About ===== Specify a directory and this plugin will list all contained items and made them downloadable. This is mostly used for intranets. Contact me if anything. ===== Installation & Usage ===== Please visit the github page for **detailed** information! [[https://github.com/alexwenzel/dokuwiki-plugin-directorylist]] ===== Discussion ===== The plugin currently only supports the 'download' hyperref option, which means that all links result in a downloaded file. By adding a new argument, 'type', and slightly altering the formatLink() function we can support direct links. I've done a slight hack to get the correct url path. Below is the diff output for my changes on the directorylist/syntax/directorylist.php file. 107,110d106 < // check and set default: type argument < if ( ! isset($data['type']) || empty($data['type']) ) < $data['type'] = 'link'; < 161c157 < $this->renderer->doc .= '
  • '.$this->formatLink($value,$data).$this->formatBytes($value).'
  • '; --- > $this->renderer->doc .= '
  • '.$this->formatLink($value).$this->formatBytes($value).'
  • '; 210,212d205 < < < 218c211 < private function formatLink(SplFileInfo $file, array $data) --- > private function formatLink(SplFileInfo $file) 220,238c213,214 < global $conf; < < $link = 'getFilename().'"'; < $link .= '>'; --- > $link = ' $link .= 'title="'.$file->getFilename().'">';
    --- [[user>simon.w|simon.w]] //2015-06-02 16:27// Hi, I have accepted your pull request. Thank you //alexwenzel//