Rotate Plugin is causing my Gallery lightbox to stop working

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
djkirstyjay
Forum Members
Forum Members
Posts: 206
Joined: Tue Oct 25, 2005 4:50 pm

Rotate Plugin is causing my Gallery lightbox to stop working

Post by djkirstyjay »

I seem to be having a javascipt issue between lightbox and the rotate plugin.

I have just installed the rotate plugin on a friend's site and his gallery was working fine with lightbox before, but now it doesn't.

When I put the gallery javascript second, the lightbox works. If I put the rotate plugin JS second, then the header rotates, but the gallery doesn't work.

Can anyone shed any light (no pun intended) on the issue? :D

I'm using :
Gallery 1.4
Rotate 0.3
CMSMS 1.8.1


Here's all the JS :

Code: Select all

<!-- Rotate JS -->
<__script__ src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></__script>
<__script__ src="plugins/cycle.js" type="text/javascript"></__script> 

<!-- Gallery/Lightbox JS -->
<link rel="stylesheet" href="modules/Gallery/templates/css/Lightbox.css" type="text/css" media="screen" />
<__script__ type="text/javascript" src="modules/Gallery/templates/lightbox/js/prototype.js"></__script>
<__script__ type="text/javascript" src="modules/Gallery/templates/lightbox/js/scriptaculous.js?load=effects,builder"></__script>
<__script__ type="text/javascript" src="modules/Gallery/templates/lightbox/js/lightbox.js"></__script>
</head>
Thanks in advance!
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Rotate Plugin is causing my Gallery lightbox to stop wor

Post by RonnyK »

And you arent calling JQuery in the Gallery-template as well?

Ronny
djkirstyjay
Forum Members
Forum Members
Posts: 206
Joined: Tue Oct 25, 2005 4:50 pm

Re: Rotate Plugin is causing my Gallery lightbox to stop wor

Post by djkirstyjay »

not that I can see on the source code...?

But I have just tried moving just the jquery js link in front of the gallery js and it stopped the header rotating, so it may be a a jquery issue, rather than the contents of cycle.js

I know bugger all about js though! So I may be wrong!
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Rotate Plugin is causing my Gallery lightbox to stop wor

Post by RonnyK »

You could check the template in the gallery-module, when there, there is a textbox with the specific javascripts that are called for Gallery...

Ronny
djkirstyjay
Forum Members
Forum Members
Posts: 206
Joined: Tue Oct 25, 2005 4:50 pm

Re: Rotate Plugin is causing my Gallery lightbox to stop wor

Post by djkirstyjay »

Yes, I have checked this, and the javascripts listed are the ones that are in the source code above, no more... no less.

What I have found out, from our friend google, is that there seems to be an issue with jquery and lightbox in general... there is a fix, but i am unsure what I need to do and if I need to edit core files to fix it.... knowing sweet FA about JS, an all! lol

Here's one of the many links.

http://www.codingforums.com/showthread.php?t=144887

It says something about editing the actual JS files, but I am a bit unsure about doing this, as I may mess it up. I do not fully understand what they are talking about.

and here's the search :
http://www.google.co.uk/#hl=en&source=h ... fp=1&cad=b

Thanks for your help thus far :)
djkirstyjay
Forum Members
Forum Members
Posts: 206
Joined: Tue Oct 25, 2005 4:50 pm

Re: Rotate Plugin is causing my Gallery lightbox to stop wor

Post by djkirstyjay »

I have found that lightbox does not work with jQuery. No idea why, but it seems to be an ongoing issue, so maybe the gallery developer needs to look into this conflict in the future, as there is a Jquery lightbox version too, that does not have issues.

However... if anyone is getting a similar problem, you can use the slimbox template instead and this does not have issues, but looks similar to lightbox.

So... not solved the problem as such, but there is an alternative :)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Rotate Plugin is causing my Gallery lightbox to stop wor

Post by Dr.CSS »

Both of them use $ as a call for js so you need to tell jquery to use no conflict...

http://api.jquery.com/jQuery.noConflict/
djkirstyjay
Forum Members
Forum Members
Posts: 206
Joined: Tue Oct 25, 2005 4:50 pm

Re: Rotate Plugin is causing my Gallery lightbox to stop wor

Post by djkirstyjay »

Yes, thanks... I had figured out that from the forum posts I've read on other forums, however as I know nothing about JS, I have no idea whether I need to edit this in the gallery, the JS files for the gallery, the rotate plugin, etc. So changing to slimbox has worked instead.

As I said earlier, I don't really want to mess with the core files of either the plugin or the module unless I know what I'm doing, as I do not want to mess it up, and the instructions are not particularly clear.

Thanks for the reply though :)
Post Reply

Return to “Modules/Add-Ons”