Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
Thread Tools
  #1  
Old 19th October 2008, 11:11
Izacic Izacic is offline
Senior Member
 
Join Date: Sep 2008
Bosnia-Herzegovina
Posts: 47
Default How can i disbale the NFO upload?
I have a problem, when i upload a torrent its coming UPLOAD FAILED no nfo
how can i disable the nfo must uploading???

I have netmaniack
Reply With Quote
  #2  
Old 19th October 2008, 11:59
johnake's Avatar
johnake johnake is offline
Senior Member
 
Join Date: Dec 2007
Posts: 52
Default
Find in upload.php:

PHP Code:
tr("NFO file""<input type=file name=nfo size=81><br>(<b>Required.</b> Can only be viewed by power users.)\n"1); 
change to:

PHP Code:
tr("NFO file""<input type=file name=nfo size=81><br>(<b>optional.</b> Can only be viewed by power users)\n"1); 
in takeupload.php find this:

PHP Code:
$nfofile $_FILES['nfo'];
if (
$nfofile['name'] == '')
  
bark("No NFO!");

if (
$nfofile['size'] == 0)
  
bark("0-byte NFO");

if (
$nfofile['size'] > 65535)
  
bark("NFO is too big! Max 65,535 bytes.");

$nfofilename $nfofile['tmp_name'];

if (@!
is_uploaded_file($nfofilename))
  
bark("NFO upload failed"); 
and change it to:

PHP Code:
$nfofile $_FILES['nfo'];
/*if ($nfofile['name'] == '')
bark("No NFO!");

if ($nfofile['size'] == 0)
 bark("0-byte NFO");*/

if ($nfofile['size'] > 65535)
  
bark("NFO is too big! Max 65,535 bytes.");

$nfofilename $nfofile['tmp_name'];

/*if (@!is_uploaded_file($nfofilename))
 bark("NFO upload failed"); */ 
Original modification by DerFuhrer

Basically this makes uploading of nfo's optional.
Good luck!
john.
__________________
PHP Code:
class mySelf extends World
   
{
       public 
$health;
       private 
$friends;
       protected 
$love;
  
   public function 
__construct()
  {
       
$this->health 100;
       
$this->friends 2;
       
$this->love true;
  }
  protected function 
__love()
  { 
      
//has a bug... for the moment...
      //will fix it later.. until then:
      
sleep(15*365*24*3600);
  }

Reply With Quote
  #3  
Old 19th October 2008, 12:04
Krypto Krypto is offline
Retired from BVList
 
Join Date: Jan 2008
P2P
Posts: 510
Default
Or another alternative from ColdFusion in takeupload.php replace original nfo part with the below.

Quote:
Originally Posted by ColdFusion
Sorry if i'm hijacking the thread, but I saw this and dug out an old takeupload.php. I remember that I just overwrote the NFO part to make it either/or because otherwise you have to take care of the $nfo variable inside the INSERT query.
PHP Code:
$nfo '';
/////////////////////// NFO FILE ////////////////////////    
if(isset($_FILES['nfo']) && !empty($_FILES['nfo']['name'])) {
$nfofile $_FILES['nfo'];
if (
$nfofile['name'] == '')
  
bark("No NFO!");

if (
$nfofile['size'] == 0)
  
bark("0-byte NFO");

if (
$nfofile['size'] > 65535)
  
bark("NFO is too big! Max 65,535 bytes.");

$nfofilename $nfofile['tmp_name'];

if (@!
is_uploaded_file($nfofilename))
  
bark("NFO upload failed");

$nfo sqlesc(str_replace("\x0d\x0d\x0a""\x0d\x0a", @file_get_contents($nfofilename)));
}
/////////////////////// NFO FILE END ///////////////////// 

Last edited by Krypto; 19th October 2008 at 13:56.
Reply With Quote
  #4  
Old 19th October 2008, 12:27
Izacic Izacic is offline
Senior Member
 
Join Date: Sep 2008
Bosnia-Herzegovina
Posts: 47
Default
Quote:
Originally Posted by johnake View Post
Find in upload.php:

Basically this makes uploading of nfo's optional.
Good luck!
john.
This is comming:
Code:
Warning: fopen(torrents/136.torrent) [function.fopen]: failed to open stream: Permission denied in D:\inetpub\vhosts\balkanoteka.com\httpdocs\takeupload.php on line 229

Warning: Cannot modify header information - headers already sent by (output started at D:\inetpub\vhosts\balkanoteka.com\httpdocs\takeupload.php:229) in D:\inetpub\vhosts\balkanoteka.com\httpdocs\takeupload.php on line 328
EDIT: okay its going now

THX
Reply With Quote
Reply

Tags
disbale , nfo , upload


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



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