[2.0.11] Resize Posted Images Based on Max Width

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
46
64%
Very Good
10
14%
Good
10
14%
Fair
3
4%
Poor
3
4%
 
Total votes: 72

BigDaddy96
Registered User
Posts: 7
Joined: Sun Jan 16, 2005 6:59 pm

Post by BigDaddy96 »

This looks like a great mod, but it does not save any bandwidth right? If your pic is 1024x768 and is 700kb, it will automatically be resized down so it won't break your layout but the pic will still be 700kb.

spooky2280
Registered User
Posts: 142
Joined: Tue Jul 20, 2004 8:48 pm

Post by spooky2280 »

Yes but the pic is not on your server, so it's not your bandwidth that is watsed. All these images are usually hotlinked.

webkid007
Registered User
Posts: 34
Joined: Thu Feb 17, 2005 2:11 am

Post by webkid007 »

is this compatible with bbcode [img]url to pic[/img] ???

can we disble the pop up feature? how?


i just want the picture to be rezided.

spooky2280
Registered User
Posts: 142
Joined: Tue Jul 20, 2004 8:48 pm

Post by spooky2280 »

I recommend this MOD instead:
http://www.phpbb.com/phpBB/viewtopic.php?t=263135
is this compatible with bbcode [ img]url to pic[/img ]

That's the idea behind this MOD
can we disble the pop up feature?

Yes
how?

That's the question Jimmy! :lol: Try the other MOD before and if you're not satisfied I'll tell you how. Uninstall this one before trying the other one.

webkid007
Registered User
Posts: 34
Joined: Thu Feb 17, 2005 2:11 am

Post by webkid007 »

That's the question Jimmy! :lol: Try the other MOD before and if you're not satisfied I'll tell you how. Uninstall this one before trying the other one.


lol i see u've been a car salesperson before.
"try the fully loaded luxury model. if you dont like, ill show you introductory model" ;)

ofcourse we're gonna like it.
ill see u in the other forum spooky.

thanks

User avatar
Fr0zen
Registered User
Posts: 191
Joined: Tue Dec 21, 2004 6:26 am
Location: Chicago, Illinois
Contact:

Post by Fr0zen »

Is there anyway to also have this mod work for the profile photo mod. ?

User avatar
PCGUY112887
Registered User
Posts: 499
Joined: Thu Apr 01, 2004 12:39 am
Location: Illinois
Contact:

Post by PCGUY112887 »

And Album mod :P

Cryomenace
Registered User
Posts: 22
Joined: Wed Jan 19, 2005 11:33 am
Location: Taastrup, Denmark

Post by Cryomenace »

Hello spooky2280,

Thank you for making and sharing this great MOD!

I'm not exactly sure my problem is caused by your MOD, but seeing that you also dabble in web design, perhaps you can lend me a fresh pair of eyes?

Instead of writing about my problem, I've taken two screenshots and posted them below:

Internet Explorer - wrong
Mozilla Firefox - correct

At first I suspected it to be the infamous "IE double margin error", but a search for "margin" within all forum files didn't provide any results, where the margin could pose the displayed layout problem.

If you need any kind of information to my setup, please feel free to contact me. :)


/Cryomenace
/Cryomenace

Apache/2.2.2 (Win32) mod_ssl/2.2.2 OpenSSL/0.9.8b PHP/5.1.4 MySQL/5.0.20 phpBB/2.0.21 Server at Port 443
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4

User avatar
Fr0zen
Registered User
Posts: 191
Joined: Tue Dec 21, 2004 6:26 am
Location: Chicago, Illinois
Contact:

Post by Fr0zen »

BigDaddy96 wrote: This looks like a great mod, but it does not save any bandwidth right? If your pic is 1024x768 and is 700kb, it will automatically be resized down so it won't break your layout but the pic will still be 700kb.


Exactly what I was thinking.. Is there a mod that will resize to thumbnails for you and then when you click the image open it it up in full.


Also how can I align the resized image all the way to the left of the screen. I dislike how its aligned in the center.

User avatar
PCGUY112887
Registered User
Posts: 499
Joined: Thu Apr 01, 2004 12:39 am
Location: Illinois
Contact:

Post by PCGUY112887 »

Exactly what I was thinking.. Is there a mod that will resize to thumbnails for you and then when you click the image open it it up in full.

That would take even more bandwidth... say you have a 100kb image. It makes a thumbnail at 25kb. When the page loads, it spends 25kb. Most people are going to click to make it bigger if it's at all in any way interesting... so +100kb... now you've spent 125kb.

User avatar
Fr0zen
Registered User
Posts: 191
Joined: Tue Dec 21, 2004 6:26 am
Location: Chicago, Illinois
Contact:

Post by Fr0zen »

Not really because most people wont click the image not 100% of the people viewing will as here whenever they view it loads all of the 800kb images. Exactly what Vbulletin does it makes thumbnails or small links so you can view it larger if you please.

BigDaddy96
Registered User
Posts: 7
Joined: Sun Jan 16, 2005 6:59 pm

Post by BigDaddy96 »

Fr0zen wrote: Not really because most people wont click the image not 100% of the people viewing will as here whenever they view it loads all of the 800kb images. Exactly what Vbulletin does it makes thumbnails or small links so you can view it larger if you please.


That was my thinking as well. I only click (and enlarge) the ones I really want to see. We have around 15000 pics on our forums. Overall I think it will save bandwidth.

User avatar
Fr0zen
Registered User
Posts: 191
Joined: Tue Dec 21, 2004 6:26 am
Location: Chicago, Illinois
Contact:

Post by Fr0zen »

Is there anything like that out for phpbb something that will make attachments a thumbnail with link to original using GD or something similar.

baerenwurm
Registered User
Posts: 131
Joined: Wed Nov 06, 2002 2:38 pm
Location: Germany

Post by baerenwurm »

Hi, thanks for the great mod!

I've installed the Resize Posted Images Based on Max Width 2.4.5 Mod and it did work properly - all of a sudden images won't be resized no more: http://www.quentintarantino.de/viewtopic.php?t=2247

I've following mods installed:

Watched Topics List 1.1.0
Admin Links 1.0.3
PJIRC Chat MOD 3.0.2
Quick Reply with Quote MOD 1.1.4
Resize Posted Images Based on Max Width 2.4.5
Force Word Wrapping 1.0.14
Attachment Mod 2.3.11
Scrollable Code Box 1.0.0
Gender Hack 1.2.6
Blank Page Template 2.0.0
Junior Admin 2.0.5
Recent Topics (Extended) 1.2.2
DB Maintenance Mod 1.3.1
Online/Offline/Hidden 2.2.5
Separate Announcements & Sticky 1.1.0

spooky2280
Registered User
Posts: 142
Joined: Tue Jul 20, 2004 8:48 pm

Post by spooky2280 »

The JS file rmw_jslib.js is not imported. You're missing a line in overall_header.tpl :
<!-- start mod : Resize Posted Images Based on Max Width -->
<script type="text/javascript">
//<![CDATA[
<!--

var rmw_max_width = 400; // you can change this number, this is the max width in pixels for posted images
var rmw_border_1 = '1px solid {T_BODY_LINK}';
var rmw_border_2 = '2px dotted {T_BODY_LINK}';
var rmw_image_title = '{L_RMW_IMAGE_TITLE}';

//-->
//]]>
</script>
<script type="text/javascript" src="{U_RMW_JSLIB}"></script>
<!-- fin mod : Resize Posted Images Based on Max Width -->


Make sure that you don't miss the line in page_header.php either where {U_RMW_JSLIB} is defined:
//-- start mod : Resize Posted Images Based on Max Width ---
'L_RMW_IMAGE_TITLE' => $lang['rmw_image_title'],
'U_RMW_JSLIB' => $phpbb_root_path . 'templates/rmw_jslib.js',
//-- fin mod : Resize Posted Images Based on Max Width ----


I will check the other questions later. I'm really busy right now working on projects for which I actually get money to code. ;) That's what life is all about once you're out of school: money money money. Until you have enough to survive but that's not my case right now. :(

Post Reply

Return to “[2.0.x] MOD Database Cleanup”