Thumbnail to launch fileset

Permalink
Hi all,

There seem to be plenty of nice image gallery blocks in the marketplace, but all of them (except flash gallery) seem to omit the possibility to show thumbs for a fileset which would launch that fileset in a lightbox or similar.

In other words, those that do support filesets, seem to require that all the images in that set are thumbnailed at the top level.

What I want to do, is to have a page with a block which shows a number of subgallery thumbs, preferably with captions, that launch straight into lightbox mode of that gallery - not just link to a concrete sub page.

Have any of you got any ideas?

Iain

 
jordanlev replied on at Permalink Best Answer Reply 1 Attachment
jordanlev
Here's something I whipped up really quick, based off of another block I use a lot. It uses the first image of the fileset for the thumbnail. Feel free to do what you want with this code -- but please note I am unable to guarantee any kind of support or customization for it (feel free to ask and if I am able to help I am happy to do so but I just want to be clear that I can't promise anything due to time constraints).

-Jordan
icowden replied on at Permalink Reply
Thanks Jordan,

That's really great - I'll have a play with it.

Cheers

Iain
icowden replied on at Permalink Reply
Hi Jordan - should this install as a block or as a package? I'm having trouble getting Concrete to find it!

Iain
jordanlev replied on at Permalink Reply
jordanlev
It's just a block (not a package). To install it, download the attachment and unzip it, then move that unzipped "lightbox_gallery" folder into your site's "blocks" directory (NOT concrete/blocks). Then you should see it show up in the "available to install" list under Dashboard -> Add Functionality.
icowden replied on at Permalink Reply
Hi,

Schoolboy error - i had duplicated the folder inside itself. However, now that I've sorted that out I'm getting:-

Fatal error: Cannot redeclare class LightboxGalleryBlockController in /home/sites/swanbankmusic.com/public_html/concrete/blocks/lightbox_gallery/controller.php on line 68

I can't find a class declaration on line 68, so am not sure what the issue is. It's all a bit odd!

Cheers Iain
jordanlev replied on at Permalink Reply
jordanlev
You probably still have a leftover copy in your packages directory. I think the best thing to do is wipe out all traces of this block from your site and then re-install it.

1) Go to Dashboard -> Add Functionality

2) Uninstall this block wherever it appears in the list

3) Clear your site's cache (Dashboard -> Sitewide Settings).

4) Look in your site's "blocks" directory and delete the "lightbox_gallery" folder.

5) Look in your site's "packages" directory and delete the "lightbox_gallery" folder (if it exists).

6) Just to be sure, look in your site's "concrete/blocks" and "concrete/packages" directory to make sure you didn't accidentally copy anything there either.

7) Now re-download the attachment and unzip it. Make sure there is only one "lightbox_gallery" folder that gets unzipped -- if for some reason you get one folder inside another with that name, you need to take the inner one out of the outer one (or just copy the inner one to your site's "blocks" directory).

8) Re-install from Dashboard -> Add Functionality

Let me know if that doesn't work (or if my directions are unclear)

-Jordan
icowden replied on at Permalink Reply
Ok - I feel a little stupid now but the block is now successfully installed. :-)

But, another problem (thank you so much for your time on this btw)...

When I select a fileset, a thumbnail image is presented. However, for some reason the lightbox isn't kicking in. I just get the direct link to the file that is thumbnailed.

The html source shows the scripting has been rendered, and on checking in ie6 (I'm at work) i get a script error on line 86 which is apparently:

$('a[rel="lightbox-gallery-45"]').fancybox({
      'cyclic': false, //set to true for wraparound navigation (clicking right arrow on last image goes back to first)
      'titleShow': true, //set to false to never show captions
      'titlePosition': 'inside', //'outside', 'inside' or 'over'
      'transitionIn': 'fade', //'elastic', 'fade' or 'none'
      'transitionOut': 'fade' //'elastic', 'fade' or 'none'
   });


saying object does not support this property or method. In chrome (portable) I don't get an error message, but the lightbox script doesn't run.

Any further ideas?

Iain
icowden replied on at Permalink Reply
I will test this at home to make sure it isn't a legacy browser or work firewall issue.

Iain
jordanlev replied on at Permalink Reply
jordanlev
Hmm... not sure why it wouldn't be working -- it runs fine for me. I think that if it's not working in IE and Chrome then it is an issue with your site code. Did you modify any of the files in the block by any chance? Or are you running any other addons on that site that use the "fancybox" lightbox effect?
icowden replied on at Permalink Reply
Hmmm.

At present I am using:-

tweetcrete
csv displayer
tables
php block
mint choc chip theme

no other customisations. I just removed media box to see if that helped, but it didn't. ie8 gives the same scripting error and normal chrome also fails.

Iain
jordanlev replied on at Permalink Reply
jordanlev
Would it be possible to post a link to the site (or you could PM me if you don't want to share it publicly)?
icowden replied on at Permalink Reply
No prob - the site is at:

http://79.170.40.229/swanbankmusic.com/concrete...

the page I am trying to implement the block on is:-

http://79.170.40.229/swanbankmusic.com/concrete/index.php/gallery...

I will PM you a login also, in case this is useful.

Cheers

Iain
jordanlev replied on at Permalink Reply
jordanlev
You have a permissions issue on your server. If you try to navigate to the fancybox javascript file directly, you will see this:
http://79.170.40.229/swanbankmusic.com/concrete/blocks/lightbox_gal...

So you need to set permissions to allow the web server to read all of the files in that blocks directory (and all of its sub-directories).
icowden replied on at Permalink Reply
Hi Jordan - thanks for that.

It looks like for some reason the lightbox_gallery folder didn't have execute permission set. As soon as I adjusted that - bingo.

Thanks so much for your help. I'm off now to have a fiddle with the formatting!

Thanks once again

Iain