Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Pages: 1 [2]

Author Topic: [MOD] Automatic Resize Of Uploaded Images (sNews 1.4)  (Read 14310 times)

Magic

  • Newbie
  • *
  • Karma: 0
  • Posts: 7
[MOD] Automatic Resize Of Uploaded Images (sNews 1.4)
« Reply #15 on: August 30, 2006, 09:59:47 AM »

Yep. I agree. It should be finalized and defined in the style sheet.

Cheers.
Logged
OK dummy . . . get off the phone.

rubenam

  • Newbie
  • *
  • Karma: 0
  • Posts: 14
Re: [MOD] Automatic Resize Of Uploaded Images (sNews 1.4)
« Reply #16 on: June 13, 2008, 01:34:02 PM »

Hello, I have this function to auto load images in a pop-up, in a html web. I tried to include it in snews.php, but i obtain a syntax error. Could someone tell me how to add this function in a correct way in snews.php?.

Thanks.

This is the code
Code: [Select]
<script>
var ventana="";

function nuevaVentana(categoria,imagen) {
if (ventana){
ventana.close();
}

ventana=window.open("","","width=20,height=20,resizable=0,toolbar=0,location=0,directories=0,status=no,menubar=0,scrollbars=0");
ventana.document.write("<HTML><HEAD><TITLE>.:: WEB ::.</TITLE></HEAD><BODY topmargin='0' leftmargin='0' >");
ventana.document.write("<img name='img' src='"+categoria+"/"+imagen+"'onload='window.resizeTo(document.img.width, document.img.height+50);'></body></html>");

}
</script>
Logged
Pages: 1 [2]