PDA

View Full Version : Lightbox 2 problems


dubaco
12-09-2010, 02:12 PM
Hi

I have strange things happening on my "test page" here

http://www.petandhouseportraits.co.uk/lightbox/testlight.htm

The close button isn't showing completely.

Also, this is running from a sub directory called "lightbox" and when I try to move everything up a folder to use the root folder versions of images, js and css it stops working and I have folowed Corrosive's checklist from a previous thread.


<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<script type="text/javascript" src="/lightbox/js/prototype.js"></script>
<script type="text/javascript" src="/lightbox/js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="/lightbox/js/lightbox.js"></script>

<link rel="stylesheet" href="/lightbox/css/lightbox.css" type="text/css" media="screen" />

</head>

<body>

<a href="/lightbox/images/image-1.jpg" rel="lightbox"><img src="/lightbox/images/thumb-1.jpg" /></a>

<a href="/lightbox/images/dogs.jpg" rel="lightbox"><img src="/lightbox/images/dogs.jpg"></a>



</body>
</html>lightbox.js has these lines in it

LightboxOptions = Object.extend({
fileLoadingImage: '/lightbox/images/loading.gif',
fileBottomNavCloseImage: '/lightbox/images/closelabel.gif',
and the css file has:

#prevLink:hover, #prevLink:visited:hover {
background-image: url(/lightbox/images/prevlabel.gif);
background-repeat: no-repeat;
background-position: left 15%;
}
#nextLink:hover, #nextLink:visited:hover {
background-image: url(/lightbox/images/nextlabel.gif);
background-repeat: no-repeat;
background-position: right 15%;
}Any help would be gratefully appreciated

Corrosive
12-09-2010, 02:14 PM
Just a guess but have you tried it with a larger target image?

DWcourse
12-09-2010, 02:19 PM
Re-upload the "close" image. It looks like it didn't upload properly.

Ricky55
12-09-2010, 08:48 PM
I did this video last week for another user who didn't even thank me. Its using Colorbox, which I actually prefer to Lightbox.

Check it out if you want.

Here you go mate hope you can follow it come back to me if you need any further help.

The video
http://vimeo.com/17454106

The Exercise Files
http://dl.dropbox.com/u/508261/Colorbox%20Tutorial.zip

Let me know how you get on.

Thanks

Richard

Corrosive
12-10-2010, 07:09 AM
I did this video last week for another user who didn't even thank me.

That sucks :(

Speak to Ove and we could get it up on the site for everyone to use. I prefer colorbox to lightbox nowadays.

dubaco
12-10-2010, 07:57 AM
Check it out if you want.

Here you go mate hope you can follow it come back to me if you need any further help.

Thanks Ricky, I looked at your colourbox vid, (actually played with it some months ago, can't remember why I didn't use it.) so I'll give it a go.

Ricky55
12-10-2010, 04:12 PM
I think its much cooler than Lightbox plus it doesn't link to as many JS files to get it to work.

Takes some beating IMO.

Ricky55
12-10-2010, 04:15 PM
Cheers Corrosive I'm sure he'll see this if you wants to use it I'm more than happy for him to do so.

I might do a few others actually they could do with a refresh. I did start a CSS3 series some time back but things move that quickly some of it isn't quite as relevant as it was.

I think just general CSS and writing decent HTML would probably be more useful to most of the new users though.

DWcourse
12-10-2010, 04:50 PM
I did this video last week for another user who didn't even thank me. Its using Colorbox, which I actually prefer to Lightbox.

Your reward will be in heaven. However I can't guarantee that you'll be able to collect it. :twisted:

Ricky55
12-10-2010, 05:54 PM
I'm an atheist mate so would have been nice to get a thank you while I'm alive and kicking.

Still thanks DW for the thought.

spazzer
12-10-2010, 06:02 PM
Hi Ricky,
Took a look at your video on colorbox, very useful and nice video, on the video you say you the files zipped for e-mailing out if required ?
Any chance you could forward them to me mate ?
my e-mail is nickcarter68@googlemail.com if you can that would be appreciated !

All the Best, Nick C :)

Ricky55
12-10-2010, 09:17 PM
Thanks mate.

I recorded that video for a specific user that's why I said about emailing the files.

The files are now here for everyone who wants them.

http://dl.dropbox.com/u/508261/Colorbox%20Tutorial.zip

