Another thing you could do is include this javascript on your header.asp
<script language="Javascript">
function checkText()
{
if (document.images.length > 0) //Has images, validate sizes
{
var imgHeight;
var imgWidth;
for (var loop = 0; loop < document.images.length; loop++)
{
if (document.images[loop].name.substring(0,6) == 'chkImg')
{
imgWidth = document.images[loop].width;
imgHeight = document.images[loop].height;
if (imgWidth > <% = intAvatarWidth %>)
{
document.images[loop].width = <% = intAvatarWidth %>;
//Proportionalize Height
imgHeight = imgHeight / (imgWidth/<% = intAvatarWidth %>);
document.images[loop].height = imgHeight;
}
}
}
}
}
</script>
|
and then go on functions_format_post.asp and make it add the following to the <img src tags when formatting [IMG] tags:
id="chkImg1" name="chkImg2" that will resize all images posted on your forum, not only the uploads but if the user links to an image it'll also resize it... you might also want to add a <br> at the beggining and the end of the image tags otherwise if the user types a long line of text and then the image it'll still brake up your tables...
Edited by fernan82