Comments

I too would love to see fancybox for Drupal 6

StatusFileSize
new8.83 KB
new38.83 KB

Attached is a D6 version of FancyBox.

The D5 code has been updated quite a bit to match Lightbox2.

Admin form moved to fancybox.admin.inc.
All easing options are now selectable.
The opacity is selectable from 0.0 to 1.0.
The animation speeds are now based in seconds.
The form is validated.
Added Image Scale option.
Added Center On Scroll option.
Updated CSS class or id help.
All True/False options are now checkboxes.
Uninstall variables added.
jQuery 1.3.2 has been removed to reduce space.
Requires jQuery update 2.x

Please test at let me know if I need to fix anything.

-- Jason

StatusFileSize
new7.57 KB
new694 bytes
new162 bytes

Adding remaining files were not listed in patch file.

js/fancybox.js
fancybox.admin.inc
fancybox.install

StatusFileSize
new39.8 KB

I just made one more update. The overlay color is now configurable in the admin form.

Attached is the new version.

-- Jason

thanks!
how about putting this on the "releases" page?

I really wouldn't mind becoming a co-maintainer for this.

Just let me know.

-- Jason

Hi. I've contacted fivepoints and have been given co-maintainership of this module. I'll get a D6 branch up and running within a few days.

jsm174: Nice work on the D6 port! Since you also want co-maintainership, we should discuss the scope and focus of the module so that we're all on the same page. Solipsist and myself are prepared to co-maintain the D6 branch of this module in any case.

ximo: Thank you! That is fantastic news. Just let me know when you and Solipsist would like to discuss.

-- Jason

BTW, I have a patch for the current Fancybox (1.2.1) that fixes the padding in IE. I contacted the author, but have yet to hear back.

Original

if (isIE) {
   $("#fancy_content")[0].style.setExpression('height', '(this.parentNode.clientHeight - 20)');
   $("#fancy_content")[0].style.setExpression('width', '(this.parentNode.clientWidth - 20)');
}

New

if (isIE) {
   $("#fancy_content")[0].style.setExpression('height', '(this.parentNode.clientHeight - ' + pad*2 + ')');
   $("#fancy_content")[0].style.setExpression('width', '(this.parentNode.clientWidth - ' + pad*2 + ')');
}

-- Jason

bump - it's so hard to find in here. how about adding this to the releases?

subscribed

Priority:Minor» Normal

Any chance of the co-maintainer releasing a 6.x version yet?

Category:feature» task
Issue tags:+fancy box
StatusFileSize
new34.04 KB

Hi, this is working module for Drupal 6 (I'm not sure if it's bug free), it has imagefield (with imagecache) and image module support.

StatusFileSize
new30.26 KB

hmm Attachment

Subscribing

StatusFileSize
new368.66 KB

Thanks for this port, it's things like this that make me love open source!

Two things though:

In the settings I can't find an option to set the class to trigger the fancybox as described below:

Enter a fancybox class id in the module's settings. ".fancylink" (without the quotes) should be ok.

Also, my titles don't seem to display properly (see attached screenshot). This happens in both Opera and Firefox.

Huge thanks for your hard work though!

I've seen from going through the source that we use the class .fancy_box on links, but an option to use a class or ID without fiddling around with the .js files would be great. I would like to be able to use a custom ID so my old lightbox links still work :)

Additionally, Padding: is the label for almost every option! :)

Padding:

Padding around content

Padding:

Changes content transparency when animating

Padding:

Speed in miliseconds of the zooming-in animation (no animation if 0)

Padding:

Speed in miliseconds of the zooming-out animation (no animation if 0)

Padding:

Speed in miliseconds of the animation when changing gallery items (no animation if 0)

Titles are also not centered like they are on the fancybox website's example page. This is in Opera and FireFox again.

Thanks! Sorry for pointing out the bugs, but I hope it's useful!

It seems at least on my setup that including video or anything else then picture/galleries (YouTube for example) as inline breaks fancybox for Drupal 6 (latest jquery). The fancybox window hangs at the standard width and height and the video is kinda cut off.

Anybody with that issue too? Or an idea how to fix that?

edit:
Using the latest version jancor posted earlier and modifying the frame width and height it seems to work.
But on the modules page i receive this error:
warning: array_merge() [function.array-merge]: Argument #1 is not an array in /sites/all/modules/fancy_box/fancy_box.module on line 76.
I have none of the optional modules he mentioned installed which could be be the cause of this error message.

It works! Thanks mate!

StatusFileSize
new43.41 KB

Here's an updated version of the module posted in #13. I've cleaned up the code—adjusting it to conform to Drupal coding standards—and attempted to fix small bugs, such as the one brought up in #19.

Tested and works as expected. Thanks!

I confirm that Under Advanced settings, all headings for the input fields say "Padding".

StatusFileSize
new34.06 KB