Nothing special really all available and more from the colorbox website but they may help you to follow along with the tut.

Cheers

spazzer
12-11-2010, 09:11 PM
Hi Ricky,
Thanks for all the info, got it all working and think its great, have used lightbox before but this is better !

Thanks Again,
Nick C :grin:

Ricky55
12-12-2010, 11:32 AM
Nice one, good to hear you've benefitted from it.

spazzer
12-12-2010, 08:10 PM
Hi Ricky,
Everything working fine in Firefox but not in IE, I notice this in the css file for colorbox

!! Important Note: AlphaImageLoader src paths are relative to the HTML document,
while regular CSS background ../images are relative to the CSS document.

Can you help with this please ?

Cheers Nick C

Ricky55
12-12-2010, 08:28 PM
I'll have a look for you now mate.

Ricky55
12-12-2010, 08:42 PM
Well my version appears to working fine in IE7.

When you say not working what do you get? Does it work but the colorbox images are not appearing correctly? I suspect this is the case if its working fine in Firefox.

If you follow the file / folder structure I had then you should be fine mate.

If you have changed things to suit your site then as the colorbox.css file states your image paths must be as follows:

The main images should be relative to the css file. So if the colorbox.css is in a folder and your images are in a different folder then your path would start

../ = To get you up one level
then images to go into the images folder
so it would be ../images/controls.png

But the IE specific images are relative to the HTML file that you are using. Without seeing your folder structure I can't say exactly what the path should be but in my example my index file was just in the root folder and my images where located in images/internet_explorer so that was my path.

Do you understand what I mean?

If not I'll record a short video as a few people seem to struggle with file paths.

spazzer
12-12-2010, 09:11 PM
Hi Ricky,
I have attached a zip file pic of file structure, I couldnt get all in in pic but the colorbox is installed in portfolio/index.html
My Images for colorbox are at the bottom where I have a folder for images/colorbox/images/internet_explorer.
The CSS for colorbox is in the CSS/colorbox folder
hope this makes some sort of sense.
A short vid would be a great help not just for me but everyone !
Thanks for all your assistance

Thanks again for help ;-)

Ricky55
12-12-2010, 10:42 PM
It's getting a bit late now mate I'll post a response in the morning for you with a video if necessary.

Cheers

spazzer
12-12-2010, 10:56 PM
No Probs Thanks and Goodnight !

Ricky55
12-13-2010, 11:17 AM
There you go Spazzer, get a load of this!

http://vimeo.com/17759549

Leave it half hour for the vid to upload.

Cheers

spazzer
12-13-2010, 05:53 PM
Hi Ricky,
Thanks for posting the video, will check it out later !
Big thanks for your time !

Nick C

dubaco
12-13-2010, 06:02 PM
Thanks Ricky, I looked at your colourbox vid, (actually played with it some months ago, can't remember why I didn't use it.) so I'll give it a go.

Hi Ricky

Using an exact copy of your file structure, I have this working perfectly when viewing in a browser locally but the uploaded version is causing problems to the enlarged images. Have you experienced this ever?

http://www.petandhouseportraits.co.uk/colorbox/gallery.htm

Cheers for your help so far

Ricky55
12-13-2010, 06:13 PM
Its nothing to do with Colorbox Dubaco, it does the same thing when you view the file here

http://www.petandhouseportraits.co.uk/colorbox/images/dormers_lge.jpg

Just tried opening in Photoshop and its not having any of it.

It looks to me like the file(s) haven't been uploaded properly. If they are viewing fine locally they view fine on the web.

Just try uploading a single large image again and make sure it views correctly when you just browse to it.

Also make sure your files are RGB 72 DPI jpgs saved for the web.

Ricky55
12-13-2010, 06:19 PM
BTW nice page you've got going on there.

Those images may look nice with a white border and perhaps a little light CSS3 Drop shadow.

Try


img {
border: 6px solid #fff;
-moz-box-shadow: 0 0 5px #515151;
-webkit-box-shadow: 0 0 5px #515151;
box-shadow: 0 0 5px #515151;
}

spazzer
12-13-2010, 07:16 PM
Hi Ricky,
Thanks for posting vid, just took a look and sorted it out thanks and yes I understand now about file naming etc reaaly good advice excellent.

Keep up the good work mate, all the best and thanks again :grin:

