Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Auto-Resize Image Code
Topic Started: Dec 2 2008, 07:11 AM (699 Views)
Rusty_Cobain
Member
 *  
I know this have been posted before, but NONE of this codes worked for me, can anyone hlep me please???

:'(


i checked this topic:
http://if.invisionfree.com/topic/163916/1/

HELP :(
Offline Profile Quote Post Goto Top
 
Deleted User
Deleted User

The code works, just make sure you edit it all
Quote Post Goto Top
 
Garath531
Member Avatar
Look, up in the sky! It's a bird! It's a plane! It's Superman!
 *   *   *   *  
That code should work. Will you please install it so I can see what happens?
Offline Profile Quote Post Goto Top
 
Rusty_Cobain
Member
 *  
ok
i used it
this is my CATUAL javascript:
Quote:
 
<script>
function ResizeThem() {
maxheight=500;
maxwidth=500;
imgs=document.getElementsByTagName("img");
for (p=0; p<imgs.length; p++) {
if (imgs[p].getAttribute("alt")=="user posted image") {
w=parseInt(imgs[p].width);
h=parseInt(imgs[p].height);
if (parseInt(imgs[p].width)>maxwidth) {
imgs[p].style.cursor="pointer";
imgs[p].onclick=new Function("iw=window.open(this.src,'ImageViewer','width='+(w+5)+'px,height='+(h+100)+'px');iw.focus()");
imgs[p].height=(maxwidth/imgs[p].width)*imgs[p].height;
imgs[p].width=maxwidth;
}
if (parseInt(imgs[p].height)>maxheight) {
imgs[p].style.cursor="pointer";
imgs[p].onclick=new Function("iw=window.open(this.src,'ImageViewer','width='+(w+5)+'px,height='+(h+100)+'px');iw.focus()");
imgs[p].width=(maxheight/imgs[p].height)*imgs[p].width;
imgs[p].height=maxheight;
}
}
}
}
</script>


this is the result:(none)
http://z13.invisionfree.com/Strings/index.php?showtopic=58&st=0&#last


Offline Profile Quote Post Goto Top
 
Rusty_Cobain
Member
 *  
ANY responses plzzz :)
still shows the BIG images :(
Offline Profile Quote Post Goto Top
 
Garath531
Member Avatar
Look, up in the sky! It's a bird! It's a plane! It's Superman!
 *   *   *   *  
Sorry, I've been busy.

Try putting this in the Board Wrappers>>Body&Header (After the <%BOARD%> tag):
Code:
 

<body onLoad="ResizeThem()">


Note: I did not make that. I found it in the original topic.
Offline Profile Quote Post Goto Top
 
Rusty_Cobain
Member
 *  
it still doesnt work for me...:(

anyone who uses this code and is working for him, can pls past the code being used here?
Offline Profile Quote Post Goto Top
 
Garath531
Member Avatar
Look, up in the sky! It's a bird! It's a plane! It's Superman!
 *   *   *   *  
What browser are you using?
Offline Profile Quote Post Goto Top
 
Tony
Member Avatar
If found, please report missing.

Taking a look at the link you posted to a topic, I notice an image of two guitars and an amp. This image is re-sized after the page has finished loading.

If you are bothered about image sizes you may like to turn uploading on for your forum.
Quote:
 
AdminCP - System Settings - Topics, Posts & Polls. Under Posts & Posting set Show uploaded images in post? to yes. If you wish to show a thumbnail tick the box and add some sizes to suit your needs.
Then:
Quote:
 
AdminCP - Forum Control - Manage Forums. Locate the forums you wish to allow uploads in, and click on Permissions.

Once in there, you need to check Upload for the user groups/permission masks you wish to have upload capabilities. Click the 'Edit this forum' button to continue.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · zIFBoards - Skinning & Code Support · Next Topic »
Add Reply