Page 5 of 6

Re: Fancybox extension

PostPosted: Mon Apr 09, 2012 9:10 pm
by Harm10
This sounds as the behavior that was complained upon. So the new default has become that whenever there is a thumbnail existing (whatever way it was created) this thumbnail and its dimensions are used. The previous behavior (of always creating a thumbnail according to the dimensions specified for upload thumbnail (which are no longer created at upload for a long time)) was deemed incorrect (and rightfully so).
You can select 1 out of 3 ways of thumbnail behavior:
1 - The width/height of the img tag are the same irrelevant of thumbnail size (this means that when thumbnail gets created the upload width/height settings are used)
2 - (default) If thumbnail already exists always use its dimensions for the img tag
3 - If thumbnail exists and doesn't adhere to current width/height setting recreate it
This behavior can be set site wide by using fancybox_thumbnail in advanced config or pop-up specific by using parm thumbbehav (like all described in the documentation).

I hope this behavior is more consequent.

Re: Fancybox extension

PostPosted: Thu Apr 12, 2012 9:08 am
by dwaas
Hi Harm,

I read this before, but i still don't understand.

On my site I use different sizes of thumbnails, mostly the width 350 (which was default), but also some with width 140px.

So how do I get the default of 350px upon creation of the pop-up back?
I don't understand option 1, i guess this means that the thukbnail doesn't get resized and used the dimensions of the uploaded picture,
option 2 is default, and i don't see any resizing going on upon creation of the thumbnail
I thought it was option 3, but i am a little afrai to use it... does option 3 mean that al my old thumbnails (mainly the ones with width 140px) get reacreated to width is 350px (as i have put in th current standard size of width 350px in the config-files of the extension)?

kind regards,


Re: Fancybox extension

PostPosted: Thu Apr 12, 2012 10:04 am
by Harm10
There is a big difference in behavior depending on the fact whether the thumbnail already exists or not.
If it does not exist then it will always be created according to the logic described in module_imagefunctions function auto_thumbnail.
Also have a look at the timthumb-config.php where you can specify the zoom crop behavior.
So the behavior setting has no influence on that.

If it does exist and behavior 3 is selected then the dimensions of the found thumbnail are compared to the dimensions specified in the upload settings. If it not matches then a recreation is forced.
So much for the creation of the thumbnails.

But this setting also influences the HTML dimensions of the img tag. For setting 1 and 3 the upload settings are used and for setting 2 the dimensions that are found for the thumbnail itself. This can give peculiar effects if you create your own thumbnails.

Then there is an additional setting called specthumbmax which offers the possibility to define a maximum width or height. This is useful when you have images next to each other with different orientations. So for a portrait oriented image this value will be used to maximize its height and for a landscape oriented image for its width.

So suppose your upload settings are 300x200 and the found thumbnail has dimensions 600x400 then the img tag will have dimensions 300x200 for setting 1 and 3 (the latter also resulting in recreation of the thumbnail). Setting 2 gives you an img tag of 600x400.

Remember that you can specify fancybox_thumbnail for the behavior installation wide and thumbbehav parm on the fancybox template tag to overrule this.

You have to select your own complex of settings depending on the situation. There is no simple process. If you want to be absolutely safe always create your own thumbnails and use setting 2 (so you are sure they won't be recreated and are always shown in the dimensions you specified when creating them). If you want something else you'll have to think................... ;)

Re: Fancybox extension

PostPosted: Thu Apr 12, 2012 10:31 am
by dwaas
Thank you for your answer,

I'm thinking: is the old version of this extension still available? :D

Re: Fancybox extension

PostPosted: Thu Apr 12, 2012 11:49 am
by Harm10
Old versions are available on request. If you want that please specify the exact version number you'd like.
But looking at your fear: you have your thumbnails currently in the right size (either 350 or 140) or not? Uploading new images does not create thumbnails automatically so you do those yourself as well. So why not use the default setting of 2? Then all pop-ups should be OK or am I mistaken? You can test to see what happens by specifying another value for thumbbehav on a specific fancybox tag.

I have a feeling that your description of the presumed "old" behavior contains some misunderstanding from your side. If you use "vrije uitsnede" and select the whole image then the thumbnail would be the same as the image. So no 350 or 140 but the dimensions of the uploaded image. Using the pop-up then would have let you believe that the image was smaller just because the img tag got other dimensions. Hope you can understand this.

If needed you can recreate your thumbnails yourself off-line through tools like Easy Thumbnails to the your desired dimensions and again use setting 2 so these thumbnails will always be used.

BTW did you check your timthumb settings? Because that's were the thumbnail creation is happening (if non are existing).

Re: Fancybox extension

PostPosted: Thu Apr 12, 2012 1:00 pm
by dwaas
Hi Harm,

Thank you for al the feedback and the thoughts you've put in your answer.
I will check these settings next week (as i will be gone for the weekend), also the ones in the timtumb (i never touched that file).

Thank you again :)

Re: Fancybox extension

PostPosted: Wed Jun 06, 2012 1:17 pm
by ljhelbo
While working with some themes I sort of stumbled over an interesting script. It can work as a kind of extension to Fancy Box and therefore I write it here, as somebody may find it useful. The script can be found here:

From this page you must download the file et-ptemplates-frontend.js. Place it in your template folder. Then add the following line to your footer.tpl just before the final </body> tag:

Code: Select all
<script type='text/javascript' src='[[ template_dir ]]et-ptemplates-frontend.js?ver=1.1'></script>

It changes the look and movement of the popup. IMHO it looks pretty cool, but take a look yourself. I have not been able to make it work with videos - only with images.

Re: Fancybox extension

PostPosted: Wed Jun 06, 2012 3:30 pm
by Harm10
Thanks Lars for the suggestion. As Fancybox has a new version for some time now the PivotX extension needs to be adapted and possibly this script can be incorporated too then.

Re: Fancybox extension

PostPosted: Fri Sep 21, 2012 7:48 pm
by Kalin
Currently there is no option to influence the profile used for iframes. So the only thing you can do right now is locating snippet_fancybox.php in extensions/fancybox and finding this line
Code: Select all
Code: Select all
    $fbifram .= "'width': '75%', 'height': '75%', ";

and changing it to your own liking. Obviously all other fancybox iframes will have the same setting then.

I'm not sure if it is easy to implement, but being able to manually set the popup height and width (with objheight and objwidth) for iframes would be very useful. I often need FancyBox to be sized for different types of iframe content on the same site, and it seems like a lot of hosted-media sites are moving towards iframe oriented embeds and away from the <object></object> embeds. I think that Vimeo, for example, no longer supports the embed code used in snippet_fancybox.php. Fortunately it's still working for now, but the ability to specify the height and width of iframe popups would allow us to use the current embed code without having to worry about letterboxing.

This is a great extension. Thanks.

Re: Fancybox extension

PostPosted: Fri Oct 12, 2012 4:23 pm
by winters
Just wondering to know if the following is even possible with some modification (is not working now)

[[popup description="[[title]]" title="[[title]]" fb_type="iframe" url=[[entrylink]]]]

Can someone give me some direction how to get this working (if possible?)