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

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


wiki:plugin:data

Это старая версия документа!


плагин данных

Совместим с «Докувики»

  • 2024-02-06 "Kaos" неизвестно
  • 2023-04-04 "Jack Jackrum" неизвестно
  • 2022-07-31 "Igor" да
  • 2020-07-29 "Hogfather" да

plugin Добавляйте и запрашивайте структурированные данные в своей вики.

Последнее обновление:
2024-01-30
Предоставляет
Syntax, Helper, Action
Репозиторий
исходный код
Конфликтует с
fckg
Требует
sqlite

Похож на fields, json, pagemod, strata, struct

Теги: data, database, listing, sqlite, tables, tags

Этот плагин позволяет добавлять структурированные данные на любую страницу DokuWiki. Рассматривайте эти данные как дополнительные именованные атрибуты. Затем эти атрибуты можно запрашивать и агрегировать. Плагин похож на то, что было сделано для плагина репозитория, но его внутренняя структура существенно отличается.

:!: Возможно, вам стоит рассмотреть возможность использования идейного преемника этого плагина struct Plugin

Загрузка и установка

Найдите и установите плагин с помощью Менеджера расширений. Инструкции по ручной установке плагинов см. в разделе «Плагины».

Изменения

Обновление с версий, выпущенных до 06.02.2013.

Обязательно обновите плагин sqlite и следуйте инструкциям по обновлению версии sqlite.

Обновление с версий, выпущенных до 22.03.2010.

Начиная с 22 марта 2010 года, плагин данных использует вспомогательный плагин sqlite. Поэтому расположение и структура файлов базы данных изменились. Если вы хотите сохранить старую базу данных, перед обновлением плагина данных необходимо выполнить следующие действия:

  1. Установите sqlite плагин
  2. Переместите файл data/cache/dataplugin.sqlite в data/meta/data.sqlite
  3. Выполните следующие SQL-запросы к базе данных (например, используя страницу администрирования плагина sqlite):
CREATE TABLE opts (opt,val);
CREATE UNIQUE INDEX idx_opt ON opts(opt);
INSERT INTO opts VALUES ('dbversion', 1);
  1. Обновите плагин данных.

Если вы обновили плагин данных до выполнения этих шагов, data.sqlite был создан пустой файл, и вам необходимо скопировать его data/cache/dataplugin.sqlite поверх существующего data/meta/data.sqlite.

Синтаксис плагина

Этот плагин зависит от нескольких частей, каждая из которых имеет схожий синтаксис. Синтаксис определяет блок с различными парами ключ/значение, настраивающими поведение части плагина. Доступны следующие части:

Ввод данных (память)

Эта часть используется для добавления структурированных данных на страницу. Все введенные здесь данные привязаны к странице. Поэтому вы можете использовать ее только один раз на странице 1). Давайте начнем с примера:

---- dataentry projects ----
type            : web development
volume          : 1 Mrd    # how much do they pay?
employees       : Joe, Jane, Jim
description_wiki: **Important** project
customer_page   : customers:microsoft
deadline_dt     : 2009-08-17
server_pages    : servers:devel01, extern:microsoft
website_url     : http://www.microsoft.com
task_tags       : programming, coding, design, html
----

Как видите, блок определяется дефисами и словом dataentry. После ключевого слова можно добавить дополнительные слова dataentry. Они будут добавлены в качестве дополнительных CSS- классов в итоговый HTML- код и могут быть использованы для запроса %class% позже. Это можно использовать для стилизации отображения различных типов записей или для ограничения агрегации определенными типами страниц.

Вы можете использовать этот # символ для добавления комментариев к блоку. Они будут игнорироваться и не будут отображаться или сохраняться. Если вам нужно ввести # данные, экранируйте их обратной косой чертой ( \#). Если вам нужна обратная косая черта, экранируйте и её (\\).

Внутри блока вы видите названия столбцов и их значения. Для названий столбцов существует несколько правил:

  • Используйте любое имя на ваш выбор.
  • Если имя заканчивается этим s символом, вы можете добавить несколько значений, разделенных запятыми (как в строке с сотрудниками). Это удалит последний s символ из отображаемого имени столбца.
    • Суффикс s или «множественные значения» вступают в действие при использовании ~ фильтра, в отличие от *~ (см. ниже)2)
    • Если вы хотите избежать использования опции множественных значений и сохранить имя столбца без изменений, добавьте в конец имени символ подчеркивания (например: thickness_ : 1cm).
    • s Если вам нужен вариант с несколькими значениями, и вы хотите оставить название столбца без изменений, добавьте к нему второе значение …

например: name…
e.g.:
name : John → name: John
names: John, Jack → name: John, Jack
name_tag : John, Jack → name: John, Jack
name_tags: John, Jack → name: John, Jack
thickness : 1cm → thicknes: 1cm
thickness_: 1cm → thickness: 1cm
thicknesss: 1cm, 2inch → thickness: 1cm, 2inch

  • При использовании типа данных добавьте параметр sдля множественных значений в самом конце (например, в server_pages строке).
  • Для форматирования вывода к имени можно добавить специальные типы. Используйте нижнее подчеркивание для разделения идентификатора и типа. Доступные в настоящее время типы перечислены в таблице ниже.
    • Если тип не указан, он рассматривается как простая строка.
    • Новые типы можно создавать с помощью псевдонимов типов
тип Значение
dt Дата в формате ГГГГ-ММ-ДД, отформатированная как простой текст, но введенные данные проверяются на правильность формата.
page Эта запись рассматривается как имя страницы Вики и будет связана с ней в выходных данных. Она всегда считается абсолютным именем страницы, начинающимся в корневом пространстве имен. Относительные имена страниц невозможны.
title Как и в случае с обычной страницей, можно указать дополнительный заголовок, разделённый вертикальной чертой. Он всегда рассматривается как абсолютное имя страницы, начинающееся в корневом пространстве имён. Относительные имена страниц невозможны.
nspage Как и на странице, но имя столбца рассматривается как пространство имен для ссылки.
url значение будет рассматриваться как внешняя ссылка
tag Значения связаны со страницей, названной по имени столбца, и используют это значение в качестве фильтра управления для таблицы данных (изменение целевого объекта по псевдониму типа).
mail Проверяется, содержит ли значение действительный адрес электронной почты; в качестве имени, которое будет связано с указанным адресом электронной почты, используется дополнительный текст.
img<num> Предполагается, что входными данными является URL-адрес изображения или идентификатор локального медиафайла. Необязательный параметр <num> указывает желаемую ширину изображения в пикселях для изменения его размера (по умолчанию 40).
wiki Отобразить входные данные в виде вики-текста (используйте этот тип текста с осторожностью, так как он влияет на производительность).
pageid В поле ввода находится подпись для ссылки на страницу ввода данных.
hidden Введенные данные не будут отображаться ни в окне ввода данных, ни в редакторе ввода.

В значениях можно использовать два заполнителя, полезных для создания ссылок, зависящих от локализации.

Переменная для значения Значение
%lang% Код языка вашей вики по умолчанию. Например: en
%trans% Языковой код локализации текущей страницы.
Требуется плагин перевода Для ссылки на страницу de:test:page, он заменяется на
de. Используется язык по умолчанию. Пусто без плагина перевода.

Таблица данных (Вывод)

Для агрегирования структурированных данных, прикрепленных к различным страницам вашей вики, используется следующий синтаксис. Он отобразит настраиваемую таблицу с нужными вам данными. Таблицу можно сортировать и фильтровать. Также поддерживается постраничная навигация3). И, как и в случае с dataentry, вы можете добавить дополнительные слова после ключевого слова datatable. Они будут добавлены в виде дополнительных CSS- классов в итоговый HTML- код. Давайте снова начнем с примера:

