Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Film strip show number of images based on width?  (Read 3380 times)

0 Members and 1 Guest are viewing this topic.

oshelef

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Film strip show number of images based on width?
« 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
« Last Edit: March 28, 2005, 08:11:02 pm by TranzNDance »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Film strip show number of images based on width?
« Reply #1 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
Logged

oshelef

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Film strip show number of images based on width?
« Reply #2 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
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Film strip show number of images based on width?
« Reply #3 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!
Logged
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
Pages: [1]   Go Up
 

Page created in 0.014 seconds with 20 queries.