Nick C

dubaco
12-13-2010, 07:30 PM
It looks to me like the file(s) haven't been uploaded properly. If they are viewing fine locally they view fine on the web.

Just try uploading a single large image again and make sure it views correctly when you just browse to it.

Also make sure your files are RGB 72 DPI jpgs saved for the web.

Really having trouble with this. Exported from both corel draw and paintshop pro, as well as the originals, none of them working. What the hell is going on? They appear to be 96dpi

Have you ever doubted your own sanity?

Ricky55
12-13-2010, 09:04 PM
Could you email one of the originals please mate and I'll take a look for you.

richard@qwerty-design.co.uk

Nothing too large please.

Might be in the morning now only just finished my eyes are killing me.

Ricky55
12-14-2010, 08:30 AM
Nothing wrong with those images mate. I took them straight from your email all I did was rename them and upload them and they seem to be working fine.

http://qwerty-demos.co.uk/

Not tested in other browsers but I can't see this being the issue. I still think it must be how they are being uploaded. Are you using dreamweaver to upload them?

dubaco
12-14-2010, 08:47 AM
Cheers for that Ricky.

This is really weird. I have also uploaded them to another account with the same host and they do the same thing, come out rather "striated" both when I run them in colorbox:

http://dubacodesign.com/colorbox/gallery.htm

and if loaded directly:

http://dubacodesign.com/colorbox/images (http://dubacodesign.com/colorbox/images/dormers_lge.jpg)/dormers_lge.jpg (http://dubacodesign.com/colorbox/images/dormers_lge.jpg)

I think I need to go back to the drawing board with this one. Why is nothing straightforward with this stuff?

Ricky55
12-14-2010, 10:20 AM
Very strange, what program are you using to upload them? Dreamweaver?

Have you tried a different FTP program?

Its either the way your uploading them, or the server that is somehow corrupting them.

Keep me posted.

Corrosive
12-14-2010, 10:20 AM
Have you ever doubted your own sanity?

Yes, every day, at least twice a day as well ;)

Ricky55
12-14-2010, 10:24 AM
I've just downloaded dormers_lge and its only 61kb so not all of the file is on the server and thats the problem.

I'd try a different FTP program or speak to your host, it might some kind of strange file size restriction that preventing them from uploading in their entirety. I have seen similar when I've uploaded with FTP and my connection has dropped half way through.

So the file is there but not the whole of it which makes sense when you look at it.

dubaco
12-14-2010, 12:07 PM
Very strange, what program are you using to upload them? Dreamweaver?

Have you tried a different FTP program?

Both dreamweaver and also FireFTP that sort of resides in FF as an add on

Ricky55
12-15-2010, 08:55 AM
have you sorted this mate?

spazzer
12-15-2010, 09:10 AM
Hi Ricky,
Do you mean the colorbox ? yes thats fine and thanks for your time buddy, if you mean my reCaptcha problem no mate, having a nightmare with it, thinking of dumping it as not working properly !
Any last minute help would be good !

All the Best,
Nick C

dubaco
12-15-2010, 05:47 PM
have you sorted this mate?

No, not yet, not sure where to go with it. Will have a go with some images on another site and before I try, I will access the image directly to try and get a clear one and then build the colorbox system.

Thanks everso though for your help and suggestions so far, I'll keep you psted as to how it goes.

P

Ricky55
12-15-2010, 10:32 PM
Oh yes get them viewing properly first. Like I've said before its either a problem in the way that they are being uploaded or a problem on the server.

If you are still struggling email me and I'll let you have some FTP details of one of my spare hosting packages. Upload to that, if they are fine then it must be something to do with the server and you should therefore speak to your host.

Thanks

Richard

dubaco
01-21-2011, 10:28 AM
Just for the record - bloody cracked it!

The images have to be uploaded as binary NOT ascii!

Found out when I gave up and tried another gallery thing and still had the problem and remembered that it stated that all images to be uploaded as binary.

Thanks for all you help Ricky, much appreciated

Ricky55
01-21-2011, 03:52 PM
How bizarre, its nothing you're doing wrong it can be as the images load fine on my hosting.

If you send me an email richard@qwerty-design.co.uk I can set up a test server for you on my host for you to test with. If it then works on my host you know its something to do with your hosting.

Thanks

Richard