Posts: 50
Threads: 10
Joined: Apr 2015
Hey Guys,
normally I'm using i18n-Galleries on my site but on some pages I simply want single pictures to expand using fancybox. Somehow I don't get it to work. I just add a picture, add a link to a bigger version and add rel="fancybox" to the href, right?
In my case it simply opens the picture with no fancybox being showed. Do you know what I'm doing wrong?
Posts: 6,266
Threads: 181
Joined: Sep 2011
are you using the fancybox plugin ?
Posts: 1,247
Threads: 82
Joined: Feb 2011
2015-09-08, 01:05:55
(This post was last modified: 2015-09-08, 01:20:08 by datiswous.)
(2015-09-07, 20:43:56)stwneu Wrote: Hey Guys,
normally I'm using i18n-Galleries on my site but on some pages I simply want single pictures to expand using fancybox. Somehow I don't get it to work. I just add a picture, add a link to a bigger version and add rel="fancybox" to the href, right?
/
In my case it simply opens the picture with no fancybox being showed. Do you know what I'm doing wrong? ![Blush Blush](http://get-simple.info/forums/images/smilies/blush.gif)
Assuming you use
Fancybox plugin, you should use
id = fancybox
I think you use
rel only to create a relationship between images and so creating a gallery in Fancybox.
See also updated code in this topic:
http://get-simple.info/forums/showthread.php?tid=7439 (which uses class = fancybox)
You can also use i18N Gallery to show a single image, although I don't know how (
appart from using a tag). You should ask in the topic of i18N Gallery.
Posts: 50
Threads: 10
Joined: Apr 2015
I tried using the fancybox-plugin. When I do so I have to set rel to "fancybox" and it works. But then, when I try to close my navigationbar, it re-opens itself...
![Huh Huh](http://get-simple.info/forums/images/smilies/huh.gif)
Don't know why it behaves like this, but so this is not an option.
I thought you don't have to install any plugin to use fancybox?
Creating a i18n-gallery with one picture could be an option, but that means having dozens of galleries, which is not the best solution..
Posts: 1,247
Threads: 82
Joined: Feb 2011
2015-09-09, 20:10:08
(This post was last modified: 2015-09-09, 20:14:28 by datiswous.)
(2015-09-09, 18:30:28)stwneu Wrote: Creating a i18n-gallery with one picture could be an option, but that means having dozens of galleries, which is not the best solution.. ![Undecided Undecided](http://get-simple.info/forums/images/smilies/undecided.gif)
No, you can just use one gallery and give every image a different tag.
Image 1:
Code:
(% gallery name=lonely-images type=fancybox tags=lion %)
Image 2:
Code:
(% gallery name=lonely-images type=fancybox tags=shark %)
Quote:I thought you don't have to install any plugin to use fancybox?
I think you can place it in your theme, but I never tried that. It's just not included in the cms as a frontend option.
Quote:I tried using the fancybox-plugin. When I do so I have to set rel to "fancybox" and it works. But then, when I try to close my navigationbar, it re-opens itself... Huh Don't know why it behaves like this, but so this is not an option.
I don't know what you mean with closing your navigation bar, but you should use id="fb" instead of rel="fancybox" rel="fancybox" creates a gallery of one image, so if you place a second image and do the same, you get a gallery of 2 images (gallery = fancybox).
Btw. this is all described in the plugin description:
http://get-simple.info/extend/plugin/fan...lugin/404/
Posts: 6,266
Threads: 181
Joined: Sep 2011
Fancybox pligin only includes fancybox if you want to initialize it you have to do that on your own in js.
Posts: 50
Threads: 10
Joined: Apr 2015
Thank you all for your help. I don't know why my navigation is behaving so strangely when I activate the fancybox-plugin. But for now, the i18n-gallery with filtering by tag seems the best option for me.
Thanks!
Posts: 50
Threads: 10
Joined: Apr 2015
2015-09-11, 19:28:45
(This post was last modified: 2015-09-11, 20:07:24 by stwneu.)
I finally found the solution to the problem with my navbar!
Once I deleted the line "queue_script('jquery', GSFRONT);" in the fancyboxconfig.js it worked smoothly. So the problem seems to be two instances of jquerry running if I am right?
Now almost everything is fine just one litte question: The navbar is displayed always on top and thus cuts off the upper fancy-box frame (I don't know its z-index value.) Do you know what I have to change so that the image being displayed in the fancybox is always on top?
Posts: 50
Threads: 10
Joined: Apr 2015
... and can you somehow add a caption to the picture in the fancybox?
Posts: 1,247
Threads: 82
Joined: Feb 2011
2015-09-16, 20:41:11
(This post was last modified: 2015-09-16, 20:46:44 by datiswous.)
(2015-09-11, 19:28:45)stwneu Wrote: Now almost everything is fine just one litte question: The navbar is displayed always on top and thus cuts off the upper fancy-box frame (I don't know its z-index value.) Do you know what I have to change so that the image being displayed in the fancybox is always on top? ![Big Grin Big Grin](http://get-simple.info/forums/images/smilies/biggrin.gif)
I think you can figure out it's z-index via the devoloper console (usually F12).
stwneu Wrote:... and can you somehow add a caption to the picture in the fancybox?
You have to add a
title=" ... " to the image url. See
http://fancyapps.com/fancybox/#docs for examples.