Module: Fancybox Integration - v.1.5
Serge D
Joined: 2009-06-11
Posts: 2466 |
Posted: Fri, 2010-10-22 19:56 |
Adds Fancybox integration for Gallery 3. --- |
|
Serge D
Joined: 2009-06-11
Posts: 2466 |
Posted: Fri, 2010-10-22 19:56 |
Adds Fancybox integration for Gallery 3. --- |
|
Posts: 130
Hi -- I installed the module, but on the configuration screen can't figure out what I need to enter in for the "Target Link Element" field as shown here: http://screencast.com/t/OpUK7kMsRvMw. Do I just leave as is? If so, then for some reason when I click on images in my gallery the fancy box doesn't show up. I just get the standard "View Full Size" as shown here.
Thanks,
Marc
Posts: 573
Hey, this isn't showing up on the G3 Modules namespace page (http://codex.gallery2.org/Category:Gallery_3:Modules), so it isn't being included in GalleryModules. I'm not a wiki genius, so i'm not quite sure what's going on...
edit: fixed it for you...you had your category link incorrect. view the history on the page to see what i mean.
--
For Gallery 3 modules and themes, visit GalleryModules.com.
For PHPNuke, phpBB2, and phpBB3 integration help, visit NukedGallery.net.
Posts: 2466
@shecter: please try "#g-item #g-photo .g-fullsize-link" (no quotes)
Please note, it is still work in progress, since there are lot of options to cover
Default state is for GD theme
@dmolavi: yes, forgot to change this. Thanks!
Posts: 130
Hi Serge,
Thanks for the note. I entered in the new information as shown here. But it seems like this module isn't even really turned on. See this brief video of my experience. In it, you'll notice that the images does enlarge when clicked, but it is using the standard gallery3 enlargement method and not fancy box. Besides your module, was I supposed to install some other FancyBox software on my server?
-Marc
Posts: 2466
i have not tested it with default wind theme, yet, so i may be missing something
does it work for you if you wisit my web-site?
and,no, no additional code need to be installed - check the code of the page to see if fancybox refernces are there
PS. did you turn off index.php by the g3 for your site?
Posts: 130
Hi Serge,
I installed grey dragon theme v2.4 and shadobox (the theme admin panel said i had to). when i look at a photo page, i can't click anywhere on the image to see the enlarged view. i must click on either of these two elements, and then i think i'm seeing the shadowbox and not fancy box. see this screen shot.
1. how do i make it so clicking anywhere on the image brings up the enlarged view?
2. how do i make the graydragon theme work with fancybox?
EDIT:
I uninstalled shadowbox, and gray dragon theme, both deactivating them and removing them from my server. then i ensured the fancy box and wind were both active. It appears now that FancyBox is working, sort of. See this screen capture. It appears to be missing back/next arrows. and there is a strange bit of text towards the bottom of the image.
Posts: 2466
Look here - http://photo.dragonsoft.us/Hawaii/bigisland/Diving/2008_03190126
both shadowbox and fancybox would act the same - you click on the image
something in your configuration is not right, because [Full View Link] is part of the sidebar and not an image itself
what 3rds party modules you have installed?
for EDIT coment: again, something is wrong there since it is a caption/image name should be in the bottom area...
Posts: 130
Hi,
here's the modules i have installed: http://screencast.com/t/K2O0RRBB.
here's what's currently in my sidebar: http://screencast.com/t/4vQ1GuVx
Please let me know if you see anything strange in my config.
-Marc
Posts: 2466
Oh! well, it is hard to say how each of this modules can interfere/hack the theme
you can try disabling 3rd party modules one-by-one and see which causes the problem
I would suggest to try from "download" one...
Posts: 130
Hi Serge,
I turned off all modules except "Fancy Box", and activated the Grey Dragon Wind Theme. See my current list.
The box still appears to have some issues. It is missing the next/back errors, and it has that text at the bottom of the box. See this screen capture.
-Marc
Posts: 2466
Wind or GD Wind theme, they both are based on the same JS structure
you have to disable default preview functionality of the theme
To do so:
<?= $theme->script("gallery.show_full_size.js") ?>
$(".g-fullsize-link").click(function() {
$.gallery_show_full_size(<?= html::js_string($theme->item()->file_url()) ?>, full_dims[0], full_dims[1]);
return false;
});
PS. Added to module's description page
Posts: 130
Is the best bet to use "GreyDragon" v2.4 to get fancy boxes or shadow box to work? Would "GreyDragon" v2.4 require any changes?
Posts: 2466
inside GD theme, you would need to wait for 2.4.4 which is coming out soon
Posts: 2466
Almost forgot, version 1.1 is out
Posts: 11
Hi,
as an FYI to anyone else having a similiar problem (like me). I discovered that the Photo Annotation module was causing the error of seeing the "view full size" on the photo. I'm guessing it is because of layers in the page? I used the "module order" module to see if re-organising the modules would make any difference - unfortunately not
Update:
I've narrowed it down to the file items_face.php located in /modules/photoannotation/models. I don't know anything about kohana, but I'll update if I find a solution.
Hope it helps someone.
Posts: 130
Fancy box is working for me now. But How do I get the nav arrows to show as shown in this capture: http://www.screencast.com/t/lRHEavU36M.
I checked the file jquery.fancybox-1.3.2.js, and it shows the setting "showNavArrows" as set to true, so I'm not sure why its not working. Here's what the fancy box implementation looks like on my site: http://screencast.com/t/SVJzxgAFbJ.
-Marc
Posts: 2466
For arrows to work, Fancybox need to be started in Image gallery mode - see section here
for that special code need to be introduced to the photo.htnl.php
you can refer to GreyDragon theme for more details
Posts: 130
Sorry...would you simplify your response? I couldn't figure out what code to insert into photo.html.php of wind.
Posts: 2466
Experiment with this. This is direct snippet from my theme, so you may need to adjust it a little.
Posts: 2466
version 1.2 released:
Posts: 2466
I do not know if it was you or not, but there is some info from FancyBox forum on how to specify list of images to be displayed in FB without invisible links
http://groups.google.com/group/fancybox/browse_thread/thread/c8000121907eb362
Posts: 2466
version 1.3 is out:
Posts: 2
1.3 seems to have broken... everything.
1.2 was working mostly fine with Dark Canvas theme (same php preview edits as Wind). In 1.2 the image title never worked, it was always "View full size". I upgraded to 1.3 so I could hide titles, and...
1.3 now opens the image directly in the browser, as if it was just a link to a jpg.
To install 1.3, I deactivated the module, deleted the module directory, unziped the new one, re-enabled the module, saved the settings.
Posts: 2466
"works on my machine"
can you pm me your fancybox-init.js?
Posts: 41
Over here FancyBox (1.3) is not working, either. Using GD 2.7.2, when I click on a photo or hit the fullscreen icon, I get the fullsize photo on white bg. I have disabled all modules except Info, Kbd Nav and Thumb Nav., but no improvement.
G3 shows this:
I reset and saved FB default settings, but my fancybox-init.js is smaller than the original one:
Do you have a clue what's going on here?
Posts: 2466
yes, I do... Thanks
Try to replace this file and save settings again
Posts: 41
I did, but no change...OK, after changing the file I de-/installed the plugin and now it works... great!
Thanks a lot!
Posts: 2466
version 1.4:
Posts: 394
Serge,
(1) I switched from Shadowbox to Fancybox and I can't see how to enable "Image Gallery" to get the navigation arrows after opening the image in Fancybox.
(2) The "elastic" setting doesn't work for me. It's not bouncing when opening or closing. It works when I go to your demo page though.
(3) Using Firebug, I'm getting this script error, even though I deleted Shadowbox from the modules directory:
Shadowbox is not defined
Line 57
Shadowbox.setup("a.g-fullsize-link", {player: 'img'});
58 Shadowbox.setup("a.g-sb-preview", {player: 'img', gallery: "preview", animate: true, continuous: true, counterType: "skip", animSequence: "wh", slideshowDelay: 7 });
59 } catch (e) { }
Posts: 2466
Please backup your fancybox-init.js to be compared with later...
Have you saved your FancyBox admin settings at least once?
My settings, if it would help (in admin order for FancyBox):
yes, there is hidden error as I do not analize in js for SB presence. I will add the check at some point. it should not affect FB though
Theme's admin panel should say in requirements that FB is present.
Posts: 6
Hello,
Thank you for this module.
I just have one "problem"/request: currently, when the visitors click on the picture to see it in fullscreen, they download the fullsize image. As most of my pictures are photos of 7MB, the display is very slow.
So, I would like to change something to use the resized picture in full screen view.
Should I change something in the FancyBox module or somewhere else in the code/theme? I already tried to change the value of Target (but cannot find the correct value) and I don't want to use the permission "Deny full size picture".
Info:
Gallery 3.41
Theme : GreyDragon 2.7.5
Module : Fancybox 1.4
OS: Linux 2.6.18 (CentOS 5.5)
Web server: Apache 2.2.14 + PHP 5.3.1
Thank you,
Posts: 2466
FB uses references from the page (defined by the theme)
Theme (GD) injects full size if full size view is allowed and resize if it is not allowed.
if full size is allowed, then to show resize is possible but it would require theme changes
See line 65 in photo.html.php (access::can("view_full", $item) reference)
Posts: 130
Hi,
What does the cyclic navigation do? And does it work with the default Wind theme?
-Marc
Posts: 2466
when you reach last item in the list, it starts over...
yes and no,
read more about wind theme integration here
Also note that wind theme's photo page does not have any extra information for the gallery mode (multiple images need to be referenced in the page). you can introduce this by making similar changes as in GD theme for photo.html.php file
Posts: 394
Yes I always save the setting of mods right after I install them.
That's pretty much how mine is too but I can't get the elastic effect to work or the arrows for the navigation to show. I know it's not my browser because the elastic effect and the navigation arrows work on your demo site:
http://www.dwdallam.com/G3_DWDALLAM/index.php/Archive/Landscape/13x7_2006_12_03_HdPtSS_116
Se here for what I mean.
Posts: 2466
Ah, ok
then it is a different story.
transformation rule in jquery.fancybox-1.3.4.css is not set (is mentioned on the module's codex page)
in file above look for '/modules/fancybox/core/' next to DXImageTransform...
it has to directly reference location of the respected PNG (there are few of them there)
for your setup I think it would be
'/G3_DWDALLAM/modules/fancybox/core/'
Posts: 6
Thank you Serge, it works fine when changing lines 65 and 81(to also use the resized picture when pressing left or right button).
Good job for your great theme and modules.
Posts: 394
I changed all of them to
/G3_DWDALLAM/modules/fancybox/core/
and nothing happened. I noticed that all of these changes are for IE6+ but not Firefox? I teste3d in Firefox 3.6+ and IE8, still no elastic nor navigation arrows.
eg:
.fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/G3_DWDALLAM/modules/fancybox/core/fancy_shadow_nw.png/fancy_shadow_n.png', sizingMethod='scale'); }
Posts: 2466
hm,
well, for once photo.html.php does not produce list of hidden image items, so there is no gallery mode and so you have Image 1/1... there is no next or prior image
this would be the case if you set FancyBox mode in Theme's admin panel to Preview Only instead of Default
you do not allow visitors to see full image, so elastic would only mean that picture slides into center position
PS: I also looked at the page, there is an error in CSS definition
#fancybox-bg-n has progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/G3_DWDALLAM/modules/fancybox/core/fancy_shadow_nw.png/fancy_shadow_n.png', sizingMethod='scale')
notice that png file is referenced twice - should be just fancy_shadow_n.png
Posts: 394
Serge everything works fine now except the "elastic" option. That still isn't working. And I don't know if the image is suppose to fly off the left side of the page when you close it, but that's what it does. Go to the page. click on the image, then navigate to the next image. After it loads, "close" the image and it will fly of the page to the left--lol. Not a bad effect, but not the one your demo page shows. And still no elastic effect
http://www.dwdallam.com/G3_DWDALLAM/index.php/Portfolio/People/_OUG0741
Posts: 2466
it seems like it should be for the mode you have selected
you do have elastic effect - when going from different photo orientation, photo resizes in "elastic" fashion
left corner effect... interesting, but I do not control it...
Posts: 394
Serge, on the Fancybox demo page
http://www.fancybox.net/
The elastic when opening the image and closing the image is different. When opening, it grows large then snaps back to normal size. When closing it, it does the same thing, grows a few pixels then snaps closed. Mine looks nothing like that.
Posts: 2466
Ah-ha. well, you are looking for another option which I do not support right now - easingIn, easingOut
Some samples - 1, 2
I have understanding on what need to be done, but just did not have time to add support for it
For the example you are refering to settings are
("a#example2").fancybox({
'titleShow' : false,
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'easingIn' : 'easeOutBack',
'easingOut' : 'easeInBack'
Posts: 394
So I've been trying to get it to do something it cannot do? LOL Thank Serge. Do you like that "easout" effect? I think it's pretty cool.
Posts: 2466
version 1.5 is out:
Posts: 32
Hello,
I just upgrade with my 3.0.1 gallery.. but still not working...
(Full size images are opening in a new tab)
And with greydragon theme :
- login is not visible
- admin submenu are not showing !
Vincent
Posts: 32
Sorry, it was the Fancybox option "Title Position (default: Outside)" set to Hide !
When set to "outside" Everything is working again... just PERFECT !
Vincent
Posts: 2466
I thought I have uploaded proper version
try the get latest from the codex again and "hide" should work
Posts: 21
I was just checking my 404 on my site and it has many issues with fancy box. So I must have missed a few steps. In looking at the install section, I need to include some lines of code. I am VERY new at this and not too well studied.
comment out is being referred to.
in page.html.php comment out line< ?= $theme->script("gallery.show_full_size.js") ?>
in photo.html.php comment out lines $(".g-fullsize-link").click(function() { $.gallery_show_full_size(<?= html::js_string($theme->item()->file_url()) ?>, full_dims[0], full_dims[1]); return false; });
in fancybox module configuration, specify .g-fullsize-link as a target
I am looking for these lines to change, but are they even there or am I to write and insert them. If so, where.
i am using this with Gal 3.0.1 and grey dragon.
Posts: 2466
if you use latest version of the theme and the module only thing you need to do is enable module
no changes to the code itself necessary