---- datatable ----
cols    : %pageid%, employees, deadline_dt, website_url, volume
headers : Details, Assigned Employees, Deadline, Personal website, $$$
max     : 10
filter  : type=web development
sort    : ^volume
----

Приведенная выше конфигурация отобразит таблицу со всеми проектами веб-разработки, сотрудниками, назначенными на проект, сроками выполнения и объемом работ. Таблица будет отсортирована по объему и будет отображать максимум 10 проектов.

Как и в случае с вводом данных, значения в столбцах также можно форматировать, добавляя к именам столбцов псевдоним типа. Как и в случае со столбцом deadline_dt выше. Другой пример показывает website, что при указании URL-адреса записи в столбцах помечаются, например, _url для обеспечения возможности создания ссылок в выходных данных.

Ключевое слово перед двоеточием обозначает параметр конфигурации, а значение после него — фактическую настройку. Для повышения отказоустойчивости часто допускается использование нескольких имен параметров. Вот список всех доступных параметров:

Параметры Необходимый? Описание
cols
select
yes Это атрибуты, которые вы хотите отобразить. Это те же самые названия, которые вы использовали в разделе «Ввод данных».
head
header
headers
no Если указано иное, эти имена будут использоваться в заголовках таблиц вместо имен столбцов.
max
limit
no Сколько строк следует отобразить? Если строк достаточно, таблица станет доступной для просмотра. Если не указано, отображаются все соответствующие строки.
sort
order
no По какому столбцу следует сортировать таблицу в начале? Добавьте префикс «a», ^ чтобы изменить порядок сортировки на обратный.
filter
where
filterand
and
no Фильтрация по значению столбца. Вы можете указать это значение несколько раз, при одновременном применении нескольких фильтров будет использоваться логическая операция И.
filteror
or
no Аналогично фильтру, но несколько экземпляров будут объединены оператором ИЛИ.
dynfilters no Установите этот параметр 1 чтобы включить строку полей ввода для динамической фильтрации таблицы.
summarize no Установите значение, 1 чтобы вычислить сумму столбцов.
align no Список выравниваний столбцов. Выравнивания могут быть left(l), center© или right®
rownumbers no Установите параметр 1 для отображения номеров строк.
widths no Задает ширину столбцов, например 50px, 20em, -, 10%, «Пропустить столбец по тире -». (Примечание: если ячейка содержит длинную строку символов без пробелов, ширина соответствующего столбца не может быть меньше длины этой строки символов. Использование параметра «widths» для указания меньшей ширины столбца не даст никакого эффекта).

Для фильтрации возможно использование нескольких компараторов:

Компаратор Значение
= Точное совпадение
!= or <> Не совсем совпадает
< Меньше, чем
<= Меньше или равно
> Больше чем
>= Больше или равно
~ Сопоставление с использованием подстановочного знака. Используйте символ «a» * в качестве подстановочного знака. Например, Apple* для сопоставления Apple Pieс и Apple Computer; например dessert~ *Pie. Регистр нечувствителен.
*~ Wildcard match. Look for matches containing search term; e.g. dessert*~ Pi match Apple Pie
!~ Отрицательное совпадение с использованием подстановочного знака. Выделите все, что не соответствует выражению.
~~ Проверяет, содержится ли элемент в заданном списке, разделенном запятыми; например:dessert ~~ diner,dessert

Вы можете использовать специальные переменные в фильтре, чтобы он сопоставлялся с текущим авторизованным пользователем или текущей датой, например. filter: username=%user%

Переменная для значения фильтра Значение
%user% соответствие текущему авторизованному пользователю
%groups% сопоставить с группами текущего пользователя; использовать ~~ компаратор
%now% сравнить с текущей датой
%lang% Код языка вашей вики по умолчанию. Например: en
%trans% Языковой код локализации текущей страницы.
Требуется плагин translation. Для ссылки на страницу de:test:page, он заменяется на
de. Используется язык по умолчанию. Пусто без плагина перевода.

Существует несколько переменных, которые можно использовать в качестве имен полей, например filter : %pageid%~members:*:

Переменная для имени поля Значение
%pageid% Полное название страницы
%title% «Заголовок» страницы. Это первый заголовок страницы.
%class% Класс записи данных

Класс записи данных %lastmod%:

---- datatable ----
cols    : %pageid%, %lastmod%
headers : Details, Last Update
max     : 10
filter  : type=release notes
sort    : ^%lastmod%
----

Список данных (выходные данные)

Работает datalist аналогично описанному datatable выше и принимает те же параметры. Но вместо отображения таблицы показывается неупорядоченный список. Каждая строка результата представляет собой один элемент списка, все выбранные столбцы по умолчанию соединены пробелом. Если параметр sepbyheaders не задан, header он полностью игнорируется. Пагинация не используется.

Параметры Необходимый? Описание
sepbyheaders no Установите параметр, 1 чтобы в качестве разделителей между значениями использовались заголовки. В заголовках можно использовать дополнительные пробелы, заключенные в кавычки, например: " - "
---- datalist ----
cols    : %pageid%, volume
max     : 10
filter  : type=web development
sort    : ^volume
----

This mode allows you to display a list of pages which are similar to the current page because they share some of the structured data. Which columns are used for similarity comparison has to be given in the cols option. Additional filters and sorting options can be set. Here is an example:

---- datarelated ----
cols  : task_tags, type
title : Similar projects
max   : 5
sort  : ^volume
----

The shown config will look for pages which share values in the columns task_tags and type. A maximum of 5 pages is shown, sorted by volume.

Refer to datatable on what options are available.

This mode will not disable caching for the page, so the list might not always be up to date.

Tag Cloud (Control)

This syntax will display the values of a given data name as a tag cloud. Each value will link back to the current page (unless configured otherwise by target option). The page should also contain a Data Table - this table will then be filtered for all entries matching the selected tag.

Example:

---- datacloud ----
field: employees
min: 2
limit: 20
----

The above code would display a cloud of employees assigned to at least two different projects. A maximum of the 20 most busiest employees are shown.

These are the possible options for the cloud:

Option(s) Required? Description
field
select
col
yes What attribute is used to build the cloud?
limit
max
no Maximum number of tags to display. If not given all will be displayed
min no Minimum count a tag must have. If not given all will be shown
page
target
no Give a page which contains the Data Table to control. If not given the current page is used
summarize no Set to 1 to show sum of field

Additionally filters can be given as described in the datatable syntax.

Customizing the Styling

Position and styling of input and output boxes can be done with simple CSS. Everything given after the syntax keyword will be assigned as additional class name to the surrounding div. Additionally are the field keys used as classes for the entry box items.

Let's assume the following «dataentry» box, as specified at the beginning of the page.

---- dataentry character24 ----
name            : Jack Bauer
agency_nspage   : CTU
status_tags     : alive, active, disowned, furtive
.... more info
----

You now can style this box with CSS in your <dokuwiki>/conf/userstyle.css4). Here is an example:

div.character24 {
  /* code for the container block, such as position, layout and borders, goes here */
  float: right;
  width: 33%;
}
 
div.character24 dl > dt { 
  /* this will allow you to style the definition terms */
  font-variant: small-caps;
}
 
div.character24 dl > dt + dd {
  /* this will allow you to style to the definition values */
  font-family: sans-serif;
}
 
div.character24 dl dd.name{
  /* this makes the name larger than the rest */
  font-size: 120%;
}

Type aliases

Type aliases are custom data types which are defined by a base type (one of the built-in types like page or no type), and optionally a prefix, postfix or a comma-separated set of valid values. Type aliases are managed on their own page in the admin menu and stored in the database. They can be used in data entries, lists and tables like the built-in types.

Map type alias

For example to create new datatype map which would open Google Maps:

define interwiki address map:

map     http://maps.google.com/maps?q={NAME}

And in Admin → Data Plugin: Field Aliases (do=admin&page=data_aliases) define:

Type Alias Type Data Prefix Data Postfix Valid values
map wiki [[map> ]]

which you could use now as:

---- dataentry  ----
Address_map  : 51.103028,-1.780611
----

You can even enter a valid address, e.g. Bahnhofsstraße 5, Regensburg, Deutschland

Change tag target with a tag type alias

Tag links use default the column name as target page. You can change it by a type alias. Give as Prefix the url of the page that has your datatable. Clicking on taglink will filter that table by the tagvalue.

Type Alias Type Data Prefix Data Postfix Valid values
newtag tag namespace:pagewithdatatable

which you could use now as:

---- dataentry  ----
Address_newtag  : cheese
----

Clicking on this cheese tag will refer to namespace:pagewithdatatable and filter on cheese.

iCal type alias with iCal-Plugin

If you aggregate any meeting, you´d link to combine them to a downloadable link.

iCal-Plugin

Type Alias Type Data Prefix Data Postfix Valid values
ical wiki {{ical> }}

vCard type alias with vCard Plugin

Setup for the vCard plugin is similar to iCal.

Custom entry editor

The data plugin is the first plugin to provide a custom editor for its data entries. Data entries have an own edit button. When pressing this button, the user gets an edit form where she can edit the data entries’ content or – depending on the configuration option edit_content_only – even the structure, i. e. change a field’s name, type or append and delete fields.

Custom editor with config "edit_content_only" off let's you edit structure and values
Custom editor: Editing structure and values

Custom editor with config "edit_content_only" on let's you edit only values
Custom editor: Editing only values by switching on config option edit_content_only

Nice fields for "edit_content_only"

When the configuration option edit_content_only is enabled, some nice fields are used:

  • Dropdown list is shown filled with the values given in the Valid values column of type aliases.
  • Datepicker for fields of type dt
  • Autocompletion suggestion of existing pages for type aliases based on the page type
    (type page itself don't work)

Requirement: The datepicker and pagesuggestions needs the bureaucracy plugin, which supplies the JavaScript magic.

Page suggestions are activated by a type alias of type page. The second alias shows only pages in plugin: namespace, demonstrated in the image too.

Type Alias Type Data Prefix Data Postfix Valid values
pagesuggest page
pagesuggestplugin page plugin:

Custom entry editor: datepicker for _dt and selects for alias type with Valid values

Custom entry editor: pagesuggestions for type aliases of page type. Suggestions show page title and in brackets the page name.

Left: custom editor with datapicker field and a single and a multiple select field.

Right: a field with pagesuggestions.

Bureaucracy plugin and type aliases

The nice fields of data plugin used in the custom entry editor are also available for fields in the form of the Bureaucracy Plugin. These are: select of valid values, datepicker and pagesuggestions. Other types are allowed, but are a plain textbox only.

Some examples of defining form fields in the bureaucracy form, using dataplugin fields:

data_aliastextbox Tag _fixedtag 	
data_aliastextbox Multitags _fixedtags 

data_aliastextbox "Date of happening" _dt	
data_aliastextbox "Plugin Page" _pagesuggestplugin

Last line uses the type alias of previous section, the first two lines are in combination with type alias:

fixedtag tag Book, Notebook, Reader

Datepicker for dataplugin _dt field in a bureaucracy form Single and multiple select for dataplugin field using a type alias with Valid values in a bureacracy form

Left image shows a datepicker in a bureaucracy form and right a single and a multiple select, these are created with a type alias which defines some valid values.

Translation Support

If you use the translation plugin, you might want to use the same data entries in different languages. The plugin allows for translated field names – values will not be translated. If you only want to use English field names while having them displayed in your language, you can also follow these instructions.

To create fieldname translations, create a file in conf/lang/<langcode>/data-plugin.php. The file needs to contain a PHP array named $lang with the fieldname in the array key and the translation in the value:

conf/lang/en/data-plugin.php
<?php
$lang['somekey']  = 'My name for the key';
$lang['otherkey'] = 'My name for the other key';

Fieldnames are to be given without their type. So it's deadline not deadline_dt.

After creating or modifiying data-plugin.php file, please update wiki configuration to refresh cache start?do=admin&page=config, otherwise modifications are not taken into account.

Missing Features

  • more control options:
    • attribute list (similar to tag cloud but as a simple list)
    • search field – see datasearchform plugin
  • better documentation, examples
    • Please provide suggestions for which pieces need more attention or where you do not understand stuff. Thanks.
  • Add JavaScript support for the content_only edit form to the full-blown form as well
  • more data types?
  • links in aggregations and data entries don't generate backlinks
  • search data in a specific namespace
  • WHERE checks against date fields need SQL INTERVAL equivalent («WHERE field_dt < %now% + INTERVAL 6 MONTH» equals to «field_dt before 6 months from now»)
  • compare against «this page» name (in datatable)
  • history for the type alias table (changes in the table can affect the pages, but no record and no revert is available).
  • More data-entry blocks at one page. Reason: the Data Plugin is designed as data-entry block per page. ⇒ Recommended alternative: Strata Plugin, which is equivalent to Data plugin, but bit more sophisticated.

Examples

Some use cases:

Question and Answers

How to refresh data?

The data that is copied to the SQLite database should be refreshed automatically whenever the page containing the dataentry box is changed. If you deleted or renamed pages outside the wiki, the database will still contain data about now non-existing pages. These can be cleaned using the Data Plugin: Clean up database entry in the Admin menu.

However there might be some bugs making this not always 100% reliable. Refer to the open bugs section and changes to see what might be broken or what was recently fixed.

When you delete the whole database, all entry pages have to be re-rendered to repopulate the database. There is no automatic way to do so.

In case page were externally modified, or fresh database, few tricks to refresh the database are:

  • to download the wiki pages, in batch, using wget, a command-line file downloader;
  • to install the searchindex plugin, launch the newly added SearchIndex Manager panel in Admin menu and click the Rebuild Index button.

You can of course open the database file directly in the SQLite command line client and manipulate it through SQL queries.

What is the difference between Strata plugin and Data plugin?

The Strata Plugin is in the big lines equivalent to Data plugin. However, it has more sophisticated query syntax, less and simpler 'aliastypes' system and additional features like graph or output based at an predefined template. So for handling of more complicated data the Strata Plugin has more opportunities.

How do you filter empty fields/values?

Suppose some entries contain empty fields and you want to display such entries: how do you write the filter in the query to output these?

e.g.

---- dataentry projects ----
type            : web development
volume          : 1 Mrd    # how much do they pay?
employees       : Joe, Jane, Jim
description_wiki: **Important** project
customer_page   : 
----

and if the query is:

---- datatable ----
cols    : %pageid%
headers : Details
filter  : customer_page=
----

the output does not show the above record

The solution is to change the filter to a value that will always be populated.
---- datatable ----
cols    : %pageid%
headers : Details
filter  : %class% = projects
----
SFITCS 2016-10-15 04:58

Why don't my variables/placeholders work when I create a table in a namespace template?

DokuWiki calls strftime on _template.txt when creating a new page. This replaces some combinations of %[a-z] (for example, %title% will become [TAB]itle%). When using placeholders in _template.txt you should use double percent signs (%%title%%). Strftime will treat those as literal percent characters.

Other Questions

If you still have questions, search the forum and if it hasn't been asked before ask your question there. Please leave bug reports on Github's issue tracker.


Customisations

Important! These are hacks – there is no guarantee they'll always work, and they will not survive updates.

If it breaks you get to keep the pieces. :-)

Customise the Date Format

NOTE: The configuration setting for the PHP strftime function in /conf/dokuwiki.php also need to be changed (can also be changed via Admin→Configuration)

$conf['dformat']     = '%d/%m/%Y %H:%M';

To change the default date format from yy-mm-dd to dd-mm-yy (e.g. for Australia)

Change this:

plugins/data/helper.php
    /**
     * Replace placeholders in sql
     */
    function _replacePlaceholdersInSQL(&$data) {
        global $USERINFO;
        // allow current user name in filter:
        $data['sql'] = str_replace('%user%', $_SERVER['REMOTE_USER'], $data['sql']);
        $data['sql'] = str_replace('%groups%', implode("','", (array) $USERINFO['grps']), $data['sql']$
        // allow current date in filter:
        $data['sql'] = str_replace('%now%', dformat(null, '%Y-%m-%d'), $data['sql']);
 
        // language filter
        $data['sql'] = $this->makeTranslationReplacement($data['sql']);
    }

to this:

plugins/data/helper.php
    /**
     * Replace placeholders in sql
     */
    function _replacePlaceholdersInSQL(&$data) {
        global $USERINFO;
        // allow current user name in filter:
        $data['sql'] = str_replace('%user%', $_SERVER['REMOTE_USER'], $data['sql']);
        $data['sql'] = str_replace('%groups%', implode("','", (array) $USERINFO['grps']), $data['sql']$
        // allow current date in filter:
        $data['sql'] = str_replace('%now%', dformat(null, '%d-%m-%Y'), $data['sql']);
 
        // language filter
        $data['sql'] = $this->makeTranslationReplacement($data['sql']);
    }

and change this:

plugins/data/helper.php
switch($type) {
            case 'dt':
                if(preg_match('/^(\d\d\d\d)-(\d\d?)-(\d\d?)$/', $value, $m)) {
                    return sprintf('%d-%02d-%02d', $m[1], $m[2], $m[3]);
                }

to this:

plugins/data/helper.php
switch($type) {
            case 'dt':
                if(preg_match('/^(\d\d?)-(\d\d?)-(\d\d\d\d)$/', $value, $m)) {
                    return sprintf('%02d-%02d-%d', $m[1], $m[2], $m[3]);
                }

and change this:

plugins/data/script.js
/**
 * Init datepicker for all date fields
 */
jQuery(function () {
    jQuery('.data_type_dt input').datepicker({
        dateFormat: "yy-mm-dd",
        changeMonth: true,
        changeYear: true
    });

to this:

plugins/data/script.js
/**
 * Init datepicker for all date fields
 */
jQuery(function () {
    jQuery('.data_type_dt input').datepicker({
        dateFormat: "dd-mm-yy",
        changeMonth: true,
        changeYear: true
    });

SFITCS 2016-11-26 01:24

Bugs, Feature Requests and Patches

Please submit bugs and feature requests in the issue tracker on GitHub. Patches should be sent unified diff format or as git patches against the devel branch. Or even better: fork the repository at github and send a merge request.

1)
Любой дополнительный элемент dataentry на той же странице перезапишет любой предыдущий элемент ввода данных на этой странице, и поэтому — хотя на одной странице может отображаться множество блоков ввода данных — в базе данных SQLite будут храниться только значения последнего из них, и их можно будет получить в качестве выходных данных, например, с помощью datatable
2)
Подробности: s суффикс, например, «adam, eve», приводит к созданию списка , который можно запросить поэлементно ~ или целиком *~; без sсуффикса «adam, eve» будет храниться как строка , которую можно запросить только целиком *~. Это связано с тем, что в большинстве случаев sсуффикс является скорее вопросом семантической ясности, чем техническим требованием (для значений полей, которые люди понимают как множественные или списковые значения).
3)
Что это значит?
Только авторизованные участники могут оставлять комментарии.
wiki/plugin/data.1768730962.txt.gz · Последнее изменение: VladPolskiy

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