1<!DOCTYPE html>
2<?php
3/**
4 * DokuWiki Image Detail Template
5 *
6 * This is the template for displaying image details
7 *
8 * You should leave the doctype at the very top - It should
9 * always be the very first line of a document.
10 *
11 * @link   http://wiki.splitbrain.org/wiki:tpl:templates
12 * @author Andreas Gohr <andi@splitbrain.org>
13 */
14header ( 'X-UA-Compatible: IE = edge, chrome = 1' );
15
16$ilinks = array (
17	array ( '/'. $conf [ "lang" ] . '/start',		tpl_getLang ( 'start' ),	'_self' ),
18	array ( '/'. $conf [ "lang" ] . '/menu',		tpl_getLang ( 'menu' ),		'_self' ),
19	array ( '/'. $conf [ "lang" ] . '/news/index',	tpl_getLang ( 'news' ),		'_self' ),
20	array ( '/'. $conf [ "lang" ] . '/wiki/index',	tpl_getLang ( 'helproom' ),	'_blank' ),
21	array ( '//discord.gg/T8p6M4Q',					tpl_getLang ( 'chat' ),		'_blank' ),
22	array ( '//app.comicslate.org/',				'Mobile App',				'_blank' ),
23);
24
25$t2 = "\n\t\t"; $t3 = "\n\t\t\t"; $t4 = "\n\t\t\t\t"; $t5 = "\n\t\t\t\t\t"; $t6 = "\n\t\t\t\t\t\t";
26
27$apps = "\t\t\t\t" . '<div class = "apps">' .
28$t5 . '<a href = "//play.google.com/store/apps/details?id=org.dasfoo.comicslate&amp;utm_source=comicslate-org" target = "_blank">' .
29$t6 . '<img src = "' . DOKU_TPL . 'images/googleapp_optim.svg" alt = "Get it on Google Play">' .
30$t5 . '</a>' .
31$t5 . '<a href = "//apps.apple.com/ru/app/comicslate/id1485894069" target = "_blank">' .
32$t6 . '<img src = "' . DOKU_TPL . 'images/appstore_optim.svg" alt = "Download on the App Store">' .
33$t5 . '</a>' .
34$t4 . '</div>' . $t4;
35
36$socbut = array (
37	array ( '/feed.php', tpl_getLang ( 'RSS' ), 'rss' ),
38	array ( '/feed.php?onlynewpages=1', tpl_getLang ( 'RSS' ) . ' (' . tpl_getLang ( 'RSSnew' ) . ')', 'rss' ),
39	array ( '//patreon.com/comicslate', 'Patreon', 'patreon' ),
40	array ( '//discord.gg/T8p6M4Q', 'Discord', 'discord' ),
41	array ( '//t.me/comicslate', 'Telegram', 'telegram' ),
42	array ( '//www.reddit.com/r/Comicslate', 'Reddit', 'reddit' ),
43	array ( '//rainbow-spike.tumblr.com', 'Tumblr', 'tumblr' ),
44	array ( '//facebook.com/groups/comicslate', 'Facebook', 'facebook' ),
45	array ( '//twitter.com/Rainbow_Spike', 'Twitter', 'twitter' ),
46	array ( '//vk.com/comicslate', 'VKontakte', 'vkontakte' ),
47	array ( '/feed.php?mode=recent&amp;ns=' . $INFO [ 'namespace' ], tpl_getLang ( 'RSSpart' ), 'rss' ),
48	array ( '/feed.php?mode=recent&amp;ns=' . $INFO [ 'namespace' ] . '&amp;onlynewpages=1', tpl_getLang ( 'RSSpart' ) . ' (' . tpl_getLang ( 'RSSnew' ) . ')', 'rss' )
49);
50
51
52
53echo "\n" . '<html xml:lang = "' . $conf [ "lang" ] . '" lang = "' . $conf [ "lang" ] . '" dir = "' . $lang [ "direction" ] . '">' .
54
55"\n\t" . '<head>' . // HEAD
56$t2 . '<meta charset = "utf-8" />' .
57$t2 . '<title>' .
58$t3 ; tpl_pagetitle ( ); echo ' [Comicslate]' .
59$t2 . '</title>' .
60$t2 . '<meta name = "viewport" content = "width = device-width, initial-scale = 1" />' .
61$t2 . tpl_favicon ( array ( 'favicon', 'mobile' ) ) .
62$t2; tpl_metaheaders ( );
63echo "\n\t" . '</head>' .
64
65"\n\t" . '<body>' . // BODY
66$t2 . '<div class = "dokuwiki lang-' . $conf [ "lang" ] . '">' .
67
68$t3 . '<div id="head">' .
69$t4 . '<div id="logo">' . // Logo
70$t5 . '<a id="inlogo" href = "' . $ilinks [ 0 ] [ 0 ] . '" title="' . $ilinks [ 0 ] [ 1 ] . '"></a>' .
71$t4 . '</div>' .
72$t4 . '<div id="menu">' .
73$t5 . '<header>' . // Topline
74$t6 . '<span id="upmenu">';
75for ( $i = 1; $i <= count ( $ilinks ) - 1; $i++ ) {
76	echo $t6 . "\t" . '<a href = "' . $ilinks [ $i ] [ 0 ] . '" target = ' . $ilinks [ $i ] [ 2 ] . '>' . $ilinks [ $i ] [ 1 ] . '</a>';
77};
78echo $t6 . '</span>' .
79$t6 . '<div id="search">' . // Search
80$t6 . "\t" ; tpl_searchform ( );
81echo $t6 . '</div>' .
82$t5 . '</header>' .
83$t5 . '<nav>' . $trans . $t5 . '</nav>' . // MENU2
84$t4 . '</div>' .
85$t3 . '</div>' .
86
87tpl_flush ( );
88echo $t3 . '<article id = "dokuwiki__detail">' . // PAGE
89"\n" . $apps; // App buttons top
90
91if ( $ERROR ) {
92	print $ERROR;
93} else {
94	echo $t4 .'<h1>' . hsc ( tpl_img_getTag ( "IPTC.Headline", $IMG ) ) . '</h1>' .
95	$t4 . '<div class = "img_big">' .
96	$t5; tpl_img ( 900, 700 );
97	echo $t5 . '<p class = "img_caption">';
98	print nl2br (
99		hsc (
100			tpl_img_getTag (
101				array (
102					"IPTC.Caption",
103					"EXIF.UserComment",
104					"EXIF.TIFFImageDescription",
105					"EXIF.TIFFUserComment"
106				)
107			)
108		)
109	); echo $t5 . '</p>' .
110	$t4 . '</div>' .
111	$t4 . '<div class = "img_detail">' .
112	$t5 . '<p id = "back">&larr;' . $lang["img_backto"]; tpl_pagelink ( $ID ); echo '</p>' .
113	$t5 . '<dl class="img_tags">';
114
115	$t = tpl_img_getTag ( 'Date.EarliestTime' );
116	if ( $t ) {
117		print $t6 . '<dt>' . $lang['img_date'] . '</dt>' .
118		$t6 . '<dd>' . date ( $conf['dformat1'], $t ) . '</dd>';
119	}
120	$t = tpl_img_getTag ( 'File.Name' );
121	if ( $t ) {
122		print $t6 . '<dt>' . $lang['img_fname'] . '</dt>' .
123		$t6 . '<dd>' . hsc ( $t ) . '</dd>';
124	}
125
126	$t = tpl_img_getTag (
127		array (
128			'Iptc.Byline',
129			'Exif.TIFFArtist',
130			'Exif.Artist',
131			'Iptc.Credit'
132		)
133	);
134	if ( $t ) {
135		print $t6 . '<dt>' . $lang['img_artist'] . '</dt>' .
136		$t6 . '<dd>' . hsc ( $t ) . '</dd>';
137	}
138
139	$t = tpl_img_getTag (
140		array (
141			'Iptc.CopyrightNotice',
142			'Exif.TIFFCopyright',
143			'Exif.Copyright'
144		)
145	);
146	if ( $t ) {
147		print $t6 . '<dt>' . $lang['img_copyr'] . '</dt>' .
148		$t6 . '<dd>' . hsc ( $t ) . '</dd>';
149	}
150
151	$t = tpl_img_getTag ( 'File.Format' );
152	if ( $t ) {
153		print $t6 . '<dt>' . $lang['img_format'] . '</dt>' .
154		$t6 . '<dd>' . hsc ( $t ) . '</dd>';
155	}
156
157	$t = tpl_img_getTag ( 'File.NiceSize' );
158	if ( $t ) {
159		print $t6 . '<dt>' . $lang['img_fsize'] . '</dt>' .
160		$t6 . '<dd>' . hsc ( $t ) . '</dd>';
161	}
162
163	$t = tpl_img_getTag ( 'Simple.Camera' );
164	if ( $t ) {
165		print $t6 . '<dt>' . $lang['img_camera'] . '</dt>' .
166		$t6 . '<dd>' . hsc ( $t ) . '</dd>';
167	}
168
169	$t = tpl_img_getTag (
170		array (
171			'IPTC.Keywords',
172			'IPTC.Category'
173		)
174	);
175	if ( $t ) {
176		print $t6 . '<dt>' . $lang['img_keywords'] . '</dt>' .
177		$t6 . '<dd>' . hsc ( $t ) . '</dd>';
178	}
179
180	echo $t5 . '</dl>';
181	// dbg ( tpl_img_getTag ( 'Simple.Raw' ) ); // Comment in for Debug
182	echo $t4 . '</div>';
183};
184echo $t3 . '</article>';
185tpl_flush ( );
186
187echo $t3 . '<noindex>' .
188$t4 . '<aside id = "pagetools">' . // SIDEBAR
189$t5 . '<ul>' .
190$t6 . ( new \dokuwiki\Menu\PageMenu ( ) ) -> getListItems ( ) .
191$t5 . '</ul>' .
192$t4 . '</aside>' .
193$t3 . '</noindex>' .
194
195$t3 . '<footer>' . // FOOTER
196$t4 . '<noindex>';
197
198if ( $conf [ 'breadcrumbs' ] ) { // Breadcrumbs
199	echo $t5 . '<div class = "breadcrumbs">';
200	tpl_breadcrumbs ( );
201	echo '</div>';
202};
203
204echo $t5 . '<div class = "social">'; // Social
205for ( $i = 0; $i <= count ( $socbut ) - 1; $i++ ) {
206	echo $t6 . '<a href = "' . $socbut [ $i ] [ 0 ] . '" class = "media ' . $socbut [ $i ] [ 2 ] . '" title = "' . $socbut [ $i ] [ 1 ] . '" target = "_blank"></a>';
207};
208echo $t5 . '</div>' .
209
210"\n" . $apps . "\t"; // App buttons bottom
211
212if ( $INFO [ 'ismanager' ] ) { // Pageinfo
213	echo $t5 . '<div class = "pageinfo">' .
214	$t6; tpl_pageinfo ( );
215	echo $t5 . '</div>';
216};
217
218if ( !empty ( $_SERVER['REMOTE_USER'] ) ) { // Userinfo
219	echo $t5 . '<div class = "user">' .
220	$t6; tpl_userinfo ( );
221	echo $t5 . '</div>';
222};
223
224echo $t4 . '</noindex>' .
225$t3 . '</footer>' .
226
227$t2 . '</div>' .
228"\n\t" . '</body>' .
229"\n" . '</html>';
230