Page 23 of 23

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

Posted: Tue Oct 02, 2007 2:12 pm
by rrjbeals
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.

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

Posted: Tue Oct 02, 2007 2:21 pm
by diabolic.bg
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...

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

Posted: Tue Oct 02, 2007 2:27 pm
by rrjbeals
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

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

Posted: Tue Oct 02, 2007 2:30 pm
by diabolic.bg
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.

Re:

Posted: Tue Oct 02, 2007 3:24 pm
by rrjbeals
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.

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

Posted: Fri Oct 19, 2007 6:57 am
by anybodywise
Suberb mod!
But when I use [img=right it doesn't resize the image! Help please!

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

Posted: Sun Oct 21, 2007 9:32 am
by KasLimon
Great work! It´s a great replacement for Limit Image Width :P

Regards

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

Posted: Mon Nov 05, 2007 10:32 pm
by djmourino
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

Re: Re:

Posted: Wed Nov 14, 2007 11:46 am
by diabolic.bg
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

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

Posted: Sun Nov 25, 2007 7:17 am
by pdot_rob
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?

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

Posted: Mon Nov 26, 2007 2:16 am
by pdot_rob
ttt...anybody?

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

Posted: Tue Apr 08, 2008 9:10 pm
by sopas
Does this MOD work for phpBB3 ??

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

Posted: Wed Apr 30, 2008 8:32 pm
by Phosky
A solution for IE users? They are a very important percentage of the users that visits my web.

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

Posted: Wed Apr 30, 2008 8:59 pm
by diabolic.bg
See for solution in my previous post. ;)

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

Posted: Wed Apr 30, 2008 9:27 pm
by Phosky
Oh sorry, I didn't see that. Thanks for your answer!