Page 1 of 6

Fancybox extension

PostPosted: Sun Aug 15, 2010 10:23 pm
by hansfn
This is the discussion topic for the Fancybox extension.

Visit http://extensions.pivotx.net/entry/29/fancybox for more info or download.

New version 0.23 released: introducing config option to change close button display default.

Re: Fancybox extension

PostPosted: Thu Aug 19, 2010 8:23 pm
by ppescher
Hello,

Here is a patch for fancybox, fix a couple of issues I had:
- wrong stylesheet loaded on IE8, not showing alpha and shadows correctly
- alternate text and image title attributes are truncated if they contain quotes

Best,
Paolo

UPDATE: I reversed the patch, sorry. Now it's ok.

Re: Fancybox extension

PostPosted: Mon Sep 27, 2010 1:24 pm
by hansfn
I have commited the patch from ppescher. I assume Bob is releasing a new version of Fancybox very soon because of the new profile that Harm just added.

Re: Fancybox extension

PostPosted: Mon Sep 27, 2010 1:30 pm
by Harm10
Before I started the change Bob has accepted today, I checked the patch and found that 2 out of 3 were already incorporated in the latest version.
So will everything still be OK with this file?
BTW there is a new version on its way because thumbnail creation contained an error.

Re: Fancybox extension

PostPosted: Mon Sep 27, 2010 4:52 pm
by hansfn
Harm, when I say I have commited the patch, I have. Seriously. And yes, 1 out of 3 was already handled in some way. And no, you couldn't apply the patch cleanly.

Re: Fancybox extension

PostPosted: Wed May 18, 2011 8:52 pm
by hansfn
I'm happy to announce the 0.18 release of the Fancybox extension that adds a new snippet, fancybox_setup. From the inline documentation:

Code: Select all
If you want to use Fancybox manually, without using the PivotX popup snippet, just insert

    [[fancybox_setup]]

anywhere in your template. It will add the needed Fancybox code to the head section of the HTML generated by PivotX.

Re: Fancybox extension

PostPosted: Tue Jul 19, 2011 3:15 pm
by Schop
It seems to me that this piece of code is wrong:

Code: Select all
            // if parms width or height have been specified they should be used!
            if (isset($params['width'])) {
               $uplw = $width;
            }
            if (isset($params['height'])) {
               $uplh = $height;
            }
            $thumbname = sprintf("<img src=\"%s%s\" alt=\"%s\" title=\"%s\" class=\"%s\" width=\"%s\" height=\"%s\" />",
                $PIVOTX['paths']['upload_base_url'], $thumbname, $alt, $title, $fbclass, $uplw, $uplh
            );


The width-height parameters are there to be used by jCrop, and should not be here. It distorts thumbnails that have been created with different sizes than the back-end settings!

Re: Fancybox extension

PostPosted: Tue Jul 19, 2011 3:39 pm
by Harm10
I will investigate. From the top of my head: those parms are meant to be used when the thumbnail is not present (yet).

Re: Fancybox extension

PostPosted: Tue Jul 19, 2011 4:04 pm
by Schop
Harm10 wrote:I will investigate. From the top of my head: those parms are meant to be used when the thumbnail is not present (yet).


but why? the params are meant for the thumbnail. if there is no thumbnail, what good are the parameters?

Re: Fancybox extension

PostPosted: Tue Jul 19, 2011 7:50 pm
by Harm10
As I see it the logic is currently like this:
If you specify (thumbnail) as description and the thumbnail does not exist it gets created through auto_thumbnail logic. So no problem there I guess.
If the thumbnail already exists this part is skipped.

The html is then constructed with the parms specified. Going through them I probably see what you mean.
If you do not specify width, height or specthumbmax then width and height are still used with their default values set in variables uplw and uplh which are not the ones belonging to the found thumbnail.
Right?

I see what I can do to change this.