DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:repository:manual

Repository Plugin Manual

The Plugin Repository is used by www.dokuwiki.org to organize the plugin info.

Source

Source is available at https://github.com/splitbrain/dokuwiki-plugin-pluginrepo

DokuWiki development is gearing towards treating plugins and templates the same. In the plugin repository the templates are a just a plugin of type == 32. This facilitates tag sharing (users looking for sidebars should see both plugins and templates) and “More contributions of same author”.

:!: templates are identified by namespace used.

Functionalities

The plugin has some syntax components (see Syntax section below):

  • Entries for inputting the properties of
    • a plugin ---- plugin ----
    • or a template ---- template ---- .
  • Repository Table ---- pluginrepo ---- which lists the stored plugins or templates
  • A info box with some (random) highlights ---- pluginnews -----
  • List the results of a given query, useful for wiki adminstrators ---- pluginquery -----

To use the information about extensions in external tools, some APIs are available:

  • An API allows to query the list of available DokuWiki extensions.
    Available at /lib/plugins/pluginrepo/api.php?[parameters] (see also api)
  • Old API end point: /lib/plugins/pluginrepo/repository.php?[parameters]
    (still used by e.g. translate-tool) (see also api)
  • Creates output in different formats of the usage statistics of DokuWiki
    Available at /lib/plugins/pluginrepo/popularity.php?[parameters]
    Examples at popularity
    (see for parameters details: source)

And maintenance tasks are performed by:

  • /lib/plugins/pluginrepo/cron.php
    • Calculate popularity
    • Check for version and base discrepancies and update the badextensions page

Syntax

Entry Component

Besides the entry component details it's worth mentioning that the securitywarning field has some predefined values

  • informationleak – 'This plugin expose information that might be valuable to a hacker. It is not recommended in a public installation.'
  • allowsscript – 'This plugin will allow execution of scripts. It should only be used when you trust ALL editors, best suited in private personal wikis.'
  • requirespatch – 'The plugin requires patching the DokuWiki core. Manual patches may break compatibility with other plugins and make it harder to secure your installation by upgrading to latest version.'
  • partlyhidden – 'Hiding parts of a DokuWiki page is not supported by the core. Most attempts to introduce ACL control for parts of a page will leak information through RSS feed, search or other core functionality.'

Of cause free text could be used as well.

Pluginrepo (Table) Component

The “table” component comes in two variants, classic and a new more compact version with download buttons etc. An additional navigation feature “Jump to plugins starting with A B C..” is present for both. The new table also shows “tags” for each plugin.

The pluginrepo syntax component accepts parameters if supplied, which overrides parameters in HTTP request.

Available:

  • plugintype – [integer] 1, 2, 4, 8, 16, 32=templates
  • showall – [yes] returns plugins regardless of security or obsolete status, normally skipped.
  • includetemplates – [yes] returns templates AND plugins, normally only plugins returned. Combine with plugintype=32 to return templates only.
  • screenshot – [yes] shows screenshot thumbnail column
  • compatible – [yes] shows latest compatible DokuWiki version column
  • tablelayout – [new]
  • cloudmin – [integer] needed number of occurrences for a tag to be included in navigation cloud

Example:

---- pluginrepo ----
cloudmin: 2
----

News Component

Example News

Jsmath plugin

Plugin for displaying LaTeX equations using MathJax. (Discontinued: MathJax plugin recommended instead.)

Author: Holger

More plugins >>

Creates a right float box with one or more featured plugin/templates. Besides the repository API, additional parameters are:

Syntax definition:

---- pluginnews -----
headline:     <headline text>
style:        <sameauthor/DEFAULT>
screenshot:   <yes/NO>
random:       <YES/no>
entries:      <number of plugins displayed>
link:         <internallink id>
linktext:     <internallink text>
-----

Parameters

  • stylesameauthor will display a list of plugins/templates by same author. Only usable in plugin/template homepages.

Query Component

A tool tailored for Plugins & templates team to make wiki gardening easier. The query results are displayed as a configurable table looking something like this:

PluginDownloadurlPlugins WHERE author = Håkan Sandell
adminhomepagehttps://github.com/HakanS/dokuwiki-plugin-adminhomepage/archive/master.zip1adminhomepage
cumulushttps://github.com/HakanS/dokuwiki-plugin-cumulus/zipball/master1cumulus
dblclickedithttps://github.com/HakanS/dokuwiki-plugin-dblclickedit/archive/master.zip1dblclickedit
parserarrayhttps://github.com/HakanS/dokuwiki-plugin-parserarray/zipball/master1parserarray
translationbuddyhttps://github.com/HakanS/dokuwiki-plugin-translationbuddy/zipball/master1translationbuddy

∑ 5 plugins matching query

Syntax definition:

---- pluginquery -----
SELECT: <list of field names (optional)>
WHERE:  <sql where clause>
VALUES: <list of values matching ? in where clause (optional)>
HAVING: <popularity filter (optional)> 
-----

Allowed fields: plugin, name, description, author, email, compatible, lastupdate, type, securityissue, screenshot, downloadurl, bugtracker, sourcerepo, donationurl, cnt (popularity)

All fields but “cnt” are allowed in WHERE clause together with AND, OR, NOT, NULL, LIKE, %, <, >, =, (, ). All values in where clause should be replaced by ?.

Syntax examples:

---- pluginquery -----
WHERE:  downloadurl IS null
HAVING: cnt > 400
-----
---- pluginquery -----
SELECT: type
WHERE:  (type AND ?) AND (author LIKE ?)
VALUES: 3, %Andreas%
-----
---- pluginquery -----
SELECT: compatible
WHERE:  ?
values: 1
-----

Configuration

There are some config settings for the dokuwiki.org admin

  • db_name – contain the DataSourceName, which consists of the PDO driver name, followed by a colon, followed by the PDO driver-specific connection syntax. See also: http://se2.php.net/manual/en/pdo.construct.php
    Example: 'mysql:dbname=testdb;host=127.0.0.1' or 'sqlite:C:\DokuWikiStickNew\dokuwiki\repo.sqlite'
    SQLITE2 not supported
  • db_user – database login username (leave blank for sqlite).
  • db_pass – database login password (leave blank for sqlite).
  • bundled – comma separated list of plugins that are bundled.
  • releases – comma separated list of releases (YYYY-MM-DD “<name>”) newest MUST be first.

Repository plugin honors allowdebug for SQL debugging.

plugin/repository/manual.txt · Last modified: 2016-06-04 13:09 by Klap-in