Page 8 of 50

Re: [Beta] Easy Resize Posted Images ( RC7 )

Posted: Thu Nov 01, 2007 11:12 pm
by efficacious
I talked to guy I work with he knows some about js... me and him remade the script to look like this..

this script should give the users two options of file names to discard and not resize.. like say their banners

let me know what you think.

Code: Select all

window.onload = resizeimg;
function resizeimg()
{
   if (document.getElementsByTagName)
   {
      for (i=0; i<document.getElementsByTagName('img').length; i++)
      {
         im = document.getElementsByTagName('img')[i];
		 imName2= document.getElementsByTagName('img')[i].indexOf('banner2.jpg');
		  imName = document.getElementsByTagName('img')[i].indexOf('banner.jpg');
         if (im.width > 400 && imName == -1 && imName2 == -1 )
         {
            im.style.width = '400px';
            eval("pop" + String(i) + " = new Function(\"pop = window.open('" + im.src + " ','fullscale','width=400,height=400,scrollbars=1,resizable=1'); pop.focus();\")");
            eval("im.onclick = pop" + String(i) + ";");
            if (document.all) im.style.cursor = 'hand';
            if (!document.all) im.style.cursor = 'pointer';
            im.title = 'Click Here To See Image Full Size ';
         }
      }
   }
}


Re: [Beta] Easy Resize Posted Images ( RC7 )

Posted: Thu Nov 01, 2007 11:34 pm
by .:: Chico ::.
Hello Eficacious,

can i add more than 2 files?

you gave a reason for you nickname with this
haha

thanks!

Re: [Beta] Easy Resize Posted Images ( RC7 )

Posted: Fri Nov 02, 2007 5:44 pm
by efficacious
yea you can do as many file names as you like really...


this is the section of code that handles the condition:

Code: Select all

imName2= document.getElementsByTagName('img')[i].indexOf('banner2.jpg');
        imName = document.getElementsByTagName('img')[i].indexOf('banner.jpg');
         if (im.width > 400 && imName == -1 && imName2 == -1 )

in order to make it use more then just two do this..

imName3=document.getElementsByTagName('img').indexOf('banner3.jpg');
imName4=document.getElementsByTagName('img').indexOf('banner4.jpg');
and so on ...

then for every new imName you had you must also add to this section:

Code: Select all

if (im.width > 400 && imName == -1 && imName2 == -1 )
notice the imName2?
to add more put this

if(im.width > 400 && imName == -1 && imName2 == -1 && imName3 == -1 && imName4 == -1) and so on.

have you already added this to your board?


btw this uses 400px setting rather then 600px setting.. I currently don't use a full width board. so. i needed it smaller this can obviously be changed to anything you like.


anyone else having problem with this in IE7?
both the modded code version above and kber original code don't work for me in IE7

Re: [Beta] Easy Resize Posted Images ( RC7 )

Posted: Mon Nov 05, 2007 5:41 pm
by kber
this code also didnt work with my IE7

Re: [Beta] Easy Resize Posted Images ( RC7 )

Posted: Tue Nov 06, 2007 12:21 am
by efficacious
i discovered that it just doesn't work with the viewtopic body in IE7 its working beautifully on our portal page in IE7

hope you dont mind me making the change for the banner bits.. :|

when you say "this code" does that mean the code with my addition or you mean all together.. cuz i tried both and currently we updated to using a flash banner so my addition came lil to late for myself. So i'm using the original addition you wrote without my addition. So I really wana say it something with the how the board parses the js on the viewtopic body seciton

Re: [Beta] Easy Resize Posted Images ( RC7 )

Posted: Tue Nov 06, 2007 6:45 am
by kber
the code with my addition

Re: [Beta] Easy Resize Posted Images ( RC7 )

Posted: Tue Nov 06, 2007 1:12 pm
by mej284
I have tested your mod on MG Autumn and it works Great!!!! Thank You. I placed your script in the same place as was suggested for the subsilver2 style.

Thanks again.

Re: [Beta] Easy Resize Posted Images ( RC7 )

Posted: Tue Nov 06, 2007 4:49 pm
by efficacious
kber wrote:
the code with my addition

well your code does the same thing so. i'm using only your original code kber and i have same problem with IE

Re: [Beta] Easy Resize Posted Images ( RC7 )

Posted: Tue Nov 06, 2007 4:50 pm
by efficacious
mej284 wrote:I have tested your mod on MG Autumn and it works Great!!!! Thank You. I placed your script in the same place as was suggested for the subsilver2 style.

Thanks again.

can you post a link to yur site mej284? so I can check out the code in action :D

thx

Re: [Beta] Easy Resize Posted Images ( RC7 )

Posted: Tue Nov 06, 2007 6:38 pm
by mej284
efficacious wrote:
mej284 wrote:I have tested your mod on MG Autumn and it works Great!!!! Thank You. I placed your script in the same place as was suggested for the subsilver2 style.

Thanks again.

can you post a link to yur site mej284? so I can check out the code in action :D

thx
http://www.44057online.com/phpBB3/

This will take you directly to a thread with pictures: http://www.44057online.com/phpBB3/viewt ... ?f=3&t=284

Re: [Beta] Easy Resize Posted Images ( RC7 )

Posted: Tue Nov 06, 2007 7:51 pm
by kber
efficacious wrote:
mej284 wrote:I have tested your mod on MG Autumn and it works Great!!!! Thank You. I placed your script in the same place as was suggested for the subsilver2 style.

Thanks again.
Are you think it is a Scam Mod ? :D :mrgreen:


can you post a link to yur site mej284? so I can check out the code in action :D

thx
Are you think it is a Scam Mod ? :D :mrgreen:

Re: [Beta] Easy Resize Posted Images ( RC7 )

Posted: Tue Nov 06, 2007 7:59 pm
by mej284
kber wrote:
efficacious wrote:
mej284 wrote:I have tested your mod on MG Autumn and it works Great!!!! Thank You. I placed your script in the same place as was suggested for the subsilver2 style.

Thanks again.
Are you think it is a Scam Mod ? :D :mrgreen:


can you post a link to yur site mej284? so I can check out the code in action :D

thx
Are you think it is a Scam Mod ? :D :mrgreen:
Don't know what you mean. kber, the mod I tested was yours from your website.

Re: [Beta] Easy Resize Posted Images ( RC7 )

Posted: Tue Nov 06, 2007 9:08 pm
by kber
You dont understand me sir . i,m talking to efficacious . it seems that he dont trust in my mod , and he want to see it in live test . that s why . :mrgreen:

Re: [Beta] Easy Resize Posted Images ( RC7 )

Posted: Tue Nov 06, 2007 10:44 pm
by mej284
kber wrote:You dont understand me sir . i,m talking to efficacious . it seems that he dont trust in my mod , and he want to see it in live test . that s why . :mrgreen:
My apologies, I think your Mod is great.

Re: [Beta] Easy Resize Posted Images ( RC7 )

Posted: Wed Nov 14, 2007 1:17 pm
by kber
mej284 wrote:
kber wrote:You dont understand me sir . i,m talking to efficacious . it seems that he dont trust in my mod , and he want to see it in live test . that s why . :mrgreen:
My apologies, I think your Mod is great.
Thanks For Your Words :P