PDA

View Full Version : default size auto or user selectable?


dscottf
22nd of February 2003 (Sat), 00:30
Just installed ee today and I am very impressed.

took me a while to fully understand the pathing, but now I understand it (thanks to this board)

Question-
is there a way to either:

have the viewer choose a size that they want to view all photos at (say I have a 1600x1200 screen and a T1, I want to see a larger photo by default than someone on a 640x480/dial up.)

or...
Auto detect for screen size and set default

I could detect the screen size (screen.availWidth) and set a size based on what size monitor the viewer has.

Can this be done? (read a cookie in photo.php I would guess)

Thanks

Pekka
22nd of February 2003 (Sat), 03:13
Both techniques need querying image size from all size paths before displaying it, and this always slows pages down. Also there should not be a requirement to have Javascript on if the feature is essential for viewing photos.

There could be size menu choice "show always the largest size" and "show always the smallest size" which would not need Javascript. Those are pretty easy to code, but as I mentioned they will slow things down especially when images are on slow servers all around the net.

PS. I've used screen width detection in http://photography-on-the.net/gallery/feedback.php and there in iFrame browser (change window size and press refresh, it readjusts iframe cell sizes relative to window width and height by certain percent).

dscottf
24th of February 2003 (Mon), 13:42
But, when a new size is chosen in the photo.php view, it remembers that new size for subsiquent display.

I just want to be able to enter that size [choice] elsewhere (session varaible?), automatically (once per session, say, on loading the index page), or user selectable from the index page.

>Also there should not be a requirement to have Javascript on if the
>feature is essential for viewing photos.

if javascript was not on, the script would not run, thus leaving the 'default' to default. that breaks gracefully