phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

Stop cutting off images when "too" wide...

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!

Stop cutting off images when "too" wide...

Postby doktornotor » Wed Dec 21, 2011 5:41 pm

Really cannot believe this still has not been fixed.

Open: styles/prosilver/theme/common.css

Find:
Code: Select all
img {
   border-width: 0;
}


Replace with:
Code: Select all
img {
   border-width: 0;
   max-width: 100%;
}


This is extremely annoying when people post screenshots, the issue can be seen in loads of thread on the forum here.
doktornotor
Registered User
 
Posts: 27
Joined: Wed Dec 21, 2011 5:34 pm

Re: Stop cutting off images when "too" wide...

Postby naderman » Wed Dec 21, 2011 6:21 pm

Please create a ticket on the bug tracker for this, thanks!
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1649
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

Re: Stop cutting off images when "too" wide...

Postby doktornotor » Wed Dec 21, 2011 6:25 pm

Sure thing, will do ASAP. ;)
doktornotor
Registered User
 
Posts: 27
Joined: Wed Dec 21, 2011 5:34 pm

Re: Stop cutting off images when "too" wide...

Postby Arty » Thu Dec 22, 2011 8:49 pm

That's a bad solution. It will affect all images, not only images in posts, including custom logos, ads, etc. If you want to resize image, add code for
Code: Select all
.postbody img
Formerly known as CyberAlien.
User avatar
Arty
Styles Team
Styles Team
 
Posts: 796
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars

Re: Stop cutting off images when "too" wide...

Postby doktornotor » Thu Dec 22, 2011 10:35 pm

Arty wrote:That's a bad solution. It will affect all images, not only images in posts, including custom logos, ads, etc. If you want to resize image, add code for
Code: Select all
.postbody img


Well, when your logos/ads end up being cut off, you have a bigger problem I guess? :D Ideally, you should get a full sized image popup after clicking on the shrinked one, which would involve changing the following line in includes/bbcode.php to something suitable for that purpose

Code: Select all
'img'      => '<img src="$1" alt="' . $user->lang['IMAGE'] . '" />',


Ideally, bundling something like the ReIMG Image Resizer mod would solve all this but that is something left for 3.1.x at best, I'm afraid. Either way, getting the images cut off abruptly is really the worst solution out there.

P.S. Adding the ticket reference: PHPBB3-10543.
doktornotor
Registered User
 
Posts: 27
Joined: Wed Dec 21, 2011 5:34 pm

Re: Stop cutting off images when "too" wide...

Postby AmigoJack » Fri Dec 23, 2011 10:31 am

Personally I dislike resizings (browsers on slow computers are not amused with that). Everything that's missing is a scrollbar in such a case, like you already find it for decades in almost every UI (aka overflow: auto;).
User avatar
AmigoJack
Registered User
 
Posts: 59
Joined: Wed May 04, 2011 7:47 pm
Location: グリーン ヒル ゾーン

Re: Stop cutting off images when "too" wide...

Postby canonknipser » Fri Dec 23, 2011 5:17 pm

Personally, i dislike large images in post at all for different reasons.
But in my opinion resizing is much better than having a scrollbar
It should have no effect on browser performance, because in both cases the browser has to load the image complete. Having full-size images, it will break the design of the page, because every content on the right goes off and you have to scroll horizontal, the image is not shown "at a glance" (the same like cutting it!).
Think about hi-res images from a modern DSLR, 6,000px horizontal means you have to scroll 5 complete pages on a 1024px browser window.
Greetings, Frank

Visit us at http://www.dslr-seite.de/forum
english is not my native language
User avatar
canonknipser
Registered User
 
Posts: 45
Joined: Mon Sep 19, 2011 4:42 am
Location: Germany

Re: Stop cutting off images when "too" wide...

Postby callumacrae » Sat Dec 24, 2011 8:55 am

canonknipser wrote:It should have no effect on browser performance, because in both cases the browser has to load the image complete.

It most certainly will have an affect!
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 883
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: Stop cutting off images when "too" wide...

Postby doktornotor » Sat Dec 24, 2011 9:26 am

canonknipser wrote:But in my opinion resizing is much better than having a scrollbar


Yeah, horizontal scrollbars are horrible and break the entire layout.
doktornotor
Registered User
 
Posts: 27
Joined: Wed Dec 21, 2011 5:34 pm

Re: Stop cutting off images when "too" wide...

Postby Ger » Sat Dec 24, 2011 12:14 pm

Above message may contain errors in grammar, spelling or wrongly chosen words. This is because English isn't my mother tongue. My apologies in advance.
User avatar
Ger
Registered User
 
Posts: 176
Joined: Mon Jul 26, 2010 1:55 pm
Location: 192.168.1.100


Return to [3.0/Olympus] Discussion

Who is online

Users browsing this forum: No registered users and 12 guests