====== Meta Plugin ====== ^ :!: [[experimental]] :!: ^ ---- plugin ---- description: Set Metadata. (previous authors: Esther Brunner) author : Gina Häußge, Michael Klier email : dokuwiki@chimeric.de type : syntax lastupdate : 2006-04-15 compatible : 2006-11-06 depends : conflicts : similar : tags : meta, experimental, maybe.broken ---- ^ Download | [[http://www.chimeric.de/_src/plugin-meta.tgz|plugin-meta.tgz]] | ===== Description ===== This [[plugins|plugin]] allows you to set [[discussion:metadata]] for a page. This is useful for overriding default [[DokuWiki]] metadata, for example if you want to display someone else than the user who pasted the text into the wiki as the author of a [[blog]] entry. ===== Syntax ===== | ''%%~~META:%%//key//=//value//%%~~%%'' | ^ ''//key//'' | the metadata element to set | required | ^ ''//value//'' | the metadata element content | required | You can set more than one element at once by using an ''&'' delimiter. Further, to set a child element, separate key and subkey with a space. Additional whitespace is allowed. Dates should be entered in the form ''YYYY-MM-DD hh:mm:ss''. Two dates with an arrow (''%%->%%'') in between are considered as a period. An example: ~~META: creator = Esther Brunner &date valid = 2006-04-15 -> 2006-10-15 ~~ ===== Data Structure ===== It is mandatory to use [[http://dublincore.org/documents/dces/|Dublin Core element names]] as keys for all metadata that might be interesting for external use. These are: ^ Element ^ Child Elements ^ Type ^ Comments ^ | title | --- | string | will be used for window title and links if ''$conf['useheading']'' is on; defaults to the first heading | | creator | --- | string | indicates the primary author of a page; defaults to the full name of the user who created the page | | subject | --- | string | used by the [[blog]] plugin / tag component: list of space separated tags; not set by default | | description | tableofcontents, abstract | array | tableofcontents is an array of the TOC items with keys ''hid'' (header ID), ''title'', ''type'' and ''level''; abstract is 250 to 500 char raw text from the beginning of the page used for the RSS feed | | publisher | --- | string | not used | | contributor | --- | array | a list of all users who have made non-minor contributions to the page; every item has the user ID as key and the full name as value | | date | created, valid, available, issued, modified | array | a timestamp (or an array of the timestamps ''start'' and ''end'' for a period); date created is filled with the creation date by default, date modified with the date of the last non-minor edit; the rest is not set by default | | type | --- | string | not set, but defaults to "text" when exported; recommended values are: collection, dataset, event, image, interactiveresource, movingimage, physicalobject, service, software, sound, stillimage or text | | format | --- | string | a MIME type is expected; not set, but defaults to "text/html" when exported | | identifier | --- | string | a unique ID of the page; not set, but defaults to the page ID when exported | | source | --- | string | not used | | language | --- | string | a two-letter language code is expected; not set, but defaults to the chosen language for DokuWiki when exported | | relation | isversionof, hasversion, isreplacedby, replaces, isrequiredby, requires, ispartof, haspart, isreferencedby, references, isformatof, hasformat, conformsto | array | each of the child elements can contain a list of pages that stand in the indicated relation to the current page; the page ID serves as key, the existence of the page as value; in references, DokuWiki keeps track of which pages are linked by the current page; haspart is used by the [[include]] plugin to list included pages; the rest is not set by default | | coverage | spatial, temporal | array | not used | | rights | accessrights, license | array | not set, but accessrights default to "public editable", "public viewable" or "private" with respect to current ACL settings; license defaults to the Creative Commons license if set | ===== Bugs ===== Please report bugs at the [[http://bugs.chimeric.de/index.php?project=19&do=index|Bug Tracker]]. ===== Further Resources ===== * [[http://darcs.chimeric.de/darcsweb.cgi?r=meta|Darcs Repository]] * [[http://dev.chimeric.de/codereference/nav.html?plugins/meta/index.html|Source code]] * [[http://bugs.chimeric.de/index.php?project=19&do=index|Bug Tracker]] ===== Discussion ===== This is quite nice. I'm thinking being able to set metadata on pages would be much more useful if combined with searching facilities to then display stuff based on those searches. > Sorry but this is completely out of the scope of this plugin. --- //[[chi@chimeric.de|Michael Klier]] 2008/04/19 22:08// Perfect plugin - almost :) It seems that the feed.php of dokuwiki does not care about the META Tag. Is this a bug or a feature? Secondly: wouldn't it be nice to be able to overwrite the "original" metadata of dokuwiki with the contens of the META Tag? Or is it out of scope? ====DublinCore and plugin limitations==== You should change "It is //recommended// to use [[http://dublincore.org/documents/dces/|Dublin Core element names]] as keys..." to something in the lines of "It is //mandatory// for keys of added metadata to be part of the set of allowed [[http://dublincore.org/documents/dces/|Dublin Core element names]]..."; this given that, as the DW metadata parser will only accept DublinCore keys and no custom keys, any uninformed attempt to add metadata to a page will fail miserably. I assume that's what has happenned in the comment above. You're right of course. I've changed it. --- //[[chi@chimeric.de|Michael Klier]] 2008/04/19 22:08// It's rather sad, as even through the plugin's syntax can be easily adapted to also accept ''http-equiv'' metadata (such as Refresh or Encoding), the DW parser itself will not allow it. Otherwise, thanks for this plugin. --- //This comment 2008-02-10 by ''ryan.chappelle'' at [[http://informatica.temuco.udelmar.cl/~lmachuca|his site]]// ==== Complications ==== Hi, I don't get the Plugin to work.[...].--- //This comment 2008-05-05 by ''david''//\\ \\ I found the Error myself. It was a outdated Template that I used. ;-)--- //This comment 2008-05-05 by ''david''// It did not work on my site (latest release - incognitek template), it did not change my pages ... How can I proceed to see what's wrong ? //This comment 2008-11-01 by ''Julien''//\\