Fancybox extension

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

Re: Fancybox extension

Postby Harm10 » Mon Apr 09, 2012 9:10 pm

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.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2010
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Fancybox extension

Postby dwaas » Thu Apr 12, 2012 9:08 am

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,

DAnny
User avatar
dwaas
Contributor
 
Posts: 93
Joined: Mon May 19, 2008 9:11 am
Location: Maastricht, The Netherlands

Re: Fancybox extension

Postby Harm10 » Thu Apr 12, 2012 10:04 am

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................... ;)
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2010
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Fancybox extension

Postby dwaas » Thu Apr 12, 2012 10:31 am

Thank you for your answer,


I'm thinking: is the old version of this extension still available? :D
User avatar
dwaas
Contributor
 
Posts: 93
Joined: Mon May 19, 2008 9:11 am
Location: Maastricht, The Netherlands

Re: Fancybox extension

Postby Harm10 » Thu Apr 12, 2012 11:49 am

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).
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2010
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Fancybox extension

Postby dwaas » Thu Apr 12, 2012 1:00 pm

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 :)
User avatar
dwaas
Contributor
 
Posts: 93
Joined: Mon May 19, 2008 9:11 am
Location: Maastricht, The Netherlands

Re: Fancybox extension

Postby ljhelbo » Wed Jun 06, 2012 1:17 pm

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:

http://code.google.com/p/envisioned/

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.
ljhelbo
 
Posts: 104
Joined: Sat Feb 26, 2011 2:58 pm
Location: Denmark

Re: Fancybox extension

Postby Harm10 » Wed Jun 06, 2012 3:30 pm

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.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2010
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Fancybox extension

Postby Kalin » Fri Sep 21, 2012 7:48 pm

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.
Kalin
 
Posts: 7
Joined: Wed Apr 04, 2012 6:05 pm

Re: Fancybox extension

Postby winters » Fri Oct 12, 2012 4:23 pm

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?)

Thanks
willem
winters
 
Posts: 82
Joined: Thu Jan 13, 2011 9:09 pm

PreviousNext

Return to 2.x Extensions

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron