From 048c1b586989caa3a8bd0b11ad19442d919dbd67 Mon Sep 17 00:00:00 2001 From: Sem Date: Wed, 1 Aug 2012 13:52:51 +0200 Subject: Removed slideshow from plugin. --- start.php | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'start.php') diff --git a/start.php b/start.php index 1e851b8f3..1b487321d 100644 --- a/start.php +++ b/start.php @@ -45,7 +45,6 @@ function tidypics_init() { elgg_register_simplecache_view('js/photos/uploading'); elgg_register_js('tidypics:uploading', $js, 'footer'); - elgg_register_js('tidypics:slideshow', 'mod/tidypics/vendors/PicLensLite/piclens_optimized.js', 'footer'); elgg_register_js('swfobject', 'mod/tidypics/vendors/uploadify/swfobject.js', 'footer'); elgg_register_js('jquery.uploadify-tp', 'mod/tidypics/vendors/uploadify/jquery.uploadify.v2.1.1.min.js', 'footer'); @@ -145,7 +144,6 @@ function tidypics_page_handler($page) { case "album": // view an album individually set_input('guid', $page[1]); - elgg_load_js('tidypics:slideshow'); require "$base/album/view.php"; break; @@ -345,17 +343,6 @@ function tidypics_entity_menu_setup($hook, $type, $return, $params) { // only show these options if there are images if (elgg_instanceof($entity, 'object', 'album') && $entity->getSize() > 0) { - $url = $entity->getURL() . '?limit=50&view=rss'; - $url = elgg_format_url($url); - $slideshow_link = "javascript:PicLensLite.start({maxScale:0, feedUrl:'$url'})"; - $options = array( - 'name' => 'slideshow', - 'text' => elgg_echo('album:slideshow'), - 'href' => $slideshow_link, - 'priority' => 80, - ); - $return[] = ElggMenuItem::factory($options); - if ($entity->canEdit()) { $options = array( 'name' => 'sort', -- cgit v1.2.3 From 6ef62a444fbcebea25cf475613d5cab0c43b58c8 Mon Sep 17 00:00:00 2001 From: Sem Date: Wed, 1 Aug 2012 18:45:25 +0200 Subject: Added support for colorbox. --- classes/TidypicsAlbum.php | 2 +- manifest.xml | 10 ++++++++++ start.php | 2 ++ views/default/js/photos/tidypics.php | 10 ++++++++-- views/default/object/image/full.php | 4 +--- views/default/object/image/summary.php | 6 +++--- views/default/photos/css.php | 1 + views/default/river/object/album/create.php | 10 ++++++++-- views/default/river/object/image/create.php | 5 +++++ views/default/river/object/tidypics_batch/create.php | 10 ++++++++-- 10 files changed, 47 insertions(+), 13 deletions(-) (limited to 'start.php') diff --git a/classes/TidypicsAlbum.php b/classes/TidypicsAlbum.php index a03df2d37..0cb8bd84e 100644 --- a/classes/TidypicsAlbum.php +++ b/classes/TidypicsAlbum.php @@ -128,7 +128,7 @@ class TidypicsAlbum extends ElggObject { 'list_type' => 'gallery', 'list_type_toggle' => false, 'pagination' => true, - 'gallery_class' => 'tidypics-gallery', + 'gallery_class' => 'tidypics-gallery elgg-lightbox-gallery', ); $options = array_merge($defaults, (array) $options); diff --git a/manifest.xml b/manifest.xml index 3f4025988..75a25e4b9 100644 --- a/manifest.xml +++ b/manifest.xml @@ -13,4 +13,14 @@ elgg_release 1.8 + + plugin + colorbox + 1.8 + + + priority + after + colorbox + \ No newline at end of file diff --git a/start.php b/start.php index 1b487321d..7de36b29f 100644 --- a/start.php +++ b/start.php @@ -120,6 +120,8 @@ function tidypics_page_handler($page) { return false; } + elgg_load_js('lightbox'); + elgg_load_css('lightbox'); elgg_load_js('tidypics'); $base = elgg_get_plugins_path() . 'tidypics/pages/photos'; diff --git a/views/default/js/photos/tidypics.php b/views/default/js/photos/tidypics.php index c97a1eadb..20dcc403e 100644 --- a/views/default/js/photos/tidypics.php +++ b/views/default/js/photos/tidypics.php @@ -9,8 +9,14 @@ elgg.provide('elgg.tidypics'); elgg.tidypics.init = function() { - if ($(".tidypics-lightbox").length) { - $(".tidypics-lightbox").fancybox({'type': 'image'}); + if ($.colorbox) { + $(".elgg-gallery .tidypics-lightbox").colorbox({ + onComplete: function() { + $('#cboxLoadedContent .elgg-page-topbar, #cboxLoadedContent .elgg-page-header, ' + + '#cboxLoadedContent .elgg-page-footer, #cboxLoadedContent .elgg-sidebar').css('display', 'none'); + $('#cboxLoadedContent .elgg-layout').css('background-image', 'none'); + } + }); } $("#tidypics-sort").sortable({ diff --git a/views/default/object/image/full.php b/views/default/object/image/full.php index 175519c16..9b5c1315a 100644 --- a/views/default/object/image/full.php +++ b/views/default/object/image/full.php @@ -13,10 +13,8 @@ $image = $photo = $vars['entity']; $img = elgg_view_entity_icon($image, 'large', array( 'href' => $image->getIconURL('master'), 'img_class' => 'tidypics-photo', - 'link_class' => 'tidypics-lightbox', + 'link_class' => 'tidypics-lightbox elgg-lightbox-photo', )); -elgg_load_js('lightbox'); -elgg_load_css('lightbox'); $owner_link = elgg_view('output/url', array( 'href' => "photos/owner/" . $photo->getOwnerEntity()->username, diff --git a/views/default/object/image/summary.php b/views/default/object/image/summary.php index ed8ceff38..34a726353 100644 --- a/views/default/object/image/summary.php +++ b/views/default/object/image/summary.php @@ -10,7 +10,6 @@ $image = elgg_extract('entity', $vars); -$img = elgg_view_entity_icon($image, 'small'); $header = elgg_view('output/url', array( 'text' => $image->getTitle(), @@ -19,11 +18,12 @@ $header = elgg_view('output/url', array( 'class' => 'tidypics-heading', )); -$body = elgg_view('output/url', array( - 'text' => $img, +$body = elgg_view_entity_icon($image, 'small', array( 'href' => $image->getURL(), + 'img_class' => 'tidypics-photo', 'encode_text' => false, 'is_trusted' => true, + 'link_class' => 'tidypics-lightbox elgg-lightbox', )); /* diff --git a/views/default/photos/css.php b/views/default/photos/css.php index 2290e1f9a..8fa7f730c 100644 --- a/views/default/photos/css.php +++ b/views/default/photos/css.php @@ -18,6 +18,7 @@ } .elgg-module-tidypics-image { margin: 5px auto; + height: 80%; } .tidypics-gallery-widget > li { diff --git a/views/default/river/object/album/create.php b/views/default/river/object/album/create.php index c8c79f406..2269b2eb6 100644 --- a/views/default/river/object/album/create.php +++ b/views/default/river/object/album/create.php @@ -6,6 +6,10 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2 */ +elgg_load_css('lightbox'); +elgg_load_js('lightbox'); +elgg_load_js('tidypics'); + $album = $vars['item']->getObjectEntity(); $album_river_view = elgg_get_plugin_setting('album_river_view', 'tidypics'); @@ -18,10 +22,12 @@ if ($album_river_view == "cover") { $images = $album->getImages(7); if (count($images)) { - $attachments = '