From 14353296bbf53a370646962d9d9d86ecda72c0bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Thu, 30 Mar 2017 16:58:17 +0200 Subject: [PATCH 01/13] Copy'n'paste php boilerplate to detail.php We need most of the html/php from the main.php for this view as well. For lack of a better alternative I copied the relevant parts to this file. At some point we should consider if we either want to extend with features or get rid of the detail.php Known Issues ------------ - [ ] the pagetools are still wrong. These should be replaced once the new pagetool-mechanism has been implemented (see SPR-837) SPR-814 --- detail.php | 174 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 169 insertions(+), 5 deletions(-) diff --git a/detail.php b/detail.php index f010711..6a1fd9e 100755 --- a/detail.php +++ b/detail.php @@ -28,17 +28,141 @@ header('X-UA-Compatible: IE=edge,chrome=1'); - -
+ +
+ + + +
+ + +
+
+
+
+
+ + +

+ + +
+
+
+
+
+ + + +
+
+
+
+ +
+ +
+ + + +
+ +
+ +
+
+
+
+ +
+
+
+
+ + + +
+
+
+
+ + +
+
+
+
+
+ +
+ +
+

-
+
@@ -80,14 +204,54 @@ header('X-UA-Compatible: IE=edge,chrome=1');
-
-


+
+
+
+
+
+ +
+
+ + + + + + + + + +
+ +
+ From f2a0ea7b7df1ef33f18e553628b9b3af76a3d9f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Fri, 31 Mar 2017 13:32:20 +0200 Subject: [PATCH 02/13] Show OSM iframe if image is geotagged If the spatialhelper and the geophp plugins are available, then show a iframe from open street map with the location of the photo. SPR-814 --- detail.php | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/detail.php b/detail.php index 6a1fd9e..70ddd7c 100755 --- a/detail.php +++ b/detail.php @@ -169,7 +169,30 @@ header('X-UA-Compatible: IE=edge,chrome=1');

- + getCoordsFromExif($IMG); + if ($point) { + $long = $point->getX(); + $lat = $point->getY(); + $latShort = round($lat,3); + $longShort = round($long,3); + + $hrefOSM = "https://www.openstreetmap.org/?mlat=$lat&mlon=$long#map=18/$lat/$long"; + $srcOSM = 'https://www.openstreetmap.org/export/embed.html?bbox='.($long-0.004).','.($lat-0.002).','.($long+0.004).','.($lat+0.002).'&layer=mapnik&marker='.$lat.','.$long; + echo '
'; + echo '
OSM:
'; + echo '
View Larger Map'; + echo '
'; + echo '
'; + } + } + ?>
Date: Mon, 10 Apr 2017 13:43:43 +0200 Subject: [PATCH 03/13] Adjust to changed main html --- detail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detail.php b/detail.php index 70ddd7c..5cce646 100755 --- a/detail.php +++ b/detail.php @@ -117,7 +117,7 @@ header('X-UA-Compatible: IE=edge,chrome=1');
@@ -227,11 +226,6 @@ header('X-UA-Compatible: IE=edge,chrome=1');
-

-
- ← -

-
From 6f352bafb27d6b8a6819ca65a04198c78d30d566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Mon, 10 Apr 2017 13:49:08 +0200 Subject: [PATCH 05/13] function tpl_img_meta reliably exists --- detail.php | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/detail.php b/detail.php index 9aa119e..fdd2cbc 100755 --- a/detail.php +++ b/detail.php @@ -167,7 +167,6 @@ header('X-UA-Compatible: IE=edge,chrome=1');

- - -
- $tag){ - $t = array(); - if (!empty($tag[0])) { - $t = array($tag[0]); - } - if(is_array($tag[3])) { - $t = array_merge($t,$tag[3]); - } - $value = tpl_img_getTag($t); - if ($value) { - echo '
'.$lang[$tag[1]].':
'; - if ($tag[2] == 'date') { - echo dformat($value); - } else { - echo hsc($value); - } - echo '
'; - } - } - ?> -
-
From ecb77cc51cadc644f63b3cf5e3c2a7d1fb3c45a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Mon, 10 Apr 2017 13:49:54 +0200 Subject: [PATCH 06/13] Fix indent and more style-issues in details.php --- detail.php | 103 ++++++++++++++++++++++++++++------------------------- 1 file changed, 55 insertions(+), 48 deletions(-) diff --git a/detail.php b/detail.php index fdd2cbc..8c87871 100755 --- a/detail.php +++ b/detail.php @@ -9,21 +9,25 @@ */ // must be run from within DokuWiki -if (!defined('DOKU_INC')) die(); +if (!defined('DOKU_INC')) { + die(); +} header('X-UA-Compatible: IE=edge,chrome=1'); ?> - + - + - <?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?> - [<?php echo strip_tags($conf['title'])?>] + <?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG)) ?> + [<?php echo strip_tags($conf['title']) ?>] - - - + + + @@ -43,7 +47,7 @@ header('X-UA-Compatible: IE=edge,chrome=1');
- - +
- @@ -201,11 +209,10 @@ header('X-UA-Compatible: IE=edge,chrome=1'); -
+
-