still no official D6 release?

I've added two necessary hooks to use this module with Insert module, formerly known as filefield-insert module.

More info about the hooks: #479310: Add support for add'l CCK Formatters (Lightbox2, etc.)

Thanks, bas.hr; will test!

I have just installed fancybox to test it with Drupal 6. It seems that the fancy box does not resize properly to fit my video's size (the problem is cross browser). Can anyone confirm this? Is there something
that I have to change in the css file?

Note: I just noticed that this happens only for video objects. Images work normally. I have used the same method to launch my fancy box like the one that is used here. It is the same problem that is mentioned in #19. However there is a:

modifying the frame width and height it seems to work.

comment there. Can you please specify what do you mean by this? How do you modify the frame width and height?

I also confirm that Under Advanced settings, all headings for the input fields say "Padding".

Posted from http://drupal.org/node/622968:

Is there a reason we should support the module being taken over when there are better alternatives in an already crowded group? I'd prefer to just mark this module as abandoned point them to the comparison page so they can choose which module they want to use.

Please let me know in http://drupal.org/node/622968 how this module differs from the many existing and well-established lightbox modules.

Hello again, I'd like to put another patch together and help get this module in for D6.

Initially I had a D6 version in posted in #4. Jancor posted another version in #13 and #14. I don't think this version started with #4, since it doesn't support a dynamic overlay color and there have been a few comments saying the admin settings all say "padding". I checked and #4 did have correct titles. I think all the remaining patches were started with #14.

So anyway, it seems like we could merge #4 and #22?. Since there were a few GPL comments, we could put the new 1.2.5 version of Fancybox in the libraries folder? Also could we use fancybox instead of fancy_box? This would stay more inline with name of the plugin?

-- Jason

Jason, ximo has a little bit different version than the one attached here. He said he will commit it these days so we should wait just a little bit more :)

Ok. Cool. I'm still going to look into the libraries part. :)

I just want to make sure we can get all the admin enhancements that were done in #4 back in.

It fixed #17, 18, etc. :)

subscribed

Subscribe

subscribe

@#20
Under sites/all/modules/fancy_box/plugin in the jquery.fancybox.js scroll all the way to the bottom. You'll see it.

And thanks for the bugfix! #20

StatusFileSize
new60.86 KB

i guess i should have looked in the issue queue.. saw there was no D6 version.. so i ported it this evening.

i am sure the one posted above is much better.. but i added small addition which auto grabs one imagecache preset size from the initial rendered image and uses another icache preset for the fancybox image - both preset values are defined in the fb admin form.

i'll attach my version here and maybe maintainers might find the small JS addition useful.

subscribing

Wow the author really needs to step up here and get this organized. What a mess... custom it is.

it would be great that i can use fancybox with fields e.g. embedded media

Status:Active» Needs review

+1 on D6 version. I am willing to test.

Subscribing. Thanks for the d6 ports!

Hi,

any news of official D6 release?

Tnx.

Could anyone give some pointers as to how I can use the module dat has been posted here. Thanks.

Is there active development going of this module for D6? Since the switch of maintainers it has been quite for a while, so I'm just curious.

Priority:Normal» Critical
Status:Needs review» Active

Just tried and love the lightweight but beautiful fancybox. The maintainers can just put a working and well tested version above on the 6.x branch so that we can submit patches?

for #33 above.

url example (click img): http://www.annuta.com/product/party-dresss
screen of node display: http://screencast.com/t/OTA2MmY1OGUt
screen of fancybox config: http://screencast.com/t/N2U0NDA4ZWMt

i think thats it; specify icache preset to use for your image field, set that same icache in fbox config, set 2nd, larger icache preset in fbox config.. should be about it.

Peter Lindstrom
LiquidCMS - Content Solution Experts

@ximo

I tried out the ported module from #33 and I found it a little bit strange and restrictive. I'm reworking it from scratch and I was wondering if you are interested in this UI / functionality:

Default settings

* General settings page:
Default FancyBox settings + enabled flag & classes textfield (comma seperated list of classes)

* Implementation:
A link with one of the defined classes.

* Manual usage
These both are triggered by having the FancyBox class trigger set to "imagecache-medium_imagelink fancybox"

<?php
   
// $image is an ImageField item
   
$alt = empty($image['data']['alt']) ? $type : $image['data']['alt'];
   
$title = empty($image['data']['title']) ? 'test' : $image['data']['title'];
   
$img = theme('imagecache', 'left_block_full', $image['filepath'], $alt, NULL);
    return
l($img, imagecache_create_path('large', $image['filepath']), array('html' => TRUE, 'attributes' => array('class' => 'fancybox', 'id' => 'id-'. $node->nid .'-'. $image['delta'], 'title' => $title)));
?>

* CCK integration
This is using the class 'imagecache-medium_imagelink' that is automatically generated via CCK when using the Display option "Medium image linked to Image".

