aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/TidypicsImage.php4
-rw-r--r--pages/photos/image/thumbnail.php6
-rw-r--r--views/default/js/photos/tidypics.php3
-rw-r--r--views/default/object/image/full.php5
4 files changed, 16 insertions, 2 deletions
diff --git a/classes/TidypicsImage.php b/classes/TidypicsImage.php
index aec48b474..49585fd0c 100644
--- a/classes/TidypicsImage.php
+++ b/classes/TidypicsImage.php
@@ -307,6 +307,10 @@ class TidypicsImage extends ElggFile {
return $file->grabFile();
}
+ public function getImage() {
+ return $this->grabFile();
+ }
+
/**
* Extract EXIF Data from image
*
diff --git a/pages/photos/image/thumbnail.php b/pages/photos/image/thumbnail.php
index ae07f2706..ed39c6169 100644
--- a/pages/photos/image/thumbnail.php
+++ b/pages/photos/image/thumbnail.php
@@ -13,7 +13,11 @@ if (!$image) {
// @todo
}
-$contents = $image->getThumbnail($size);
+if ($size == 'master') {
+ $contents = $image->getImage();
+} else {
+ $contents = $image->getThumbnail($size);
+}
if (!$contents) {
forward("mod/tidypics/graphics/image_error_$size");
}
diff --git a/views/default/js/photos/tidypics.php b/views/default/js/photos/tidypics.php
index 509d2116a..896192eea 100644
--- a/views/default/js/photos/tidypics.php
+++ b/views/default/js/photos/tidypics.php
@@ -8,6 +8,9 @@
elgg.provide('elgg.tidypics');
elgg.tidypics.init = function() {
+
+ $(".tidypics-lightbox").fancybox({'type': 'image'});
+
$("#tidypics-sort").sortable({
opacity: 0.7,
revert: true,
diff --git a/views/default/object/image/full.php b/views/default/object/image/full.php
index 48ed40876..e3a2c7003 100644
--- a/views/default/object/image/full.php
+++ b/views/default/object/image/full.php
@@ -11,9 +11,12 @@
$image = $photo = $vars['entity'];
$img = elgg_view_entity_icon($image, 'large', array(
- 'href' => false,
+ 'href' => $image->getIconURL('master'),
'img_class' => 'tidypics-photo',
+ 'link_class' => 'tidypics-lightbox',
));
+elgg_load_js('lightbox');
+elgg_load_css('lightbox');
$owner_link = elgg_view('output/url', array(
'href' => "photos/owner/" . $photo->getOwnerEntity()->username,