Giter Site home page Giter Site logo

simon-r-white / dokuwiki-plugin-directorylist Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alexwenzel/dokuwiki-plugin-directorylist

0.0 2.0 0.0 185 KB

Specify a directory and this plugin will list all contained items and made them downloadable.

PHP 89.29% JavaScript 0.20% CSS 10.52%

dokuwiki-plugin-directorylist's Introduction

Directory listing for Dokuwiki

Specify a directory and this plugin will list all contained items and made them downloadable.

This is mostly used for intranets.

Information #1: This is still under development and not finished or secured.

Information #2: Please be aware, that a wiki user can pick ANY directory on your maschine. I am not responsible for any problems.

Example

Image

Requirements

  • PHP >= 5.3
  • PHP fileinfo extension

Usage

<directorylist: path="value" ignore="value" recursive="1" fileorder="asc">

Path argument

The path argument specifies the path which the directorylist plugin will list.

This can be an unix or windows path. It can be absolute or relative.

Examples:

<directorylist: path="./relative/path/in/dokuwiki">
<directorylist: path="C:\Users\Public">

Ingore argument

You can ignore directories or files with the ignore argument.

The ignore argument has to be a comma separated shell pattern.

This argument is optional, the value is empty.

Example:

<directorylist: [...] ignore="*.pdf,*.js,specialfile.doc,some_*_files.xlsx">

Recursive argument

You can specify if you want to list your directory recursive or not.

This argument is optional, the default value is: true.

Examples:

<directorylist: [...] recursive="0">
<directorylist: [...] recursive="1">
<directorylist: [...] recursive="false">
<directorylist: [...] recursive="true">

Fileorder argument

You can specify the order of files inside a directory.

This argument is optional, the default value is: asc.

Examples:

<directorylist: [...] fileorder="asc">
<directorylist: [...] fileorder="desc">

Type argument

Adding a new 'type' option to the directorylist syntax to enable different types of href link.

This allows 'direct' links using the file:// protocal. (NOTE: this will usually not be a good choice since most browsers, eg. Chrome, forbid the openning of file:// links from non-local pages)

Also allows 'link' links that, using the absolute path and dokuwiki basedir, serve weblinks to content. (NOTE: assumes the data directory is reachable by your webserver. This is a big security issue!)

Default option is 'download';

Examples:

<directorylist: [...] type="download">
<directorylist: [...] type="direct">
<directorylist: [...] type="link">

Styling

You can style this plugin with the following elements:

  • ul.directorylist
  • ul.directorylist li.file
  • ul.directorylist li.folder

Information

Author: Alexander Wenzel ([email protected])

Plugin page: http://www.dokuwiki.org/plugin:directorylist

Icons: genericons.com

Changelog

  • 0.2.1
    • PHP7 compatibility
    • changed default 'type' to 'download'
  • 0.2.0
    • added 'type' argument

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.