View Single Post
  #1  
Old 14th March 2010, 13:15
lovebeer's Avatar
lovebeer lovebeer is offline
Senior Member
 
Join Date: May 2009
Romania
Posts: 91
Default Image resize problem
Hi, I can't make the Resize Large Images mod to work.
The mod is from tbdev.net, from here:
http://www.tbdev.net/index.php?showt...&hl=image&st=0

I can't get it to work,

I added this to style.css:

Code:
table.ncode_imageresizer_warning {
    background: #FFFFE1;
    color: #000000;
    border: 1px solid #CCC;
    cursor: pointer;
}

table.ncode_imageresizer_warning td {
    font-size: 12px;
    color: red;
    vertical-align: middle;
    text-decoration: bold;
}

table.ncode_imageresizer_warning td.td1 {
    padding: 5px;
}

table.ncode_imageresizer_warning td.td1 {
    padding: 2px;
}
in global.php I changed this:
Code:
// Click the image to open in full size.
    $s = preg_replace("/\[img\](http:\/\/[^\s'\"<>]+(\.(jpg|gif|png)))\[\/img\]/i", "<a href=\"\\1\" target=\"_blank\"><img border=0 src=\"\\1\"></a>", $s);
tho this:
Code:
$s = preg_replace("/\[img\](http:\/\/[^\s'\"<>]+(\.(jpg|gif|png)))\[\/img\]/i", "<img border=0 src=\"\\1\" alt=\"\" onload=\"NcodeImageResizer.createOn(this);\">", $s);
Changed this:
Code:
    // [img=http://www/image.gif]
    $s = preg_replace("/\[img=(http:\/\/[^\s'\"<>]+(\.(gif|jpg|png)))\]/i", "<a href=\"\\1\" target=\"_blank\"><img border=0 src=\"\\1\"></a>", $s);
to this:

Code:
$s = preg_replace("/\[img=(http:\/\/[^\s'\"<>]+(\.(gif|jpg|png)))\]/i", "<img border=0 src=\"\\1\" alt=\"\"  onload=\"NcodeImageResizer.createOn(this);\">", $s);
And added this to my stdhead.php
Code:
<script type="text/javascript" src="ncode_imageresizer.js"></script>
<script type="text/javascript">
<!--
NcodeImageResizer.MODE = 'newwindow';
NcodeImageResizer.MAXWIDTH = 480;
NcodeImageResizer.MAXHEIGHT = 0;

NcodeImageResizer.Msg1 = 'Click this bar to view the full image.';
NcodeImageResizer.Msg2 = 'This image has been resized. Click this bar to view the full image.';
NcodeImageResizer.Msg3 = 'This image has been resized. Click this bar to view the full image.';
NcodeImageResizer.Msg4 = 'Click this bar to view the small image.';
//-->
</script>
There says to add this to bittorrent.php after </head> tag but I don't know where to add it.

The images don't resize, where I'm wrong?
__________________

Reply With Quote