Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
  #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
  #2  
Old 14th March 2010, 20:20
Timisoreanul's Avatar
Timisoreanul Timisoreanul is offline
Senior Member
 
Join Date: Apr 2008
P2P
Posts: 211
Default
Hi, try this:
in your 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
Code:
	// [img=http://www/image.gif]
	$s = preg_replace("/\[img=(http:\/\/[^\s'\"<>]+(\.(gif|jpg|png)))\]/i", "<img border=\"0\" src=\"\\1\" alt=\"\" onload=\"NcodeImageResizer.createOn(this);\">", $s);
Now make a folder in your root tracker with name scripts download the attach file
end unzip the file end put it in the folder scripts.

Ups :edit remember to add :
Code:
<script type="text/javascript" src="scripts/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>
before </head>
Attached Files
File Type: rar ncode_imageresizer.rar (1.4 KB, 87 views)
__________________
only me

Last edited by Timisoreanul; 14th March 2010 at 20:25. Reason: update
Reply With Quote
  #3  
Old 14th March 2010, 20:35
lovebeer's Avatar
lovebeer lovebeer is offline
Senior Member
 
Join Date: May 2009
Romania
Posts: 91
Default
Don't works, nothing happens, if the image is big don't become smaller :(

Sorry for my english.
__________________

Reply With Quote
  #4  
Old 14th March 2010, 20:48
Timisoreanul's Avatar
Timisoreanul Timisoreanul is offline
Senior Member
 
Join Date: Apr 2008
P2P
Posts: 211
Default
Tell my more detalis. what version of tbdev are you using , where you try to see the img , forum? torrents detalis:
Tips:
try add the ncode_imageresizer.js in to folder js , javascripts or even in to your root folder.
try a diffrent browser ..aka firefox , opera, chrome,
try to see the img, resize in to forums.php.

to bittorrent:
Code:
<html><head>
<title><?= $title ?></title>
<link rel="stylesheet" href="/<?=$ss_uri?>" type="text/css">
<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>
</head>
<body>
__________________
only me

Last edited by joeroberts; 14th March 2010 at 21:13.
Reply With Quote
  #5  
Old 14th March 2010, 21:08
lovebeer's Avatar
lovebeer lovebeer is offline
Senior Member
 
Join Date: May 2009
Romania
Posts: 91
Default
I have TBDEV.NET-12-09-05, I've putted the ncode_imageresizer.js in js, scripts and in htdocs.
I'm using firefox, but tried with internet explorer, the same.
I tried to put a image to forums but don't get smaller.
__________________

Reply With Quote
  #6  
Old 14th March 2010, 21:21
Timisoreanul's Avatar
Timisoreanul Timisoreanul is offline
Senior Member
 
Join Date: Apr 2008
P2P
Posts: 211
Default
Code for stdhead
Code:
<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="scripts/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>
<script type="text/javascript" src="overlib.js"></script>
__________________
only me
Reply With Quote
The Following User Says Thank You to Timisoreanul For This Useful Post:
lovebeer (16th March 2010)
  #7  
Old 16th March 2010, 20:41
lovebeer's Avatar
lovebeer lovebeer is offline
Senior Member
 
Join Date: May 2009
Romania
Posts: 91
Default
Thanks, now works!
__________________

Reply With Quote
  #8  
Old 20th November 2012, 13:35
Birkoff's Avatar
Birkoff Birkoff is offline
Senior Member
 
Join Date: Aug 2010
P2P
Posts: 24
Exclamation Don't works
For me don't working :(
I have this tbdev version:
define ('TBVERSION','TBDEV.NET-NE-1.6');
Url site:
http://scenetraffic.org

Please help me guys!
Reply With Quote
Reply

Tags
image , problem , resize

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem With Torrent Image Upload GauravJ123 xBTiT 3 5th March 2010 01:46
Strange image problem TSSE 5.6 sakray Template Shares 0 4th March 2010 09:32
image exploit problem irfan TBDev 2 2nd November 2009 01:50
image resize mod wMan Community Cafe 2 20th September 2009 02:02
netmaniack 1.6 problem freeleech and Image link r3y TBDev 4 11th March 2009 22:01



All times are GMT +2. The time now is 18:01. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.