coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: claude258 on October 13, 2005, 03:39:03 AM

Title: Fullsize popup fit screen
Post by: claude258 on October 13, 2005, 03:39:03 AM
I would like to know if it is possible to have the popup original (popup from intermediate image clic) fitting the screen. I mean small original or bigger original images will be resized to fit the screen / brower without having to use the scrollbars.

I saw this post:
http://forum.coppermine-gallery.net/index.php?topic=2755.0
but I dont understand how to do it with CVS.

I search for other but I was not able to find.

Is there a mod I can do to achive this?
Title: Re: Fullsize popup fit screen
Post by: Joachim Müller on October 13, 2005, 05:30:31 AM
you'll have to implement a bit of JavaScript that tries to detect the resolution the user has and add it to the displayimage.php code. Take a look at http://dynamicdrive.com/dynamicindex8/automax.htm how to achieve this.
Title: Re: Fullsize popup fit screen
Post by: claude258 on October 13, 2005, 02:41:15 PM
In fact, what I would like to do is to fit large images in the screen. Now it is OK the browser is fitting the screen. But with large images (high resolution) it does not fit in the browser (we need to use the scroolbars to see it). Can we rezise the images to fit in the browser (small images will become bigger and or big images will become smaller)?

Thanks again.
Title: Re: Fullsize popup fit screen
Post by: Stramm on October 13, 2005, 03:16:05 PM
you use the technique seen in the link GauGau posted to modify the img tag for the fullsized image (to be found in displayimage.php -> function display_fullsize_pic)
Title: Re: Fullsize popup fit screen
Post by: claude258 on October 13, 2005, 03:55:54 PM
I just whant to make sure I understand.
The script posted by GauGau automatically maximises the browser window. But what will happend if the image is a high resolution? Will the image be minimised to fit the screen whithout the need to use scrollbars? What will happend if the image is smaller the the screen (or browser window)? Will the image be maximised to fit the screen? 
Title: Re: Fullsize popup fit screen
Post by: Stramm on October 13, 2005, 04:40:00 PM
No, this isn't a 'ready to go' solution. You'll have to do some coding yourself (as described above)
Title: Re: Fullsize popup fit screen
Post by: claude258 on October 13, 2005, 04:56:06 PM
I think to solution is here:
http://forum.coppermine-gallery.net/index.php?topic=2755.0

but I dont know how to do it the way it is presented (CVS). Can you give the exact line of code to change or add (as it is usualy done for other mods).

Thanks.