aboutsummaryrefslogtreecommitdiff
path: root/views/default/lightbox
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-15 15:04:14 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-15 15:04:14 -0300
commit66dd3f3f5f14bb0ba6d2c7ef83b5b612d5ee2e30 (patch)
tree6002cbd9db40b15b4e67a67d5669644f86e4dbde /views/default/lightbox
downloadelgg-66dd3f3f5f14bb0ba6d2c7ef83b5b612d5ee2e30.tar.gz
elgg-66dd3f3f5f14bb0ba6d2c7ef83b5b612d5ee2e30.tar.bz2
Squashed 'mod/lightbox/' content from commit a83b8d8
git-subtree-dir: mod/lightbox git-subtree-split: a83b8d89691c31b4568f47790fb40d0bc962aca5
Diffstat (limited to 'views/default/lightbox')
-rw-r--r--views/default/lightbox/image.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/views/default/lightbox/image.php b/views/default/lightbox/image.php
new file mode 100644
index 000000000..28d82e2be
--- /dev/null
+++ b/views/default/lightbox/image.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Display an image
+ */
+
+$image_url = elgg_get_site_url() . "mod/lightbox/thumbnail.php?guid={$vars['entity']->getGUID()}&size=large";
+$image_url = elgg_format_url($image_url);
+$download_url = elgg_get_site_url() . "mod/lightbox/thumbnail.php?guid={$vars['entity']->getGUID()}&size=full";
+
+if ($vars['full_view'] && $smallthumb = $vars['entity']->smallthumb) {
+ echo <<<HTML
+ <div class="file-photo">
+ <a href="$download_url"><img class="elgg-photo" src="$image_url" /></a>
+ </div>
+HTML;
+}