forum.coppermine-gallery.net

No Support => Feature requests => Topic started by: oshelef on March 14, 2005, 07:49:43 am

Title: Film strip show number of images based on width?
Post by: oshelef on March 14, 2005, 07:49:43 am
feature request for filmstrip:

Rather than show a fixed number of images in the filmstrip, I'd like to show the number of images that fit the width of the page. When the thumbnails are narrow it would show many, and when wide, it would show a few?

Thanks...

Orie
Title: Re: Film strip show number of images based on width?
Post by: Joachim Müller on March 14, 2005, 09:17:18 am
There's no way to reliably check what resolution a user is browsing with, so this can not be done easily. I don't think this will make it into the core code, but you're wlecome to post a hack.

Joachim
Title: Re: Film strip show number of images based on width?
Post by: oshelef on March 22, 2005, 06:39:58 pm
My thought was not to base it on the viewer's resolution, but simply on a set, configured, width.

Orie
Title: Re: Film strip show number of images based on width?
Post by: kegobeer on March 22, 2005, 08:09:29 pm
That wouldn't be easy to do.  You'd basically have to fetch one image from the database, actually look at the thumbnail and calculate it's width, add it to a variable that would total up all thumbnail widths, then compare that against your configured width.  Repeat as necessary.  Could be up to 10 queries.  Or you'd have to fetch a bunch of images from the database as an array, then loop thru that array and do the total/compare actions.  If the Width of the table for file display, which I assume you'd use for a comparison, is set to a percentage, this wouldn't work at all.

That's a lot of coding and testing.  I agree with Joachim, this isn't something likely to go into code code, but knock yourself out and code a hack!