Author |
Message |
mosc
Site Admin

Joined: Jan 31, 2003 Posts: 18247 Location: Durham, NC
Audio files: 225
G2 patch files: 60
|
Posted: Tue Oct 19, 2004 1:17 pm Post subject:
Image width restriction mod added... |
 |
|
I just added a very simple mod on the forum that limits the width of images loaded with the IMG bbcode to 700 pixels wide. It also puts makes the reduced image a link to the full sized image. If anyone notices any strange behavior with imagages, it might be caused by this feature.
If anyone thinks this image width should be larger or smaller than 700 pixels, please let us know.
Unfortunately, this mod doesn't work on images included with the attachment mechanism. Here is an example of an image that is more than 700 pixels.
NASA's Mars Exploration Rover Spirit takes a good look around at its surroundings high above Gusev Crater as mission planners prepare for solar conjunction on sol 244 (Sept. 9, 2004). _________________ --Howard
my music and other stuff |
|
Back to top
|
|
 |
elektro80
Site Admin

Joined: Mar 25, 2003 Posts: 21959 Location: Norway
Audio files: 14
|
Posted: Tue Oct 19, 2004 1:24 pm Post subject:
|
 |
|
Hey... cool! But what you do is "scaling" using pixel values in the img tag set... so we are actually LOADING it in the browser? Right? Which means this mod does not reduce the actual datasize of the image or the page.. it just limits image presentation to 700 pixels in width? _________________ A Charity Pantomime in aid of Paranoid Schizophrenics descended into chaos yesterday when someone shouted, "He's behind you!"
MySpace
SoundCloud
Flickr |
|
Back to top
|
|
 |
mosc
Site Admin

Joined: Jan 31, 2003 Posts: 18247 Location: Durham, NC
Audio files: 225
G2 patch files: 60
|
Posted: Tue Oct 19, 2004 1:56 pm Post subject:
|
 |
|
It works only on the images using the IMG bbcode tag. These aren't stored in that database or on our file server.
Yes, it's just a a javascript resize operation in the brower. These images are still loaded by the brower, but the display is limited to 700 pixels wide.
I'd like do something like this to the images that are stored as attachments. _________________ --Howard
my music and other stuff |
|
Back to top
|
|
 |
elektro80
Site Admin

Joined: Mar 25, 2003 Posts: 21959 Location: Norway
Audio files: 14
|
Posted: Tue Oct 19, 2004 4:20 pm Post subject:
|
 |
|
Well, first you would have to grab the filetype, then reparse the whole code around the attachment. .. or maybe not... I am not familiar with how the current code looks, but you would have to figure out the filetype first.. for every attachment. In theory this is not a hard thing to do, but it depends on the forum code. I guess it would be far simpler to write this from scratch than to patch the forum code. that said, will not all these mods make it harder to update the actual forum code? I remember I had a really hard time coping with all the small edits I had made in my old phpnuke forum. _________________ A Charity Pantomime in aid of Paranoid Schizophrenics descended into chaos yesterday when someone shouted, "He's behind you!"
MySpace
SoundCloud
Flickr |
|
Back to top
|
|
 |
mosc
Site Admin

Joined: Jan 31, 2003 Posts: 18247 Location: Durham, NC
Audio files: 225
G2 patch files: 60
|
Posted: Tue Oct 19, 2004 9:32 pm Post subject:
|
 |
|
Yes, the mods make it harder to upgrade, but not all that difficult. We are on the latest version of PHPBB. I've done 5 point releases in the last 9 months. They do a pretty good job of updates. There are many people writing mods, and even more people putting in custom hacks.
This wide picture limiter is a very clever 3 line change. It uses the javascript image property .width. It works sorta like an audio limiter.  _________________ --Howard
my music and other stuff |
|
Back to top
|
|
 |
|