vForums Support Banner Image



 

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

[Avatar]

Posts: 3,269
Status: Offline
Gender: Male
Joined: 16th Dec 2007
Reputation: 16%  



Resize Images In Posts (15th May 08 at 9:54pm)
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
Back to Top - Link to Post

Image
.System
Full Member
***

[Avatar]

Posts: 489
Status: Offline
Gender: Male
Location: Uk
Age: 16
Joined: 30th Dec 2007
Reputation: 6%  



Re: Resize Images In Posts (2nd Aug 08 at 8:46pm)
I've tried and it doesn't resize
Back to Top - Link to Post
Wrighty
Very Senior Member
*****

[Avatar]

Posts: 3,269
Status: Offline
Gender: Male
Joined: 16th Dec 2007
Reputation: 16%  



Re: Resize Images In Posts (2nd Aug 08 at 9:48pm)
link to an example post?
Back to Top - Link to Post

Image
.System
Full Member
***

[Avatar]

Posts: 489
Status: Offline
Gender: Male
Location: Uk
Age: 16
Joined: 30th Dec 2007
Reputation: 6%  



Re: Resize Images In Posts (2nd Aug 08 at 11:20pm)
I can't show you a link sorry Smiley
Maybe its a clash with another code thats not making it work
Back to Top - Link to Post
Wrighty
Very Senior Member
*****

[Avatar]

Posts: 3,269
Status: Offline
Gender: Male
Joined: 16th Dec 2007
Reputation: 16%  



Re: Resize Images In Posts (3rd Aug 08 at 12:49am)
i can't help unless I have a link so I wouldn't know.
Back to Top - Link to Post

Image
.System
Full Member
***

[Avatar]

Posts: 489
Status: Offline
Gender: Male
Location: Uk
Age: 16
Joined: 30th Dec 2007
Reputation: 6%  



Re: Resize Images In Posts (3rd Aug 08 at 1:04am)
Well tbh a link wouldn't do anyway as its in MM
Back to Top - Link to Post
Wrighty
Very Senior Member
*****

[Avatar]

Posts: 3,269
Status: Offline
Gender: Male
Joined: 16th Dec 2007
Reputation: 16%  



Re: Resize Images In Posts (3rd Aug 08 at 1:05pm)
Can't help then. sorry
Back to Top - Link to Post

Image
cout << "Marc is busy";
vChat Developer
*****
I <­3 Ross

[Avatar]

Posts: 2,953
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 16
Joined: 9th Dec 2007

Additional Groups:
Coding Team

Reputation: 18%  



Re: Resize Images In Posts (4th Aug 08 at 2:35am)
System, if you go ahead and PM me the link I can look into what could be causing the issue. Smiley
Back to Top - Link to Post

Image


Image
.System
Full Member
***

[Avatar]

Posts: 489
Status: Offline
Gender: Male
Location: Uk
Age: 16
Joined: 30th Dec 2007
Reputation: 6%  



Re: Resize Images In Posts (4th Aug 08 at 5:11pm)
Thanks marc but wrighty now knows the link Smiley
Back to Top - Link to Post
Printable View

All times are GMT+1 :: The current time is 11:26am
Page generated in 0.5895 seconds
with 16 Database Queries and 12 cache files
This Forum is Powered By vForums
Create a Forum for Free