devel:metadata
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
devel:metadata [2014-01-11 14:49] – [Metadata and Plugins] turnermm | devel:metadata [2023-02-28 07:43] (current) – Link to new dokuwiki repo saggi | ||
---|---|---|---|
Line 11: | Line 11: | ||
===== Metadata Renderer ===== | ===== Metadata Renderer ===== | ||
- | Info in the '' | + | Info in the '' |
==== Data Structure ==== | ==== Data Structure ==== | ||
Line 17: | Line 17: | ||
Currently, the following metadata is saved by the core metadata renderer: | Currently, the following metadata is saved by the core metadata renderer: | ||
- | * ' | + | * ''title'' -- string, first heading |
- | * ' | + | * '' |
- | * ' | + | * ''user'' -- string, the login name of the user who created the page |
- | * ' | + | * '' |
- | * ' | + | * '' |
- | * ' | + | * '' |
- | * ' | + | * '' |
- | * ' | + | * ''date'' -- array |
- | * ' | + | * '' |
- | * ' | + | * '' |
- | * ' | + | * ''valid'' |
- | * ' | + | * ''age'' -- seconds, period in seconds before the page should be refreshed (used by ' |
- | * ' | + | * '' |
- | * ' | + | * ''date'' -- timestamp, date of the last change |
- | * ' | + | * ''ip'' -- ip of the user editing |
- | * ' | + | * ''type'' -- type of the edit (C create, E edit, e minor edit, D delete, R revert) |
- | * ' | + | * ''id'' -- id of the page |
- | * ' | + | * ''user'' -- username of the user editing |
- | * ' | + | * ''sum'' -- summary of the editor |
- | * ' | + | * ''extra'' -- extra data, used for storing the revision (timestamp) in the case of a revert |
- | * ' | + | * '' |
- | * ' | + | * '' |
- | * ' | + | * '' |
- | * ' | + | * '' |
- | * ' | + | * '' |
- | * ' | + | * '' |
- | * ' | + | * '' |
- | * ' | + | * ''cache'' -- boolean, if the cache may be used |
+ | * ''toc'' -- boolean, if the toc shall be displayed | ||
Additionally, | Additionally, | ||
- | * ' | + | * '' |
- | * ' | + | * '' |
- | * ' | + | * '' |
- | * ' | + | * '' |
- | * ' | + | * '' |
+ | * ''type'' -- string, ' | ||
+ | * ''geo'' -- array, list of geographic tags ([[plugin: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
It's recommended to use keys from the [[http:// | It's recommended to use keys from the [[http:// | ||
+ | |||
+ | For plugin internal data it is recommended to store your keys under the '' | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
This data is stored in an associative array with two keys: ' | This data is stored in an associative array with two keys: ' | ||
+ | |||
==== Metadata Persistence ==== | ==== Metadata Persistence ==== | ||
Line 68: | Line 84: | ||
==== Running of metadata rendering ==== | ==== Running of metadata rendering ==== | ||
- | The metadata rendering is only started by the '' | + | The metadata rendering is only started by the '' |
+ | |||
+ | The metadata | ||
<code php> | <code php> | ||
- | //capture only the first few sections, is switched off by eg. section metarenderer | + | // capture only the first few sections. |
+ | // Is switched off as well by eg. section metarenderer | ||
if ($this-> | if ($this-> | ||
if($linktitle) { | if($linktitle) { | ||
Line 79: | Line 98: | ||
} | } | ||
</ | </ | ||
- | The timing is thus not equal to xhtml renderer, but depends on render flags given to the '' | + | |
+ | The timing is thus not equal to xhtml renderer, but depends on render flags given to the '' | ||
==== Metadata and Plugins ==== | ==== Metadata and Plugins ==== | ||
Line 113: | Line 133: | ||
* '' | * '' | ||
* '' | * '' | ||
- | * '' | + | * '' |
* '' | * '' | ||
* '' | * '' | ||
Line 139: | Line 159: | ||
Example for getting the ids of all pages that link to a certain page: <code php> | Example for getting the ids of all pages that link to a certain page: <code php> | ||
- | For more advanced queries (like getting all values stored for a certain metadata property) can be needed to access the index files directly using '' | + | For more advanced queries (like getting all values stored for a certain metadata property) can be needed to access the index files directly using '' |
The [[plugin: | The [[plugin: |
devel/metadata.1389448158.txt.gz · Last modified: 2014-01-11 14:49 by turnermm