Film strip show number of images based on width? Film strip show number of images based on width?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Film strip show number of images based on width?

Started by oshelef, March 14, 2005, 07:49:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

oshelef

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

Joachim Müller

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

oshelef

My thought was not to base it on the viewer's resolution, but simply on a set, configured, width.

Orie

kegobeer

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!
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots