Multibox for MooTools 1.2 - working version

lightbox that supports images, flash, video, mp3s, html

Multibox for MooTools 1.2 - working version

by liam.smart on Sat Oct 25, 2008 5:54 pm

Ok, I know Samuel is working on v1.4 but I have updated Phatfusions multiBox to work with MooTools v1.2.

view/download it here Multibox for MooTools 1.2 & 1.2.1.

It was more time consuming than I thought it would be. The Ajax request and html element were real puzzlers. I have managed to get the Ajax request working fine (you can view the code to see what’s in place), but I feel the following code should go in its place as this is how the MooTools docs says how to use Ajax requests. I don’t get any errors with the following code, but the Ajax isn’t put into the container…

Proposed Ajax request code:

new Request({
url: this.contentObj.url,
method: 'get',
update: 'MultiBoxContentContainer',
evalScripts: true,
autoCancel: true
});

I am sure it is 99% correct but if anyone knows what I'm doing wrong, then please let me know, either on this forum, my email address which is in the scripts, or via my website.

I have added the following options whilst I was in there modifying them:

- hover transition
- icon-overlay
- resize options (max width and height)
- chain transition through the images if any
- download option for each piece of media

One thing I would like to add is the ability to put files into groups so the user will only be able to navigate through items belonging to same group.

I fixed a few IE6 bugs in the CSS, changed the sizing script in the overlay so it works better in IE6 (not sure why it didn’t work with
MooTools 1.2.1 so I just did it a slightly different way and it seems to work fine).

This updated version of multiBox is tested in IE6 & 7 and Firefox 3. I made sure all original file types work fine, and they are all included on the default page within the zipped folder. It would be good if other people could test it in different browsers.

Enjoy!
Last edited by liam.smart on Tue Nov 11, 2008 8:59 am, edited 7 times in total.
Thanks,
Liam
http://www.liamsmart.co.uk
liam.smart
 
Posts: 28
Joined: Tue May 27, 2008 9:38 am
Location: Dundee, Scotland

Re: Multibox for MooTools 1.2.1

by nelwa on Mon Oct 27, 2008 2:26 pm

Hi There,

Firstly thanks for the mootools 1.2.1 compatibility, it seems to work great, except for one thing.

The loading page's stylesheet is no longer applied to the content loaded (via ajax) into multibox. It is styled with browser default styles...

Do you have any idea on what I'm doing wrong?

Thanks
nelwa
 
Posts: 2
Joined: Thu Jun 19, 2008 7:28 am

Re: Multibox for MooTools 1.2.1

by liam.smart on Wed Oct 29, 2008 9:54 am

The the Ajax request is a tricky one.

I don't think I'm doing it right. Like I said in my original post, I think it should be done with my example code, however, I would need someone with more knowledge in that area to back me up and let me know what is wrong with the code.

I will try and have a look at it and see what I can do.
Thanks,
Liam
http://www.liamsmart.co.uk
liam.smart
 
Posts: 28
Joined: Tue May 27, 2008 9:38 am
Location: Dundee, Scotland

Re: Multibox for MooTools 1.2.1

by liam.smart on Sat Nov 01, 2008 3:31 pm

nelwa wrote:Hi There,

Firstly thanks for the mootools 1.2.1 compatibility, it seems to work great, except for one thing.

The loading page's stylesheet is no longer applied to the content loaded (via ajax) into multibox. It is styled with browser default styles...

Do you have any idea on what I'm doing wrong?

Thanks


Hi Nelwa,

I checked the 1.1 version of multibox on Phatfusions website and the Ajax page load is acting exactly the same as the 1.2 version.
Thanks,
Liam
http://www.liamsmart.co.uk
liam.smart
 
Posts: 28
Joined: Tue May 27, 2008 9:38 am
Location: Dundee, Scotland

Re: Multibox for MooTools 1.2 - working version

by liam.smart on Fri Nov 14, 2008 11:37 am

I recieved an email with regards to a bug in the overlay script.

I was getting the height by using:

Code: Select all
height:this.options.container.getSize().y+'px'


Even though FF and Opera etc like that, I had to change it to the following to get IE 6&7 to behave:

Code: Select all
height:$(this.options.container).getSize().y+'px'


Not sure my IE needs a selector around it? Can anyone let me know why that is?

Whilst I was fixing that I noticed IE6 had a minor bug as well. If you have a width set on your body (which most poeple dont anyways but my example page does), then the overlay would end up the exact width of that as container is set to document.body.

So I made sure the width is calculated from the width of the browser window and problem is solved.
Thanks,
Liam
http://www.liamsmart.co.uk
liam.smart
 
Posts: 28
Joined: Tue May 27, 2008 9:38 am
Location: Dundee, Scotland

Re: Multibox for MooTools 1.2 - working version

by liam.smart on Tue Nov 18, 2008 11:39 am

Hi all,

For some reason (and I just noticed it), multiBox isnt closing when you click on the overlay. Can any MooTools expert have a look at the code (http://www.liamsmart.co.uk/Downloads/multiBox/) and see whats going wrong.

I just cant get it to work.
Thanks,
Liam
http://www.liamsmart.co.uk
liam.smart
 
Posts: 28
Joined: Tue May 27, 2008 9:38 am
Location: Dundee, Scotland

Re: Multibox for MooTools 1.2 - working version

by liam.smart on Mon Nov 24, 2008 12:14 pm

Overlay click/close issue fixed and updated files uploaded to my website for you to download.
Thanks,
Liam
http://www.liamsmart.co.uk
liam.smart
 
Posts: 28
Joined: Tue May 27, 2008 9:38 am
Location: Dundee, Scotland

Re: Multibox for MooTools 1.2 - working version

by liam.smart on Thu Dec 11, 2008 1:50 pm

D'oh! I didnt have the correct path to the mp3 and video player... I bet people went on my website and thought to themselves... "none of the media files even work"....

Well they do now.
Thanks,
Liam
http://www.liamsmart.co.uk
liam.smart
 
Posts: 28
Joined: Tue May 27, 2008 9:38 am
Location: Dundee, Scotland


Return to multibox

Who is online

Users browsing this forum: Alexa [Bot] and 1 guest