Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   How can i disbale the NFO upload? (http://www.bvlist.com/showthread.php?t=1206)

Izacic 19th October 2008 11:11

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???:tease:

I have netmaniack

johnake 19th October 2008 11:59

Find in upload.php:

PHP Code:

tr("NFO file""<input type=file name=nfo size=81>(<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>(<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.

Krypto 19th October 2008 12:04

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 ///////////////////// 


Izacic 19th October 2008 12:27

Quote:

Originally Posted by johnake (Post 5538)
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


All times are GMT +2. The time now is 07:31.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.