Fancybox extension

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

Fancybox extension

Postby hansfn » Sun Aug 15, 2010 10:23 pm

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.
hansfn
Developer
 
Posts: 3280
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Fancybox extension

Postby ppescher » Thu Aug 19, 2010 8:23 pm

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.
Attachments
fancybox_IE_attrib.zip
Fix for IE8 and image title with quotes
(807 Bytes) Downloaded 912 times
Last edited by ppescher on Fri Aug 20, 2010 1:22 pm, edited 1 time in total.
User avatar
ppescher
 
Posts: 13
Joined: Mon Aug 16, 2010 2:35 pm

Re: Fancybox extension

Postby hansfn » Mon Sep 27, 2010 1:24 pm

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.
hansfn
Developer
 
Posts: 3280
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Fancybox extension

Postby Harm10 » Mon Sep 27, 2010 1:30 pm

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.
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 hansfn » Mon Sep 27, 2010 4:52 pm

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.
hansfn
Developer
 
Posts: 3280
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Fancybox extension

Postby hansfn » Wed May 18, 2011 8:52 pm

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.
hansfn
Developer
 
Posts: 3280
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Fancybox extension

Postby Schop » Tue Jul 19, 2011 3:15 pm

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!
User avatar
Schop
Contributor
 
Posts: 485
Joined: Mon Apr 21, 2008 1:47 pm
Location: Hudson, Ohio

Re: Fancybox extension

Postby Harm10 » Tue Jul 19, 2011 3:39 pm

I will investigate. From the top of my head: those parms are meant to be used when the thumbnail is not present (yet).
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 Schop » Tue Jul 19, 2011 4:04 pm

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?
User avatar
Schop
Contributor
 
Posts: 485
Joined: Mon Apr 21, 2008 1:47 pm
Location: Hudson, Ohio

Re: Fancybox extension

Postby Harm10 » Tue Jul 19, 2011 7:50 pm

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

Next

Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 3 guests

cron