سلاماین کد را در ویرایش قالب انجمن خود کپی کنید.
<script>
function ResizeThem() {
maxheight=600;
maxwidth= 300;
imgs=document.getElementsByTagName("img");
for (p=0; p<imgs.length; p++) {
if (imgs[p].getAttribute("id")=="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','resizable=1');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','resizable=1');iw.focus()");
imgs[p].width=(maxheight/imgs[p].height)*imgs[p].width;
imgs[p].height=maxheight;
}
}
}
}
window.onload=ResizeThem
</script>
این تو کد زیر پیدا کنید.
maxheight=600;
maxwidth= 300;
اولی برای عرض عکسه که میتونید اندازه دلخواه خود را وارد کنید.
دومی هم طول عکس.
کد اصلاح شد



