vForums Support Banner


Visit Base Classics - Gaming Chairs

 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Database of Codes/Hacks/Mods :: Resize Images In Posts - View Topic
Topic Rating: *****
Printable View
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Resize Images In Posts (15th May 08 at 8:54pm UTC)
This code will make it so that images in posts are resized to a size you specify, unless it's smaller than the specified size.

<script>
/*Resize Images in Posts
Created By Wrighty*/

var size = 300;

var x = get('td','tag');

for(c=0; c<x.length; c++){
    if(x[c].className == 'post' && x[c].getElementsByTagName('img')){
        var f = x[c].getElementsByTagName('img');
        for(y=0;y<f.length;y++){
            if(f[y].width > size){
                f[y].width = size;
            }
            if(f[y].height > size){
                f[y].height = size;
            }
        }
    }
}
</script>


Global Footer
Alex Bailey
Senior Member
****

Posts: 503
Status: Offline
Gender: Male
Location: Uk
Age: 33
Joined:  
Reputation: 8%  


pmmsnaim
Re: Resize Images In Posts (2nd Aug 08 at 7:46pm UTC)
I've tried and it doesn't resize

ting-tong2k6@hotmail.com
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Resize Images In Posts (2nd Aug 08 at 8:48pm UTC)
link to an example post?
Alex Bailey
Senior Member
****

Posts: 503
Status: Offline
Gender: Male
Location: Uk
Age: 33
Joined:  
Reputation: 8%  


pmmsnaim
Re: Resize Images In Posts (2nd Aug 08 at 10:20pm UTC)
I can't show you a link sorry {Sad}
Maybe its a clash with another code thats not making it work

ting-tong2k6@hotmail.com
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Resize Images In Posts (2nd Aug 08 at 11:49pm UTC)
i can't help unless I have a link so I wouldn't know.
Alex Bailey
Senior Member
****

Posts: 503
Status: Offline
Gender: Male
Location: Uk
Age: 33
Joined:  
Reputation: 8%  


pmmsnaim
Re: Resize Images In Posts (3rd Aug 08 at 12:04am UTC)
Well tbh a link wouldn't do anyway as its in MM

ting-tong2k6@hotmail.com
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Resize Images In Posts (3rd Aug 08 at 12:05pm UTC)
Can't help then. sorry
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 32
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Resize Images In Posts (4th Aug 08 at 1:35am UTC)
System, if you go ahead and PM me the link I can look into what could be causing the issue. {Smile}

rroll.to— Shorten a link, rickroll your friends.
Alex Bailey
Senior Member
****

Posts: 503
Status: Offline
Gender: Male
Location: Uk
Age: 33
Joined:  
Reputation: 8%  


pmmsnaim
Re: Resize Images In Posts (4th Aug 08 at 4:11pm UTC)
Thanks marc but wrighty now knows the link {Smile}

ting-tong2k6@hotmail.com
 Printable View

All times are GMT+0 :: The current time is 2:55pm
Page generated in 0.2309 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums