[Beta] Easy Resize Posted Images - phpbb3.0.x

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Anti-Spam Guide
Locked
efficacious
Registered User
Posts: 355
Joined: Thu Aug 02, 2007 5:25 am
Location: 127.0.0.1

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

Post by efficacious » Thu Nov 01, 2007 11:12 pm

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 ';
         }
      }
   }
}

GET YOUR OWN CUSTOM STYLE PM ME

Recent works:
http://www.phpbb.com/community/viewtopi ... 4&t=633545

.:: Chico ::.
Registered User
Posts: 463
Joined: Fri Aug 03, 2007 6:35 am
Location: Rio de Janeiro
Contact:

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

Post by .:: Chico ::. » Thu Nov 01, 2007 11:34 pm

Hello Eficacious,

can i add more than 2 files?

you gave a reason for you nickname with this
haha

thanks!

efficacious
Registered User
Posts: 355
Joined: Thu Aug 02, 2007 5:25 am
Location: 127.0.0.1

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

Post by efficacious » Fri Nov 02, 2007 5:44 pm

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
GET YOUR OWN CUSTOM STYLE PM ME

Recent works:
http://www.phpbb.com/community/viewtopi ... 4&t=633545

User avatar
kber
Registered User
Posts: 986
Joined: Sun May 07, 2006 9:22 am
Location: Egypt
Contact:

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

Post by kber » Mon Nov 05, 2007 5:41 pm

this code also didnt work with my IE7
Hello All

efficacious
Registered User
Posts: 355
Joined: Thu Aug 02, 2007 5:25 am
Location: 127.0.0.1

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

Post by efficacious » Tue Nov 06, 2007 12:21 am

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
GET YOUR OWN CUSTOM STYLE PM ME

Recent works:
http://www.phpbb.com/community/viewtopi ... 4&t=633545

User avatar
kber
Registered User
Posts: 986
Joined: Sun May 07, 2006 9:22 am
Location: Egypt
Contact:

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

Post by kber » Tue Nov 06, 2007 6:45 am

the code with my addition
Hello All

User avatar
mej284
Registered User
Posts: 1126
Joined: Fri Nov 02, 2007 11:38 am

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

Post by mej284 » Tue Nov 06, 2007 1:12 pm

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.
I do not respond to unsolicited PM's

Skin-lab styles
SubMerged Style

efficacious
Registered User
Posts: 355
Joined: Thu Aug 02, 2007 5:25 am
Location: 127.0.0.1

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

Post by efficacious » Tue Nov 06, 2007 4:49 pm

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
GET YOUR OWN CUSTOM STYLE PM ME

Recent works:
http://www.phpbb.com/community/viewtopi ... 4&t=633545

efficacious
Registered User
Posts: 355
Joined: Thu Aug 02, 2007 5:25 am
Location: 127.0.0.1

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

Post by efficacious » Tue Nov 06, 2007 4:50 pm

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
GET YOUR OWN CUSTOM STYLE PM ME

Recent works:
http://www.phpbb.com/community/viewtopi ... 4&t=633545

User avatar
mej284
Registered User
Posts: 1126
Joined: Fri Nov 02, 2007 11:38 am

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

Post by mej284 » Tue Nov 06, 2007 6:38 pm

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
I do not respond to unsolicited PM's

Skin-lab styles
SubMerged Style

User avatar
kber
Registered User
Posts: 986
Joined: Sun May 07, 2006 9:22 am
Location: Egypt
Contact:

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

Post by kber » Tue Nov 06, 2007 7:51 pm

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:
Hello All

User avatar
mej284
Registered User
Posts: 1126
Joined: Fri Nov 02, 2007 11:38 am

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

Post by mej284 » Tue Nov 06, 2007 7:59 pm

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.
I do not respond to unsolicited PM's

Skin-lab styles
SubMerged Style

User avatar
kber
Registered User
Posts: 986
Joined: Sun May 07, 2006 9:22 am
Location: Egypt
Contact:

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

Post by kber » Tue Nov 06, 2007 9:08 pm

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:
Hello All

User avatar
mej284
Registered User
Posts: 1126
Joined: Fri Nov 02, 2007 11:38 am

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

Post by mej284 » Tue Nov 06, 2007 10:44 pm

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.
I do not respond to unsolicited PM's

Skin-lab styles
SubMerged Style

User avatar
kber
Registered User
Posts: 986
Joined: Sun May 07, 2006 9:22 am
Location: Egypt
Contact:

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

Post by kber » Wed Nov 14, 2007 1:17 pm

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
Hello All

Locked

Return to “[3.0.x] MODs in Development”