Репозиторий расширений используется www.dokuwiki.org для организации информации о плагинах и шаблонах.
Исходный код доступен по адресу https://github.com/dokuwiki/dokuwiki-plugin-pluginrepo
Разработка DokuWiki движется в сторону одинакового отношения к плагинам и шаблонам. В репозитории плагинов шаблоны — это просто плагин типа == 32. Это облегчает совместное использование тегов (пользователи, ищущие боковые панели, должны видеть и плагины, и шаблоны) и «Больше вкладов одного автора».
шаблоны идентифицируются по используемому пространству имен.
Плагин имеет несколько компонентов синтаксиса (см. раздел Syntax ниже):
---- plugin ----
---- template ----
.---- pluginrepo ----
в которой перечислены сохраненные плагины или шаблоны.---- pluginnews -----
---- pluginquery -----
Для использования информации о расширениях во внешних инструментах доступны некоторые API:
/lib/plugins/pluginrepo/api.php?[parameters]
(см . также api)/lib/plugins/pluginrepo/repository.php?[parameters]
/lib/plugins/pluginrepo/popularity.php?[parameters]
And maintenance tasks are performed by:
/lib/plugins/pluginrepo/cron.php
Besides the entry component details it's worth mentioning that the securitywarning
field has some predefined values
Of course free text could be used as well.
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=32
to return templates only.Example:
---- pluginrepo ---- cloudmin: 2 ----
Этот плагин предоставляет файл журнала (комбинированный с NCSA, например Apache) всех доступов к страницам DokuWiki.
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> showscreenshot: <yes/NO> random: <YES/no> entries: <number of plugins displayed> link: <internallink id> linktext: <internallink text> -----
Parameters
sameauthor
will display a list of plugins/templates by same author. Only usable in plugin/template homepages.link
, it sets the link textno
to disable random picked extensionsyes
to show screenshotno
to show bundled and older than 2 releases as wellA tool tailored for Plugins & templates team to make wiki gardening easier. The query results are displayed as a configurable table looking something like this:
Plugin | Downloadurl | Plugins WHERE author = Håkan Sandell |
---|
∑ 0 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)> HEADLINE : <heading used instead of raw query (optional)> -----
Allowed fields: plugin, name, description, author, email, bestcompatible, compatible, lastupdate, type, securityissue, securitywarning, updatemessage, screenshot, downloadurl, bugtracker, sourcerepo, donationurl, tags, popularity
All fields are allowed in WHERE clause together with AND, OR, NOT, NULL, LIKE, %
, <
, >
, =
, (
, )
. All values in where clause should be replaced by ?
.
For values of bestcompatible
four placeholders can be used: @DATEMOSTRECENT@
, @DATESECONDMOSTRECENT@
, @DATETHIRDMOSTRECENT@
and @DATEFOURTHMOSTRECENT@
.
Syntax examples:
---- pluginquery ----- WHERE : downloadurl IS null AND popularity > ? VALUES : 400 -----
---- pluginquery ----- SELECT : author type WHERE : (type & ?) AND (author LIKE ?) VALUES : 3, %Andreas Gohr% -----
---- pluginquery ----- SELECT : compatible WHERE : ? VALUES : 1 HEADLINE : All plugins and templates -----
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 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.