hello,

is there any version of fancybox they works with drupal 7? i have installed the the fancybox 7.x-1.x-dev in the drupal 7-beta-1 and activated but it doesn't works. If i see the code of the page there will be no including of the 'jquery.fancybox-1.3.2.js' in the only the 'query.fancybox-1.3.2.css' is there.

Thanks

CommentFileSizeAuthor
#4 patch_commit_f3489f0f3925.patch627 bytesjdelaune

Comments

PMatwyuk’s picture

Just wondering if there has been update to this, nothing breaks when the module is installed, and everything appears to be configured properly just don't get the fancybox functionality. If you guys need any help let me know where and will be glad to help.

Thought I would post more on this. If I click on an image nothing happens. It knows to link to the original image however nothing happens.

Liam Mitchell’s picture

Title: Drupal 7 and Fancybox » Error when defining fancybox callback settings
Category: support » bug
Priority: Normal » Critical
Status: Active » Needs review

Sorry to hijack your post but but your problem is most likely this caused by this.

If you check the javascript debug console, errors are thrown when onStart, onComplete etc. callbacks are are executed. This is because they are not properly defined when fancybox is loaded.

Adding the below code to js/fancybox.js after the line var settings = Drupal.settings.fancybox; should fix the problem.

    // Convert any JavaScript events to function calls.
    var events = ["onStart", "onComplete", "onClosed", "onCleanup", "onCancel"];
    for (var i in events) {
      if (settings.options[events[i]].length && typeof(settings.options[events[i]]) == 'string') {
        settings.options[events[i]] = eval("("+settings.options[events[i]]+")");
      }
      else {
        delete settings.options[events[i]];
      }
    }

Javascript will still fail on load if the callback values set on the config page are anything other than function names.

Jeff Burnz’s picture

#2 appears to work for me, although clicking on any image just gives an error message:

"The requested content cannot be loaded. Please try again later."

I am wondering if this is because I am using private download? I'm using this with image field type.

jdelaune’s picture

StatusFileSize
new627 bytes

Should have check this before I patched the issue myself. Here is my solution. Handles the error before it gets to the JS level.

dqd’s picture

Still wonder why that fancybox module isn't making anything at all on d7, not even breaking something or changing any output?!? And there is no documentation about some obvious undefined options of it. Selecting Fancybox image styles doesn't do anything on the output of content type by the same view and in the options there is no pointing to how to activate it for standart drupal image field.

I look into the code of the module, see some commented out To-Do-Codes and still miss some javascript parts for the header and can't see where the module changes the output of the image field??? And this issue here is almost 3 weeks old. Is this module dead?

dqd’s picture

Assigned: gandhi » Unassigned

I think this shouldn't be assign to a user rather than to a maintainer ??

bas.hr’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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