A good solution for displaying galleries with lytebox and php

Posted by Johann on Stack Overflow See other posts from Stack Overflow or by Johann
Published on 2010-12-26T13:15:34Z Indexed on 2010/12/26 13:54 UTC
Read the original article Hit count: 249

Filed under:
|
|
|

Hello

I have thought for a while over an issue with the loading of images on a website-solution that I have programmed (For fun and the experience)

The programming language used is PHP with MYSQL as the database language It also uses javascript, but not extensively

I have recently realized that the engine I programmed, while it has it's smart solutions also carry a lot of flaws and redundant code. I have therefore decided to make a new one, now incorporating what I know, but didn't when I started the previous project.

For the new system, there will be an option to add galleries to a site, and upload images to it. I have used the javascript image viewer Lytebox before. The screen goes dark and an image appears with a "Previous" and "next" button to view the other images.

The problem is that I used groups with lytebox and the images themselves, resized as thumbs. This causes lytebox to work only when all the images have loaded. If you click a link before that, the image is shown as if you right click and choose "Show image"

Information about these images is parsed from a database using a while statement with a counter that goes from 0 to sizeof()

I'm thinking it probably isn't a good idea to have the images as the thumbs, even if you restrict the upload size. Likewise, adding thumbs at upload also seems like a hassle. It would be practical if the thumbs didn't show up before they were fully loaded.

Has anyone got any good tips. Any help would be appreciated.

Johann

© Stack Overflow or respective owner

Related posts about php

Related posts about JavaScript