Инструменты пользователя

Инструменты сайта


wiki:plugin:test

Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Следующая версия
Предыдущая версия
wiki:plugin:test [2026/01/12 23:03] – создано VladPolskiywiki:plugin:test [Дата неизвестна] (текущий) – внешнее изменение (Дата неизвестна) 127.0.0.1
Строка 1: Строка 1:
- ---- template ---- +====== data Plugin ====== 
-SELECT   <list of field names (optional)> + 
-WHERE    <sql where clause> +---- plugin ---- 
-VALUES   <list of values matching ? in where clause (optional)> +descriptionA and query structured data in your wiki 
-HEADLINE <heading used instead of raw query (optional)> +author     Andreas Gohr 
------ +email      andi@splitbrain.org 
-\\   +type       syntax, action, helper 
----- pluginrepo ---- +lastupdate : 2024-01-30 
-plugintype: 32 +compatible : 2024-02-06 "Kaos", 2023-04-04 "Jack Jackrum", 2020-07-29 "Hogfather", 2011-05-25 "Rincewind", 2010-11-07 "Anteater", 2009-12-25 "Lemmings", 2009-02-14, 2008-05-05, 2007-06-26 
-pluginsort: d +depends    sqlite 
-showall: yes +conflicts  fckg  #please create an issue report as well! 
-includetemplates: yes +similar    fields, pagemod, strata, struct 
-showscreenshot: yes +tags       : database, sqlite, data, tags, tables, listing 
-showcompatible: yes  + 
-cloudmin: 2 +downloadurlhttps://github.com/splitbrain/dokuwiki-plugin-data/zipball/master 
----- +sourcerepo : https://github.com/splitbrain/dokuwiki-plugin-data 
-\\  +bugtracker : https://github.com/splitbrain/dokuwiki-plugin-data/issues 
----- pluginnews ----- +donationurl: http://donate.dokuwiki.org/data 
-headline    <headline text> +screenshot_img
-style       <sameauthor/DEFAULT> +
-showscreenshot  <yes/NO> +
-random:       <YES/no> +
-entries     <number of plugins displayed> +
-link:         <internallink id> +
-linktext    <internallink text> +
------ +
-\\   +
----- pluginrepo ---- +
-cloudmin2+
 ---- ----
 +
 +This plugin allows you to add structured data to any DokuWiki page. Think about this data as additional named attributes. Those attributes can then be queried and aggregated. The plugin is similar to what was done here for the [[repository|repository plugin]] but its internals are very different to it.
 +
 +:!: You might want to consider using the spiritual successor to this plugin: [[plugin:struct|struct Plugin]]
 +
 +===== Download and Installation =====
 +
 +Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
 +
 +==== Changes ====
 +
 +[[https://travis-ci.org/splitbrain/dokuwiki-plugin-data|{{  https://travis-ci.org/splitbrain/dokuwiki-plugin-data.png?nocache|Build Status}}]]
 +
 +{{rss>https://github.com/splitbrain/dokuwiki-plugin-data/commits/master.atom date}}
 +
 +==== Updating from versions prior to 2013-02-06 ====
 +
 +Be sure to update the [[sqlite]] plugin and follow its instructions on sqlite version upgrades.
 +
 +==== Updating from versions prior to 2010-03-22 ====
 +
 +Since 2010-03-22, the data plugin uses the [[sqlite|sqlite helper plugin]]. Therefore, the database file location and structure changed. If you want to keep your old database, you have to perform the following steps prior to upgrading the data plugin:
 +
 +  - Install the [[sqlite]] plugin
 +  - Move the file ''data/cache/dataplugin.sqlite'' to ''data/meta/data.sqlite''
 +  - Perform the following SQL statements on the database (for example using the sqlite plugin’s admin page)<code sql>
 +CREATE TABLE opts (opt,val);
 +CREATE UNIQUE INDEX idx_opt ON opts(opt);
 +INSERT INTO opts VALUES ('dbversion', 1);</code>
 +  - Upgrade the data plugin
 +
 +If you upgraded the data plugin before these steps, a blank ''data.sqlite'' has been created and you have to copy the ''data/cache/dataplugin.sqlite'' over the existing ''data/meta/data.sqlite''.
 +
 +===== Plugin Syntax =====
 +
 +This plugin depends on multiple parts, each having a similar syntax. The syntax defines a block with various key/value pairs configuring the behaviour of the plugin part. The following parts are available:
 +
 +^ Part           ^ Function^
 +| [[#Data Entry (Input)|Data Entry]]         | Input   
 +| [[#Data Table (Output)|Data Table]]        | Output 
 +| [[#Data List (Output)|Data List]]          | Output 
 +| [[#Related Pages (Output)|Related Pages]]  | Output 
 +| [[#Tag Cloud (Control)|Tag Cloud]]         | Control | 
 +
 +==== Data Entry (Input) ====
 +
 +This part is used to add structured data to a page. All data entered here is tied to the page. So **you can use it only once on a page**((any additional ''dataentry'' on the same page would overwrite any preceding dataentry on this page and so - while many dataentry blocks on one page may be displayed - only the values of the last one would be stored in the SQLite database and could be retrieved as an output by e.g. a ''datatable'')). Let's start with an example:
 +
 +
wiki/plugin/test.1768248182.txt.gz · Последнее изменение: VladPolskiy

Если не указано иное, содержимое этой вики предоставляется на условиях следующей лицензии: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki