wiki:plugin:data
Различия
Показаны различия между двумя версиями страницы.
| Предыдущая версия справа и слеваПредыдущая версияСледующая версия | Предыдущая версия | ||
| wiki:plugin:data [2026/01/18 13:10] – [Related Pages (Output)] VladPolskiy | wiki:plugin:data [2026/01/18 14:32] (текущий) – [Bugs, Feature Requests and Patches] VladPolskiy | ||
|---|---|---|---|
| Строка 229: | Строка 229: | ||
| В этом режиме кэширование страницы **не** отключается, | В этом режиме кэширование страницы **не** отключается, | ||
| - | ==== 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 '' | + | Этот синтаксис отобразит значения заданного имени данных в виде облака тегов. Каждое значение будет ссылаться на текущую страницу |
| - | Example: | + | Пример: |
| < | < | ||
| Строка 243: | Строка 243: | ||
| </ | </ | ||
| - | 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) | + | ^ Параметры |
| - | | field\\ select\\ col | yes | What attribute is used to build the cloud? | | + | | field\\ select\\ col | yes | Какой атрибут используется для построения облака? | |
| - | | limit\\ max | no | Maximum number of tags to display. If not given all will be displayed | + | | limit\\ max | no | Максимальное количество отображаемых тегов. Если не указано, |
| - | | min | no | Minimum count a tag must have. If not given all will be shown | | + | | min | no | Минимальное количество меток, которое должен иметь тег. Если значение не указано, |
| - | | page\\ target | no | Give a page which contains the Data Table to control. If not given the current page is used | | + | | page\\ target | no | Укажите страницу, |
| - | | summarize | no | Set to 1 to show sum of field | | + | | summarize | no | Установите значение |
| - | 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 | + | Позиционирование и стилизация полей ввода и вывода могут быть выполнены с помощью простого |
| - | Let's assume the following " | + | Предположим, что используется следующее поле для ввода данных, |
| < | < | ||
| Строка 271: | Строка 271: | ||
| </ | </ | ||
| - | You now can style this box with CSS in your ''< | + | Теперь вы можете стилизовать этот блок с помощью |
| <code css> | <code css> | ||
| - | div.character24 { | + | div .character24 |
| - | /* code for the container block, such as position, layout and borders, goes here */ | + | /* Здесь размещается код для контейнерного блока, такой как положение, макет и границы |
| - | float: right; | + | float : right ; |
| - | width: 33%; | + | width : 33% ; |
| } | } | ||
| - | + | | |
| - | div.character24 dl > dt { | + | div .character24 dl > dt { |
| - | /* this will allow you to style the definition terms */ | + | /* Это позволит вам стилизовать термины определения |
| - | font-variant: | + | font-variant : small-caps ; |
| } | } | ||
| - | + | | |
| - | div.character24 dl > dt + dd { | + | div .character24 dl > dt + dd { |
| - | /* this will allow you to style to the definition values | + | /* Это позволит вам стилизовать значения определения |
| - | font-family: | + | font-family : sans-serif ; |
| } | } | ||
| - | + | | |
| - | div.character24 dl dd.name{ | + | div .character24 dl dd.name { |
| - | /* this makes the name larger than the rest */ | + | /* Это делает имя больше, |
| - | font-size: 120%; | + | 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 '' | + | Псевдонимы типов — это пользовательские типы данных, |
| - | === Map type alias === | + | === Псевдоним типа карты |
| - | For example to create new datatype | + | Например, |
| - | define | + | определить карту адресов |
| < | < | ||
| map | map | ||
| </ | </ | ||
| - | And in Admin -> Data Plugin: Field Aliases | + | А в разделе Администрирование → Плагин данных: Псевдонимы полей |
| - | ^ Type Alias ^ Type ^ Data Prefix | + | ^ Псевдоним типа |
| | map | wiki | %%[[map> | | map | wiki | %%[[map> | ||
| - | which you could use now as: | + | который вы можете использовать сейчас следующим образом: |
| < | < | ||
| ---- dataentry | ---- dataentry | ||
| Строка 321: | Строка 321: | ||
| </ | </ | ||
| - | You can even enter a valid address, e.g. '' | + | Вы даже можете ввести действительный адрес, например: |
| - | === 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. | + | В качестве имени целевой страницы для ссылок тегов по умолчанию используется имя столбца. Вы можете изменить его, указав псевдоним типа. В качестве префикса укажите URL страницы, |
| - | ^ Type Alias | + | ^ Псевдоним типа |
| | newtag | | newtag | ||
| - | which you could use now as: | + | который вы можете использовать сейчас следующим образом: |
| < | < | ||
| ---- dataentry | ---- dataentry | ||
| Строка 337: | Строка 337: | ||
| </ | </ | ||
| - | Clicking on this '' | + | Нажатие на этот |
| - | === iCal type alias with iCal-Plugin | + | === псевдоним типа |
| - | If you aggregate any meeting, you´d link to combine them to a downloadable link. | + | Если вы объедините все встречи, вы можете создать ссылку для их скачивания. |
| - | [[.ical|iCal-Plugin]] | + | [[wiki: |
| - | ^ Type Alias ^ Type ^ Data Prefix | + | ^ Псевдоним типа |
| | ical | wiki | %%{{ical> | | ical | wiki | %%{{ical> | ||
| - | === vCard type alias with vCard Plugin | + | === псевдоним типа |
| - | Setup for the [[plugin: | + | Настройка плагина |
| - | ===== 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 | + | Плагин данных — первый плагин, |
| - | {{:plugin:data: | + | {{:wiki:plugin: |
| - | //Custom editor: Editing structure and values// | + | //Пользовательский редактор: редактирование структуры и значений.// |
| - | {{:plugin:data:dataentry_customeditor_onlyvalues.png?500|Custom editor with config " | + | {{:wiki:plugin:dataentry_customeditor_onlyvalues_1_.png?400|Custom editor with config " |
| - | //Custom editor: Editing only values by switching on config option | + | //Пользовательский редактор: редактирование только значений путем включения соответствующей опции в конфигурации.'' |
| - | === Nice fields for "edit_content_only" === | + | === Удобные поля для |
| - | When the configuration option | + | При включении этой опции конфигурации |
| - | * Dropdown list is shown filled with the values given in the '' | + | * Выпадающий список отображается заполненным значениями, |
| - | * Datepicker for fields of type '' | + | * Выбор даты для полей типа |
| - | * Autocompletion suggestion of existing pages for [[#type aliases]] | + | * Функция автозаполнения предлагает варианты существующих страниц для |
| - | **Requirement**: The datepicker and pagesuggestions needs the [[plugin: | + | **Требование** : Для работы средства выбора даты и подсказок страниц необходим плагин |
| - | Page suggestions are activated by a type alias of type '' | + | Подсказки страниц активируются с помощью псевдонима типа |
| - | ^ Type Alias ^ Type | + | ^ Псевдоним типа |
| | pagesuggest | | pagesuggest | ||
| | pagesuggestplugin | | pagesuggestplugin | ||
| - | {{:plugin:data:dataentry_bureaucracy_datapicker_selects.png?250 |Custom entry editor: datepicker for _dt and selects for alias type with Valid values}} | + | {{:wiki:plugin:dataentry_bureaucracy_datapicker_selects_1_.png?250 |Custom entry editor: datepicker for _dt and selects for alias type with Valid values}} |
| - | {{ :plugin:data: | + | {{ :wiki:plugin: |
| - | //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 [[plugin: | + | Удобные поля данных, |
| - | Some examples of defining form fields in the bureaucracy form, using dataplugin fields: | + | Несколько примеров определения полей формы в бюрократической форме с использованием полей плагина данных: |
| data_aliastextbox Tag _fixedtag | data_aliastextbox Tag _fixedtag | ||
| Строка 395: | Строка 396: | ||
| data_aliastextbox " | data_aliastextbox " | ||
| - | Last line uses the type alias of previous section, the first two lines are in combination with type alias: | + | В последней строке используется псевдоним типа из предыдущего раздела, первые две строки объединены с псевдонимом типа: |
| - | | fixedtag | + | | фиксированный тег |
| + | |||
| - | {{:plugin:data: | + | {{:wiki:plugin: |
| - | 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]] | + | Если вы используете плагин |
| - | To create | + | Для создания переводов имен полей создайте файл в каталоге `/ |
| <code php conf/ | <code php conf/ | ||
| Строка 415: | Строка 417: | ||
| </ | </ | ||
| - | Fieldnames are to be given without their type. So it' | + | Названия полей следует указывать без указания типа. Поэтому это |
| - | After creating or modifiying | + | После создания или изменения файла |
| - | ===== Missing Features | + | ===== Отсутствующие функции |
| - | * more control options: | + | * Дополнительные параметры управления: |
| - | * attribute list (similar to tag cloud but as a simple list) | + | * Список атрибутов |
| - | * search field -- see [[plugin: | + | * поле поиска – см. плагин |
| - | * **better documentation, examples** | + | * **улучшенная документация, примеры** |
| - | * Please provide suggestions for which pieces need more attention or where you do not understand stuff. Thanks. | + | * Пожалуйста, |
| - | * Add JavaScript | + | * Добавьте поддержку |
| - | * 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 | + | * Для проверок типа |
| - | * 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: [[plugin: | + | * Больше блоков ввода данных на одной странице. Причина: плагин |
| - | ===== Examples | + | ===== Примеры |
| - | Some use cases: | + | Некоторые варианты использования: |
| - | * This plugin may be seen in action on this wiki in the [[: | + | * С работой этого плагина можно ознакомиться на этой вики в пространстве имен |
| - | * Look for the '' | + | * Найдите это |
| - | * and for a '' | + | * а также |
| - | * Very interesting and organized wiki setup: [[http:// | + | * Очень интересная и хорошо организованная вики-система: [[http:// |
| - | * [[plugin: | + | * [[:wiki:plugin: |
| - | ===== Question and Answers | + | ===== Вопросы и ответы |
| - | ==== How to refresh data? ==== | + | ==== Как обновить данные? ==== |
| - | The data that is copied to the SQLite | + | Данные, |
| - | However there might be some bugs making this not always | + | Однако могут быть некоторые ошибки, |
| - | 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 [[plugin: | + | * Чтобы установить плагин |
| + | Разумеется, | ||
| - | You can of course open the database file directly in the SQLite command line client and manipulate it through SQL queries. | + | ==== В чём разница между плагином Strata и плагином Data? ==== |
| - | ==== What is the difference between Strata | + | Плагин [[wiki:plugin: |
| - | The [[plugin: | + | ==== Как отфильтровать пустые поля/ |
| - | ==== How do you filter empty fields/ | + | Предположим, |
| - | 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. | + | |
| < | < | ||
| Строка 481: | Строка 482: | ||
| </ | </ | ||
| - | and if the query is: | + | и если запрос выглядит так: |
| < | < | ||
| ---- datatable ---- | ---- datatable ---- | ||
| Строка 489: | Строка 490: | ||
| ---- | ---- | ||
| </ | </ | ||
| - | the output does not show the above record | + | В выходных данных указанная выше запись не отображается. |
| - | ^The solution is to change the filter to a value that will always be populated. ^ | + | ^Решение состоит в том, чтобы изменить фильтр на значение, |
| |< | |< | ||
| cols : %pageid% | cols : %pageid% | ||
| Строка 499: | Строка 500: | ||
| | --- [[user> | | --- [[user> | ||
| - | ==== Why don't my variables/placeholders work when I create a table in a namespace template? ==== | + | ==== Почему мои переменные/заполнители не работают при создании таблицы в шаблоне пространства имен? ==== |
| - | DokuWiki | + | DokuWiki |
| - | ==== 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' | + | **Важно!** Это лишь |
| - | If it breaks you get to keep the pieces. | + | Если он разобьется, |
| - | ==== Customise the Date Format | + | ==== Настройте формат даты |
| - | **NOTE:** The configuration setting for the PHP strftime function in ''/ | + | **ПРИМЕЧАНИЕ:** ''/ |
| + | < | ||
| - | To change the default date format from '' | + | Чтобы изменить формат даты по умолчанию с '' |
| - | Change this: | + | Измените это: |
| <code php plugins/ | <code php plugins/ | ||
| - | /** | + | /** |
| - | | + | |
| - | */ | + | */ |
| - | function _replacePlaceholdersInSQL(& | + | function _replacePlaceholdersInSQL ( & $data ) { |
| - | global $USERINFO; | + | global |
| - | // allow current user name in filter: | + | // разрешить имя текущего пользователя в фильтре: |
| - | $data[' | + | $data [ ' |
| - | $data[' | + | $data [ ' |
| - | // allow current date in filter: | + | |
| - | $data[' | + | $data [ ' |
| - | + | ||
| - | // language filter | + | // языковой фильтр |
| - | $data[' | + | $data [ ' |
| } | } | ||
| </ | </ | ||
| - | to this: | + | к этому: |
| <code php plugins/ | <code php plugins/ | ||
| - | /** | + | /** |
| - | | + | |
| - | */ | + | */ |
| - | function _replacePlaceholdersInSQL(& | + | function _replacePlaceholdersInSQL ( & $data ) { |
| - | global $USERINFO; | + | global |
| - | // allow current user name in filter: | + | // разрешить имя текущего пользователя в фильтре: |
| - | $data[' | + | $data [ ' |
| - | $data[' | + | $data [ ' |
| - | // allow current date in filter: | + | |
| - | $data[' | + | $data [ ' |
| - | + | ||
| - | // language filter | + | // языковой фильтр |
| - | $data[' | + | $data [ ' |
| } | } | ||
| </ | </ | ||
| - | and change this: | + | и измените это: |
| <code php plugins/ | <code php plugins/ | ||
| - | switch($type) { | + | switch ( $type ) { |
| - | case ' | + | case ' |
| - | if(preg_match('/ | + | if ( preg_match ( '/ |
| - | return sprintf(' | + | return |
| } | } | ||
| </ | </ | ||
| - | to this: | + | к этому: |
| <code php plugins/ | <code php plugins/ | ||
| - | switch($type) { | + | switch ( $type ) { |
| - | case ' | + | case ' |
| - | if(preg_match('/ | + | if ( preg_match ( '/ |
| - | return sprintf(' | + | return |
| } | } | ||
| </ | </ | ||
| - | and change this: | + | и измените это: |
| <code javascript plugins/ | <code javascript plugins/ | ||
| - | /** | + | /** |
| - | | + | |
| - | */ | + | */ |
| - | jQuery(function () { | + | jQuery ( function |
| - | jQuery(' | + | jQuery ( ' |
| - | dateFormat: " | + | dateFormat : " |
| - | changeMonth: | + | changeMonth : true , |
| - | changeYear: true | + | changeYear : true |
| - | }); | + | } ) ; |
| </ | </ | ||
| - | to this: | + | к этому: |
| <code javascript plugins/ | <code javascript plugins/ | ||
| - | /** | + | /** |
| - | | + | |
| - | */ | + | */ |
| - | jQuery(function () { | + | jQuery ( function |
| - | jQuery(' | + | jQuery ( ' |
| - | dateFormat: " | + | dateFormat : " |
| - | changeMonth: | + | changeMonth : true , |
| - | changeYear: true | + | changeYear : true |
| - | }); | + | } ) ; |
| </ | </ | ||
| - | ===== Bugs, Feature Requests and Patches | + | ===== Сообщения об ошибках, запросы на добавление новых функций и исправления. |
| + | |||
| + | Пожалуйста, | ||
| + | |||
| + | ===== Дополнения и Файлы===== | ||
| + | * [[https:// | ||
| + | * {{ : | ||
| - | Please submit bugs and feature requests in the [[https:// | ||
wiki/plugin/data.1768731050.txt.gz · Последнее изменение: — VladPolskiy
