[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

rrjbeals
Registered User
Posts: 15
Joined: Fri Jul 13, 2007 7:02 pm

Re: [2.0.11] Resize Posted Images Based on Max Width

Post by rrjbeals » Tue Oct 02, 2007 2:12 pm

diabolic.bg wrote:The problem is in IE. Don't use it. :D In my board I redirect IE to Opera download... :lol:
Agree totally, but there's gotta be a way to fix my code! Unfortunately, most of my family are internet idiots, and they will be using explorer.

diabolic.bg
Registered User
Posts: 447
Joined: Mon Dec 11, 2006 3:41 pm
Location: Bulgaria, Sofia
Contact:

Re: [2.0.11] Resize Posted Images Based on Max Width

Post by diabolic.bg » Tue Oct 02, 2007 2:21 pm

If you want I can send you my sniffer,s code in PM. ;) It fix the problem. :lol: You can test it here: http://wasteland-bg.com/ Only open any forum...
Last edited by diabolic.bg on Sun Feb 24, 2008 10:53 am, edited 1 time in total.

rrjbeals
Registered User
Posts: 15
Joined: Fri Jul 13, 2007 7:02 pm

Re: [2.0.11] Resize Posted Images Based on Max Width

Post by rrjbeals » Tue Oct 02, 2007 2:27 pm

diabolic.bg wrote:If you want I can send you my sniffer,s code in PM. ;) It fix the problem. :lol: You can test it here: http://fallout.wasteland-bg.com/
Thanks - but I would rather have code that worked in all browsers. Hopefully somebody will look at the source of my page and quickly see an error :|

Here's the link again:
(Works in Firefox, not in IE)

http://www.rjbeals.com/viewtopic.php?t=8

diabolic.bg
Registered User
Posts: 447
Joined: Mon Dec 11, 2006 3:41 pm
Location: Bulgaria, Sofia
Contact:

Re: [2.0.11] Resize Posted Images Based on Max Width

Post by diabolic.bg » Tue Oct 02, 2007 2:30 pm

This isn't your problem. At the first I think like you too... I have tested 6 similar mods and now I know - the problem is in IE.

If you want, you can test SMR_mod_v110. It is similar.

rrjbeals
Registered User
Posts: 15
Joined: Fri Jul 13, 2007 7:02 pm

Re:

Post by rrjbeals » Tue Oct 02, 2007 3:24 pm

winampman wrote:Just a note to anyone that might having problems with this mod in Internet Explorer.

The instructions say to add this code to overall_header.tpl:

Code: Select all

<!-- start mod : Resize Posted Images Based on Max Width -->
<script type="text/javascript">
//<![CDATA[
<!--

var rmw_max_width = 800;
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 -->
Problem is, some styles/templates don't recognize {T_BODY_LINK} as a variable. In subSilver, this code will be automatically changed to:

Code: Select all

var rmw_border_1 = '1px solid #006699';
var rmw_border_2 = '2px dotted #006699';
which is fine.

but in the style that I am using (Aphrodite), this is what happens:

Code: Select all

var rmw_border_1 = '1px solid #';
var rmw_border_2 = '2px dotted #';
In Internet Explorer, this causes a Javascript error, the Javascript stops working, and the images are not resized. It still works in Firefox (and probably Opera).

So if the image isn't being resized in Internet Explorer because of the #, all you need to do is open overall_header.tpl, and change {T_BODY_LINK} to any color you want. For example:
2px dotted #000000
2px dotted black
2px dotted #0000FF
2px dotted blue

all work just fine. Do that with all overall_header.tpl's that have the # problem.

Just posting what worked for me :)
Ahh.. Only took about an hour of reading through the prev posts, but I came across this and it was exactly the problem. Thanks also diabolic.bg for your quick response.

anybodywise
Registered User
Posts: 1
Joined: Fri Oct 19, 2007 6:54 am

Re: [2.0.11] Resize Posted Images Based on Max Width

Post by anybodywise » Fri Oct 19, 2007 6:57 am

