xref: /dokuwiki/conf/mediameta.php (revision 88a71175e3de9e3ad8b20ca9eb710aaf773cb788)
1<?php
2/**
3 * This configures which meta data will be editable through
4 * the media manager. Each field of the array is an array with the
5 * following contents:
6 *   fieldname - Where data will be saved (EXIF or IPTC field)
7 *   label     - key to lookup in the $lang var, if not found printed as is
8 *   htmltype  - 'text' or 'textarea'
9 *   lookups   - array additional fields to lookup the data (EXIF or IPTC fields)
10 *
11 * The fields are not ordered continously to make inserting additional items
12 * in between simpler.
13 *
14 * This is a PHP snippet, so PHP syntax applies.
15 *
16 * Note: $fields is not a global variable and will not be available to any
17 *       other functions or templates later
18 *
19 * You may extend or overwrite this variable in a optional
20 * conf/mediameta.local.php file
21 *
22 * For a list of available EXIF/IPTC fields refer to
23 * http://www.dokuwiki.org/devel:templates:detail.php
24 */
25
26
27$fields = array(
28    10 => array('Iptc.Headline',
29                'img_title',
30                'text'),
31
32    20 => array('Iptc.Caption',
33                'img_caption',
34                'textarea',
35                array('Exif.UserComment',
36                      'Exif.TIFFImageDescription',
37                      'Exif.TIFFUserComment')),
38
39    30 => array('Iptc.Byline',
40                'img_artist',
41                'text',
42                array('Exif.TIFFArtist',
43                      'Exif.Artist',
44                      'Iptc.Credit')),
45
46    40 => array('Iptc.CopyrightNotice',
47                'img_copyr',
48                'text',
49                array('Exif.TIFFCopyright',
50                      'Exif.Copyright')),
51
52    50 => array('Iptc.Keywords',
53                'img_keywords',
54                'text',
55                array('Exif.Category')),
56);
57
58
59/**
60 * This configures which meta data will be shown in details view
61 * of the media manager. Each field of the array is an array with the
62 * following contents:
63 *   fieldname - Where data will be saved (EXIF or IPTC fields)
64 *   label     - key to lookup in the $lang var, if not found printed as is
65 *   fieldtype - 'text' or 'date'
66 */
67$tags = array(
68    array('simple.title','img_title','text'),
69    array('Date.EarliestTime','img_date','date'),
70    array('File.Name','img_fname','text'),
71    array(array('Iptc.Byline','Exif.TIFFArtist','Exif.Artist','Iptc.Credit'),'img_artist','text'),
72    array(array('Iptc.CopyrightNotice','Exif.TIFFCopyright','Exif.Copyright'),'img_copyr','text'),
73    array('File.Format','img_format','text'),
74    array('File.NiceSize','img_fsize','text'),
75    array('File.Width','img_width','text'),
76    array('File.Height','img_height','text'),
77    array('Simple.Camera','img_camera','text'),
78    array(array('IPTC.Keywords','IPTC.Category','xmp.dc:subject'),'img_keywords','text')
79);
80