plugin:data
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:data [2016-11-26 01:23] – Add new section for customisations (hacks) SFITCS | plugin:data [2024-02-01 23:50] (current) – version upped andi | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
---- plugin ---- | ---- plugin ---- | ||
Line 6: | Line 6: | ||
email : andi@splitbrain.org | email : andi@splitbrain.org | ||
type : syntax, action, helper | type : syntax, action, helper | ||
- | lastupdate : 2016-03-11 | + | lastupdate : 2024-01-30 |
- | compatible : Elenor Of Tsort, Detritus, Hrun, Ponder Stibbons, Binky, Weatherwax, Adora Belle | + | compatible : Hogfather, Greebo, Frusterick Manners, |
depends | depends | ||
conflicts | conflicts | ||
Line 22: | Line 22: | ||
:!: You might want to consider using the spiritual successor to this plugin: [[plugin: | :!: You might want to consider using the spiritual successor to this plugin: [[plugin: | ||
+ | |||
===== Download and Installation ===== | ===== Download and Installation ===== | ||
- | Install | + | Search and install |
==== Changes ==== | ==== Changes ==== | ||
Line 149: | Line 150: | ||
For filtering, multiple comparators are possible: | For filtering, multiple comparators are possible: | ||
- | ^ Comparator | + | ^ Comparator |
- | | '' | + | | '' |
- | | '' | + | | '' |
- | | ''<'' | + | | ''<'' |
- | | '' | + | | '' |
- | | ''>'' | + | | ''>'' |
- | | '' | + | | '' |
- | | '' | + | | '' |
- | | '' | + | | '' |
- | | '' | + | | '' |
- | | '' | + | | '' |
You may use the special variables in a filter to make it match against current logged in user or current date e.g. '' | You may use the special variables in a filter to make it match against current logged in user or current date e.g. '' | ||
Line 306: | Line 307: | ||
</ | </ | ||
- | And in Admin -> Page Aliases ('' | + | And in Admin -> Data Plugin: Field Aliases ('' |
^ Type Alias ^ Type ^ Data Prefix ^ Data Postfix ^ Valid values | | ^ Type Alias ^ Type ^ Data Prefix ^ Data Postfix ^ Valid values | | ||
Line 346: | Line 347: | ||
=== vCard type alias with vCard Plugin === | === vCard type alias with vCard Plugin === | ||
- | Setup for the [[plugin: | + | |
+ | Setup for the [[plugin: | ||
Line 401: | Line 403: | ||
===== Translation Support ===== | ===== 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. | + | 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, | To create fieldname translations, | ||
Line 413: | Line 415: | ||
Fieldnames are to be given without their type. So it's '' | Fieldnames are to be given without their type. So it's '' | ||
- | After creating or modifiying data-plugin.php file, please update wiki configuration to refresh cache '' | + | After creating or modifiying data-plugin.php file, please update wiki configuration to refresh cache '' |
===== Missing Features ===== | ===== Missing Features ===== | ||
Line 419: | Line 421: | ||
* more control options: | * more control options: | ||
* attribute list (similar to tag cloud but as a simple list) | * attribute list (similar to tag cloud but as a simple list) | ||
- | * search field -- See [[plugin: | + | * search field -- see [[plugin: |
* **better documentation, | * **better documentation, | ||
* Please provide suggestions for which pieces need more attention or where you do not understand stuff. Thanks. | * Please provide suggestions for which pieces need more attention or where you do not understand stuff. Thanks. | ||
Line 437: | Line 439: | ||
* This plugin may be seen in action on this wiki in the [[: | * This plugin may be seen in action on this wiki in the [[: | ||
* Look for the '' | * Look for the '' | ||
- | * and for a '' | + | * and for a '' |
* Very interesting and organized wiki setup: [[http:// | * Very interesting and organized wiki setup: [[http:// | ||
* [[plugin: | * [[plugin: | ||
Line 461: | Line 463: | ||
The [[plugin: | The [[plugin: | ||
- | ==== How do you filter empty fields/ | + | ==== 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 ? | + | 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 | + | e.g. |
< | < | ||
Line 477: | Line 479: | ||
</ | </ | ||
- | and if the query is : | + | and if the query is: |
< | < | ||
---- datatable ---- | ---- datatable ---- | ||
Line 494: | Line 496: | ||
----</ | ----</ | ||
| --- [[user> | | --- [[user> | ||
+ | |||
+ | ==== Why don't my variables/ | ||
+ | |||
+ | DokuWiki calls [[phpfn> | ||
+ | |||
+ | ==== 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' | ||
+ | |||
+ | ---- | ||
===== Customisations ===== | ===== Customisations ===== | ||
- | **Important!** These are //hacks// - there is no guarantee they' | + | **Important!** These are // |
If it breaks you get to keep the pieces. :-) | If it breaks you get to keep the pieces. :-) | ||
- | ==== Why don't my variables/ | + | ==== Customise the Date Format |
- | Dokuwiki calls [[http://php.net/ | + | **NOTE:** The configuration setting for the PHP strftime function in '' |
- | ==== Other Questions ==== | + | To change the default date format from '' |
- | If you still have questions, search the forum and if it hasn't been asked before ask your question there. Please leave bugreports on Githubs issuetracker. | + | Change this: |
+ | <code php plugins/ | ||
+ | /** | ||
+ | * Replace placeholders in sql | ||
+ | */ | ||
+ | function _replacePlaceholdersInSQL(& | ||
+ | global $USERINFO; | ||
+ | // allow current user name in filter: | ||
+ | $data[' | ||
+ | $data[' | ||
+ | // allow current date in filter: | ||
+ | $data[' | ||
+ | |||
+ | // language filter | ||
+ | $data[' | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | to this: | ||
+ | <code php plugins/ | ||
+ | /** | ||
+ | * Replace placeholders in sql | ||
+ | */ | ||
+ | function _replacePlaceholdersInSQL(& | ||
+ | global $USERINFO; | ||
+ | // allow current user name in filter: | ||
+ | $data[' | ||
+ | $data[' | ||
+ | // allow current date in filter: | ||
+ | $data[' | ||
+ | |||
+ | // language filter | ||
+ | $data[' | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | and change this: | ||
+ | <code php plugins/ | ||
+ | switch($type) { | ||
+ | case ' | ||
+ | | ||
+ | return sprintf(' | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | to this: | ||
+ | <code php plugins/ | ||
+ | switch($type) { | ||
+ | case ' | ||
+ | if(preg_match('/ | ||
+ | return sprintf(' | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | and change this: | ||
+ | <code javascript plugins/ | ||
+ | /** | ||
+ | * Init datepicker for all date fields | ||
+ | */ | ||
+ | jQuery(function () { | ||
+ | jQuery(' | ||
+ | dateFormat: " | ||
+ | changeMonth: | ||
+ | changeYear: true | ||
+ | }); | ||
+ | </ | ||
+ | |||
+ | to this: | ||
+ | <code javascript plugins/ | ||
+ | /** | ||
+ | * Init datepicker for all date fields | ||
+ | */ | ||
+ | jQuery(function () { | ||
+ | jQuery(' | ||
+ | dateFormat: " | ||
+ | changeMonth: | ||
+ | changeYear: true | ||
+ | }); | ||
+ | </ | ||
===== Bugs, Feature Requests and Patches ===== | ===== Bugs, Feature Requests and Patches ===== | ||
- | Please submit bugs and feature requests in the [[https:// | + | Please submit bugs and feature requests in the [[https:// |
plugin/data.1480119839.txt.gz · Last modified: 2016-11-26 01:23 by SFITCS