Code to avoid javascript conflicts with other fancybox addons

Permalink Browser Info Environment
Hi,
I am the author of several image gallery addons that utilize the Fancybox plugin. As of now, your Fancy Image Links addon will cause javascript errors if it is used with another addon that also uses Fancybox. You can fix this problem by changing lines 33 and 34 in /packages/fancy_image_links/blocks/fancy_image_links/controller.php from this:
$this->addHeaderItem($html->css($bv->getBlockURL() . '/fancybox/jquery.fancybox-1.3.4.css'));
$this->addHeaderItem($html->javascript($bv->getBlockURL() . '/fancybox/jquery.fancybox-1.3.4.pack.js'));

...to this:
$this->addHeaderItem($html->css($bv->getBlockURL() . '/fancybox/jquery.fancybox-1.3.4.css', null, array('handle' => 'jquery.fancybox', 'version' => '1.3.4')));
$this->addHeaderItem($html->javascript($bv->getBlockURL() . '/fancybox/jquery.fancybox-1.3.4.pack.js', null, array('handle' => 'jquery.fancybox', 'version' => '1.3.4')));


Best,
Jordan

Type: Discussion
Status: New
jordanlev
View Replies:
dwayneparton replied on at Permalink Reply
dwayneparton
Thanks Jordan. I made the changes

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.