Suberb mod!
But when I use [img=right it doesn't resize the image! Help please!

KasLimon
Registered User
Posts: 26
Joined: Tue Oct 10, 2006 9:32 pm

Re: [2.0.11] Resize Posted Images Based on Max Width

Post by KasLimon » Sun Oct 21, 2007 9:32 am

Great work! It´s a great replacement for Limit Image Width :P

Regards

djmourino
Registered User
Posts: 1
Joined: Wed Feb 07, 2007 1:16 pm

Re: [2.0.11] Resize Posted Images Based on Max Width

Post by djmourino » Mon Nov 05, 2007 10:32 pm

Hello, I have a question, is there any way to replace the popup and put in place to make an impact lightbox without this effect interferes with the small pictures? .

Sorry for my English

diabolic.bg
Registered User
Posts: 447
Joined: Mon Dec 11, 2006 3:41 pm
Location: Bulgaria, Sofia
Contact:

Re: Re:

Post by diabolic.bg » Wed Nov 14, 2007 11:46 am

rrjbeals wrote:
winampman wrote:Just a note to anyone that might having problems with this mod in Internet Explorer.

The instructions say to add this code to overall_header.tpl:

Code: Select all

<!-- start mod : Resize Posted Images Based on Max Width -->
<script type="text/javascript">
//<![CDATA[
<!--

var rmw_max_width = 800;
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 -->
Problem is, some styles/templates don't recognize {T_BODY_LINK} as a variable. In subSilver, this code will be automatically changed to:

Code: Select all

var rmw_border_1 = '1px solid #006699';
var rmw_border_2 = '2px dotted #006699';
which is fine.

but in the style that I am using (Aphrodite), this is what happens:

Code: Select all

var rmw_border_1 = '1px solid #';
var rmw_border_2 = '2px dotted #';
In Internet Explorer, this causes a Javascript error, the Javascript stops working, and the images are not resized. It still works in Firefox (and probably Opera).

So if the image isn't being resized in Internet Explorer because of the #, all you need to do is open overall_header.tpl, and change {T_BODY_LINK} to any color you want. For example:
2px dotted #000000
2px dotted black
2px dotted #0000FF
2px dotted blue

all work just fine. Do that with all overall_header.tpl's that have the # problem.

Just posting what worked for me :)
Ahh.. Only took about an hour of reading through the prev posts, but I came across this and it was exactly the problem. Thanks also diabolic.bg for your quick response.
This is right method! It's working with IE too. Thanks! :D
Last edited by diabolic.bg on Wed Apr 09, 2008 5:01 am, edited 1 time in total.

pdot_rob
Registered User
Posts: 7
Joined: Sat Nov 24, 2007 1:49 am

Re: [2.0.11] Resize Posted Images Based on Max Width

Post by pdot_rob » Sun Nov 25, 2007 7:17 am

Hi all,

I just installed this mod and it works fine in Firefox, but in IE7 when I click on the resized image within the post, a blank window opens with "about:blank" in the address bar and "Blank Page" as the title. Does anybody know how I can fix this?

pdot_rob
Registered User
Posts: 7
Joined: Sat Nov 24, 2007 1:49 am

Re: [2.0.11] Resize Posted Images Based on Max Width

Post by pdot_rob » Mon Nov 26, 2007 2:16 am

ttt...anybody?

sopas
Registered User
Posts: 234
Joined: Mon Feb 09, 2004 3:46 am

Re: [2.0.11] Resize Posted Images Based on Max Width

Post by sopas » Tue Apr 08, 2008 9:10 pm

Does this MOD work for phpBB3 ??

Phosky
Registered User
Posts: 6
Joined: Wed Jan 04, 2006 4:49 pm

Re: [2.0.11] Resize Posted Images Based on Max Width

Post by Phosky » Wed Apr 30, 2008 8:32 pm

A solution for IE users? They are a very important percentage of the users that visits my web.

diabolic.bg
Registered User
Posts: 447
Joined: Mon Dec 11, 2006 3:41 pm
Location: Bulgaria, Sofia
Contact:

Re: [2.0.11] Resize Posted Images Based on Max Width

Post by diabolic.bg » Wed Apr 30, 2008 8:59 pm

See for solution in my previous post. ;)

Phosky
Registered User
Posts: 6
Joined: Wed Jan 04, 2006 4:49 pm

Re: [2.0.11] Resize Posted Images Based on Max Width

Post by Phosky » Wed Apr 30, 2008 9:27 pm

Oh sorry, I didn't see that. Thanks for your answer!

Post Reply

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

Who is online

Users browsing this forum: No registered users and 2 guests

cron