To get any ImageCache preset that is linked to an image, add the class "imagecache-imagelink" to the trigger list.

ImageCache integration (Not done yet)
Default FancyBox settings + enabled flag, optional classes to restrict, & ImageCache target preset

* Settings
Hook into the imagecache preset form

* Implementation
Find all images that are created via this preset and wrap these with a trigger to go to the specified preset.

* Reason for this one
To bypass the no-JScript link to the image, forcing either Nothing or the Lightbox

I'm going to look at rewriting some of the code inside FancyBox to include some of the newer features such as title callback and title position [or look at backporting the latest version to work with JQuery]

Anyway, love to know your thoughts

there is a new version on launchpad.net we are developing, I hope next week we'll push it here

StatusFileSize
new39.47 KB

Cool. I'll attach the zip of what I wrote this morning. As far as I can tell, the first part described above is production ready with the exception of cross-browser testing. First cut, so it can use some refactoring. The code was built with the new fancybox / jquery version in mind, and has partial methods for 1.3 that requires jquery 1.4 / Drupal 7 :)

It still contains the original JScript as I wrote it prior to looking at the other issues. The fancybox.js has a slight modification that accepts a title callback JavaScript function OR a title attribute (which is not applicable ready using global settings) This has no bearing on the module, but I have used this for an AJAX title callback to populate the title caption with HTML

Are you developing from CVS? I'd love to have a peek at the direction that you are taking

Cheers

I would also like to contribute with my findings.

I am using Fancybox with Imagecache. I allowed the imagecache images to have an ALT text.

I wanted to display the image's alt text inside the fancybox caption. This is how I did it (in fancybox.module,v 1.1.2.1 on line 18):

      $(document).ready(
        function(){
          $("a'.variable_get('fancybox_class_id', '').'").each(function(){
            $(this).attr("title",$(this).find("img").attr("alt"));
          });
      ... ... ...

Hope this helps somebody if interested.

So excited this is finally getting some love!!!

't was 'bout time!

I was going to offer to become a contributor / maintainer, but it looks like there is some progress happening? (as per #45)

I spent a couple of hours looking for lightboxes on the web and this one did seem like one of the better ones, but the Drupal 5 implementation just didn't work for my requirements.

The version I wrote above in #46 is a generic implementation of the plugin with a complete Drupal interface for all settings available in the plugin. This is a completely independant implementation of the module that has no relationship to the original project.

Looking back at it, I think that it needs an advanced jQuery selector option too for users. My implementation was class based targeting only, 98% of use cases. Maybe I'll add another import field that accepts any JQuery selector, (like in an advanced settings fieldset or something), but if the module is being developed independently...

StatusFileSize
new43.08 KB

Using my version at work, the project is due. So here is a tidied up version, has (untested) the old imagecache support, class based "a img" targeting and darinka suggestion for using the image alt. It tries to grabs the first img alt text, then the img title and falls back to the anchor title. This is a global configuration option [edit: for the new a.class img selectors only].

We are almost ready, in few days I'll commit new version and make a dev release so stay tuned! :)

Great news!!

@bas.hr Really? We've heard that before (see #7). ; )

Looking at #623664: Non-GPL code included in Fancybox CVS folder, you got CVS access in December. Why are you still developing via LaunchPad? I know I'd at least like to get my hands on a broken build through D.O. Also, if I'm looking at the right LP project (https://code.launchpad.net/drupal-fancybox), it shows ZERO commits in the last month. Can we get more of an update than 'coming soon'?

Status:Active» Fixed

Initial version is in the CVS. I've created dev release, will show up when the packaging script runs

Title:Drupal 6 versionSuggestion
Version:5.x-1.x-dev» 6.x-1.x-dev

I just have a suggestion while the development is still on. It would be great if Fancybox integrates with Views like Lightbox does.

Category:task» support
Priority:Critical» Minor
Status:Fixed» Closed (fixed)

The above got posted as an Issue by mistake. Please excuse me for the mistake

Status:Closed (fixed)» Fixed

Il take a look at Views integration, please open new task

Title:SuggestionDrupal 6 version
Version:6.x-1.x-dev» 5.x-1.x-dev
Category:support» task
Priority:Minor» Normal

Hooray! Thanks bas.hr.

Priority:Normal» Critical

@bas.hr: Thank you for all your hard work!

@dboulet (referring to #53): see? and you thought they were only words ;)

anyways... on to testing and suggestions/bug reports.

PS: I am about to post a few issues. Don't freak out by the number of issues, they'll only serve as a to-do list and related work/patches/issues can be posted there.

Just do it :)

#742696: Views integration takes care of #56 and #58 ;)

Status:Fixed» Closed (fixed)
Issue tags:-fancy box

Automatically closed -- issue fixed for 2 weeks with no activity.