DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:inclform

inclform Plugin

Compatible with DokuWiki

  • 2017-02-19 "Frusterick Manners" unknown
  • 2016-06-26 "Elenor Of Tsort" yes
  • 2015-08-10 "Detritus" yes
  • 2014-09-29 "Hrun" yes

plugin

Last updated on
2016-10-02
Provides
Syntax
Repository
Source

Tagged with form, include, php

This plugin was originally created to include an approved html-form into a wiki-page. But it can also be used to insert safely php into pages.

Please notice that this plugin is a fork of the incl_form-plugin. There were only improvements to adapt the plugin to recent DokuWiki- and PHP-versions, it has the same functionality as the orginial incl_form-plugin.

The original author is Kite, kite@puzzlers.org

Installation

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

Examples/Usage

This plugin supports two possible tags:

  • ~~INCLFORM=section:namespace~~ ← Form at the specified page id.
  • ~~INCLFORM~~ ← Form at the current page id.

After Installation and configuration (see Configuration and Settings below):

  • Place your forms into namspaces within your forms directory (above). “namespaces” here is just like in the rest of the wiki. The Page pageindex is stored as data/pages/plugin/pageindex.txt. A form for the same namespace is stored as data/forms/plugin/pageindex.php
  • start adding ~~INCLFORM~~ tags to your pages.
    • If you're on the page pageindex, then you can refer to the sample above as ~~INCLFORM~~ and it will use the relevant form.
    • From any other page, you can refer to the sample above as ~~INCLFORM=plugin:pageindex~~

See the original page incl_form for further documentation.

Configuration and Settings

After installation:

  • Create a folder such as data/forms. This will be your repository authorized forms.
    It is also possible to chose a directory in the media-subdirectory, like data/media/forms. This allows to manage the forms/files by the media-manager, but be aware to set the correct ACLs, otherwise the use of the media-manager for php-files can be a high security risk! Only trusted users should be able to upload php-files.
  • Use the configuration manager to set the directory in which the forms/files are stored - if you use the standard data/forms (like above), you don't need to change anything.

If you want to use the media-manager to store the forms/files, you have to add the line

php    text/php

to your conf/mime.local.conf. Create the file if it doesn't exist yet.

plugin/inclform.txt · Last modified: 2016-10-10 21:12 by Aleksandr