wiki:plugin:data
Различия
Показаны различия между двумя версиями страницы.
| Предыдущая версия справа и слеваПредыдущая версияСледующая версия | Предыдущая версия | ||
| wiki:plugin:data [2026/01/18 14:17] – [Как обновить данные?] VladPolskiy | wiki:plugin:data [2026/01/18 14:32] (текущий) – [Bugs, Feature Requests and Patches] VladPolskiy | ||
|---|---|---|---|
| Строка 462: | Строка 462: | ||
| Разумеется, | Разумеется, | ||
| - | ==== What is the difference between | + | ==== В чём разница между плагином |
| - | The [[plugin: | + | Плагин |
| - | ==== 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. | + | например |
| < | < | ||
| Строка 482: | Строка 482: | ||
| </ | </ | ||
| - | and if the query is: | + | и если запрос выглядит так: |
| < | < | ||
| ---- datatable ---- | ---- datatable ---- | ||
| Строка 490: | Строка 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% | ||
| Строка 500: | Строка 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.1768735063.txt.gz · Последнее изменение: — VladPolskiy
