Dragonfly CMS v9 ⇒ Coppermine ⇒ [solved] restrict image size to screen ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexModules & BlocksCoppermine

[solved] restrict image size to screen Reply to topic


Is there a way to make the full size image view restrict the image size to your screen size, I have the same request for the slide show as well.

Currently the image makes the site change size and brings up the scrolling bars. I wish to at least prevent this at least for left to right.

Any help is appreciated

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
unix / Apache 2.2.15 / MySQL 5.0.92 / PHP 5.3.8/ CMS 9.4.0.0


Search for "image resize" - 3 of the 1st 5 replies give you options.

Pro_News CM™ - Content Management for Dragonfly CMS™

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 1.3.39 - 2.4.9 / 5.5.42 - 5.6.16 / 5.4.37 - 5.5.11 / 9.4


Hi guys, I never noticed Bush and Layingback rightful problem and related workaround so I never had the chance to put my 2 cents in.

I would rather use css and themes ref to nukebiz.com/Forums/vie...3084/#3084

in your theme's style.css
.bigimage { max-width:600px }

in your theme's ie6.css
.bigimage { width: expression(this.clientWidth > 600 ? "600px" : "auto") }

then only in the images where you think appropriate you will have to add
class="bigimage"

[edit]
Using this.clientWidth
Use in ie6.css instead of ie7.css
[/edit]

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head

Last edited by NanoCaiordo on Mon Nov 28, 2011 8:08 am; edited 2 times in total


For forum topics, replies, previews:

  • /themes/default/styles/style.css
.postbody img{ max-width: 600px; }

  • /themes/default/styles/ie6.css (v9)
  • /themes/default/styles/ie8.css (v9)
  • /themes/default/styles/msie6.css (v10)
  • /themes/default/styles/msie8.css (v10)
/** * CPG Dragonfly CMS * Copyright (c) 2011 by Dragonfly Dev Team, dragonflycms.org * Released under the GNU GPL version 2 or any later version */ .postbody { width:600px; } .postbody img{ width: expression(this.clientWidth > 600 ? "600px" : this.clientWidth+"px"); /*height: expression((this.clientHeight * (this.style.width/this.clientWidth))+"px");*/ }

  • Open: /themes/default/templates/forums/viewtopic_body.html
  • Line: 98
  • Change:
<td colspan="2"><hr /><div class="postbody" style="overflow:auto; width:100%;">{postrow.MESSAGE}</div>
  • With:
<td colspan="2"><hr /><div class="postbody" style="overflow:auto">{postrow.MESSAGE}</div>

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head

Last edited by NanoCaiordo on Mon Nov 28, 2011 11:35 am; edited 2 times in total


Thanks guys for the replies, but I was meaning just in the Coppermine, popup window for full screen image views.

When I view them currently the are about 2 times the size of the screen. I just want to have them fit the screen in width.

Does the forum code you have given suit coppermine as well?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
unix / Apache 2.2.15 / MySQL 5.0.92 / PHP 5.3.8/ CMS 9.4.0.0


Code edited.

Will soon updated with coppermine.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head


Thanks Nano

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
unix / Apache 2.2.15 / MySQL 5.0.92 / PHP 5.3.8/ CMS 9.4.0.0


I've got a little confused ... in coppermine we have a pop up for "full size" images, not "full screen".

Two ways, to achieve this.
You can setup your coppermine max img size to your favourite dimensions, and it will be valid for all your new pictures, preferred.

Otherwise it have to be done at javascript level, not built-in since we all want full size images to maintain a high resolution.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head


Happy with the presivation of the resolution, but when people view the album in slide show or just the lager image they only get to view the top left corner of the higher resolution picture.
Great for preserving resolution not that good for the users viewing albums or using slide shows.
I will try and look for js functionality to manage this.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
unix / Apache 2.2.15 / MySQL 5.0.92 / PHP 5.3.8/ CMS 9.4.0.0


I'm sure we are not talking about the same thing.

Pass me a url and directions (clicks) to an accessible page, where I can see what you are talking about.

Coppermine have a correct amount of settings for image and thumbnail sizes for you to have this problem ...

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head


Try this slide show Nano

Slide show

Once you click on it you will see that it shows the full resolution image but not the image at full screen.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
unix / Apache 2.2.15 / MySQL 5.0.92 / PHP 5.3.8/ CMS 9.4.0.0


So what i want to acheive is large full resolution images displayed full screen during a slide show.

Not just a slide show of just top left hand corner of the full resolution image.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
unix / Apache 2.2.15 / MySQL 5.0.92 / PHP 5.3.8/ CMS 9.4.0.0


Cant have full resolution image display at full screen, unless the image resolution is less then screen size.

What you want is to get the slideshow image to fit inside the screen (so at reduced resolution), which can be easily achieved by correctly using coppermine settings.

Paste here all coppermine related image settings, and we will have a look together.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head


Thanks Nano

I have attached what I think you want to look at.
Attachment: untitled.gif
Description
Filesize 104.70 KiB
Viewed 9 Time(s)
You are not allowed to view/download this attachment

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
unix / Apache 2.2.15 / MySQL 5.0.92 / PHP 5.3.8/ CMS 9.4.0.0


admin.php?op=info&mods
do you see gd, imagemagick or netpbm installed?

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.7 / PHP 7.3 / head

All times are UTC


Jump to: