inherit
145158
0
Sept 29, 2013 20:24:26 GMT -8
Shark bait
42
August 2009
southbound
|
Post by Shark bait on Sept 5, 2009 16:36:40 GMT -8
I change signature variables to 600width x 200height and I got back 340width x 200height.
As for images posted variables were set to 800width x 600height and I got back 800width x 500height and a resized option above that I can do without.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,290
January 2004
todge
|
Post by Todge on Sept 6, 2009 12:57:54 GMT -8
Yup.. I'll get rid of the full sized option for you.. No worries.. So the images are being resized to your specified parameters.. Good.. Watch this space for you new code without the link....
|
|
inherit
145158
0
Sept 29, 2013 20:24:26 GMT -8
Shark bait
42
August 2009
southbound
|
Post by Shark bait on Sept 6, 2009 16:09:38 GMT -8
Thank you Todge
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,290
January 2004
todge
|
Post by Todge on Sept 7, 2009 11:19:40 GMT -8
Here ya go.. The code without the option to view the image full size.. <script type="text/javascript"> <!-- /* Modify image size to fit forum By Todge Please keep this header intact */
var picWidth = '700'; //Maximum posted image width.. var picHeight = '700'; //Maximum posted image height..
var sigPicWidth = '500'; //Maximum signature image width.. var sigPicHeight = '500'; //Maximum signature image height..
var posts = document.getElementsByTagName('font'); for(p=0; p<posts.length; p++) { if(posts[p].innerHTML.match('google_ad_section_start')) { var imgs = posts[p].getElementsByTagName('img'); for(i=0; i<imgs.length; i++) { if(imgs[i].alt.match(/\[image\]/)) { imgs[i].alt = '[postedImage]'; }}}}
var pics = document.images;
window.onload = imageSize; function imageSize() { var p=pics.length-1; while(p>-1) { if(pics[p].alt=='[image] ') { if(pics[p].width>sigPicWidth || pics[p].height>sigPicHeight) { if(pics[p].width/sigPicWidth > pics[p].height/sigPicHeight) { pics[p].width = sigPicWidth; } else { pics[p].height = sigPicHeight; }}}
if(pics[p].alt=='[postedImage]') { if(pics[p].width>picWidth || pics[p].height>picHeight) { if(pics[p].width/picWidth > pics[p].height/picHeight) { pics[p].width = picWidth; } else { pics[p].height = picHeight; }}} p--; }} // --> </script>
|
|
inherit
145158
0
Sept 29, 2013 20:24:26 GMT -8
Shark bait
42
August 2009
southbound
|
Post by Shark bait on Sept 9, 2009 10:55:02 GMT -8
It works great Todge but, I can not set the sizes to get the results I want I tried changing the sizes numerous times. I would like to have the following set as maximum sizes below: Posted images800width 600height Signatures600width 200height Maximum sizes.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,290
January 2004
todge
|
Post by Todge on Sept 9, 2009 15:14:59 GMT -8
The code appears to be working for me... In this thread...You have a posted image.. Size 1024px × 640px (scaled to 800px × 500px) and a signature image.. Size 1024px × 640px (scaled to 320px × 200px) You have set maximum sizes for posted images to... 800width 600height Which it is.. The width is at 800px.. Same with the signature.. You've set the sizes to.. 600width 200height The height is at 200px..
|
|
inherit
145158
0
Sept 29, 2013 20:24:26 GMT -8
Shark bait
42
August 2009
southbound
|
Post by Shark bait on Sept 9, 2009 19:36:42 GMT -8
Thanks so much for your hard work Todge. I think I'm going to run with these. I don't want to take the chance of my community members complaining about signatures looking out of proportion. I forgot that maybe the script is keeping the aspect ratio of the image. Thanks
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,290
January 2004
todge
|
Post by Todge on Sept 10, 2009 9:01:14 GMT -8
I can force the image to a set size if you prefer, but as you say.. They could be heavily distorted..
|
|