aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/photos/sidebar.php12
-rw-r--r--views/default/photos/sidebar/exif.php20
-rw-r--r--views/default/tidypics/exif.php14
3 files changed, 32 insertions, 14 deletions
diff --git a/views/default/photos/sidebar.php b/views/default/photos/sidebar.php
new file mode 100644
index 000000000..4c0feb72c
--- /dev/null
+++ b/views/default/photos/sidebar.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Sidebar view
+ */
+
+$page = elgg_extract('page', $vars);
+$image = elgg_extract('image', $vars);
+if ($image && $page == 'view') {
+ if (elgg_get_plugin_setting('exif', 'tidypics')) {
+ echo elgg_view('photos/sidebar/exif', $vars);
+ }
+}
diff --git a/views/default/photos/sidebar/exif.php b/views/default/photos/sidebar/exif.php
new file mode 100644
index 000000000..1d4444b53
--- /dev/null
+++ b/views/default/photos/sidebar/exif.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * EXIF sidebar module
+ */
+
+$image = $vars['image'];
+
+elgg_load_library('tidypics:exif');
+
+$exif = tp_exif_formatted($image);
+if ($exif) {
+ $title = "EXIF";
+ $body = '<table class="elgg-table elgg-table-alt">';
+ foreach ($exif as $key => $value) {
+ $body .= "<tr><td>$key</td><td>$value</td></tr>";
+ }
+ $body .= '</table>';
+
+ echo elgg_view_module('aside', $title, $body);
+}
diff --git a/views/default/tidypics/exif.php b/views/default/tidypics/exif.php
deleted file mode 100644
index f21e2eff7..000000000
--- a/views/default/tidypics/exif.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-
-$guid = $vars['guid'];
-
-$exif = tp_exif_formatted($guid);
-if ($exif) {
- echo '<div id="tidypics_exif">';
- foreach ($exif as $name => $value) {
- echo $name . ': ' . $value . '<br />';
- }
- echo '</div>';
-}
-
-?> \ No newline at end of file