Skip to main content

Topic: [ADDON] Fancybox  (Read 4754 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Spuds
  • [*][*][*][*][*]
[ADDON] Fancybox
Similar to highslide and other lightbox programs, this addon uses Fancybox to provide the zoom on click capability.  Works on attachments and image tags.  Will group all images in a post (attachments and img tags) as a slideshow so you can navigate all the images in a post from the lightbox.

Fancybox 4 ElkArte Version 1.0

License
This ElkArte addon is released under a MPL V1.1 license, a copy of it with its provisions is included with the package.

Introduction
This adds a lightbox / zoom effect to thumbnail images and attachments in your post.  It will work on attachments and in-line images.

Fancybox JS is licensed under a Creative Commons Attribution-Non Commercial 3.0 License. You are free to use fancyBox for your personal or non-profit website projects. You must get the author's permission to use fancyBox for commercial websites by paying a fee.  fancybox

Features
o Expands a thumbnail (attachment or in-line image) in to a full-size image in a picture frame when clicked
o Auto size images to fit browser window, with option to expand to full size
o Slideshow for images on page, grouping by individual messages in the topic
o Prev / Next navigation with arrow keys

Repo / Download
http://addons.elkarte.net/enhancement/FancyBox.html
  • Last Edit: February 07, 2016, 09:20:51 pm by Spuds
"Ever tried. Ever failed. No matter. Try again. Fail again. Fail better" - Samuel Beckett


  • radu81
  • [*][*][*][*][*]
  • Global Moderator
Re: [ADDON] Fancybox
Reply #2
Quote
It will work on attachments and in-line images.
for inline images do you mean images inserted with *IMG* bbcode or also images attached inline?
I use your ILA mod for SMF and it will be great to see the ILA mod on elkarte
sorry for my bad english

  • Spuds
  • [*][*][*][*][*]
Re: [ADDON] Fancybox
Reply #3
It will work on [ img bbc tags in a post as well as normal attachments.  

Don't have ILA done for ElkArte just yet, its on the list of things to do and we have been considering adding that type of functionality to the core as well.  
"Ever tried. Ever failed. No matter. Try again. Fail again. Fail better" - Samuel Beckett

  • emanuele
  • [*][*][*][*][*]
  • Global Moderator
Re: [ADDON] Fancybox
Reply #4
 emanuele tries the likes button. :P
Bugs creator.
Features destroyer.
Template killer.

  • Allan
  • [*][*][*][*]
Re: [ADDON] Fancybox
Reply #5
Can I ask where the download is located, I saw where to download the repository and wasn't sure if that was it.

  • kucing
  • [*][*][*]
Re: [ADDON] Fancybox
Reply #6
That is it @Allan , I just checked the repo.

  • Allan
  • [*][*][*][*]
Re: [ADDON] Fancybox
Reply #7
Thank you very much.

  • radu81
  • [*][*][*][*][*]
  • Global Moderator
Re: [ADDON] Fancybox
Reply #8
I think the fancybox should be disabled for images with a link. It opens the thumbnail

Code: [Select]
[url=http://postimage.org/image/x37t5qr3x/][img]http://s6.postimage.org/x37t5qr3x/file134_newformat.jpg[/img][/url] 
sorry for my bad english

  • Spuds
  • [*][*][*][*][*]
Re: [ADDON] Fancybox
Reply #9
I'll see what I can do.  Finding nested tags like that is a bit painful.

It does have the option to not work on [ img] tags at all but not just [ img] tags inside of [ url] tags
"Ever tried. Ever failed. No matter. Try again. Fail again. Fail better" - Samuel Beckett

  • Spuds
  • [*][*][*][*][*]
Re: [ADDON] Fancybox
Reply #10
I've made some update to this addon to address a couple of problems.

* I added a few extra options to allow more control over how it looks, just a couple, like the size of the border around the image etc.
* Second I added the option to disable it on linked bbc images as you normally get from a photo share site
* Add the ability to work with a limited number of photo share sites, so this will allow you to post the image thumb and when clicked display the full image. 

Right now it should  work with imageshack,  photobucket, radikal, fotosik, postimage, flickr, and smugmug.  This is something I had in the old HS4SMF mod so wanted to add that here as well.  Some of those hosting sites are making more difficult to find the right image to slide so what works now may not in the future. 

Also postimage is a bit special since it requires lookups to find the right image to expand (as near as I can tell).  In the past if you had a lot of postimage images on your page it could really drag down the system since the lookups were done server side.  I've now moved that to the client with some javascript ajax.  Now the page will load and the links will be updated by the client.  This allows for a faster page load.  If you have a lot of those on a page, they may just act as a normal postimage links until the javascipt gets to it.

The updated package is at the link in the first post, let me know what new bugs I've created  :)
"Ever tried. Ever failed. No matter. Try again. Fail again. Fail better" - Samuel Beckett

  • radu81
  • [*][*][*][*][*]
  • Global Moderator
Re: [ADDON] Fancybox
Reply #11
I'll surely try this, I'm on tablet right now. These are very good news for me ;) maybe this addon should change it's name to HS4ELK :)
sorry for my bad english

  • radu81
  • [*][*][*][*][*]
  • Global Moderator
Re: [ADDON] Fancybox
Reply #12
Display thumbnails below slides :o

I love that, great work and thank you! The images on postimg are not working correctly, but I don't want to use them anymore
sorry for my bad english

  • Spuds
  • [*][*][*][*][*]
Re: [ADDON] Fancybox
Reply #13
Could you supply a sample of a postimg that is not working correctly?  I only had one example and it worked, but they have other syntax that may not.  Would like to have it working.
"Ever tried. Ever failed. No matter. Try again. Fail again. Fail better" - Samuel Beckett

  • radu81
  • [*][*][*][*][*]
  • Global Moderator
Re: [ADDON] Fancybox
Reply #14
There is an old bbcode [ float]  I also tried removing it but same results.
The images inserted with url are opened correctly in a new tab but if I activate the last option they should be opened with highslide effect like in the old Hs4smf
Code: [Select]
skodaclub.it/skodaelk10/index.php?topic=837.0 
I attach my settings
sorry for my bad english