Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares
Reply
Thread Tools
  #1  
Old 21st February 2013, 13:57
easy62120 easy62120 is offline
Senior Member
 
Join Date: Jun 2010
P2P
Posts: 35
Default download Nfo ....
Hello,
I want to integrate a function on my TS:

Successfully download the NFO and the presentation of the torrent.
I tried it for the codes:

NFO:

PHP Code:
<?php
    
require('./global.php');
    
$id intval(TS_Global('id'));
if (isset(
$_GET['id']) && !empty($_GET['id']) );

    
$ready_nfo mysql_query("SELECT id,nfo FROM  ts_nfo WHERE nfo = $id");
$file_name mysql_query("SELECT name FROM torrents WHERE t.id = '".$id."'");
     
$filename "".$id.".nfo";
header("Cache-Control: cache, must-revalidate");    
    
header("Pragma: public");
    
header("Content-type: application/octet-stream");
    
header("Content-Disposition: attachment; filename=".basename$filename['name'] ).".nfo");
    echo 
$ready_nfo;
        
?>
Prez:
PHP Code:
<?php
require('./global.php');
    
$id intval(TS_Global('id'));
 
   
$descr = isset($_GET['id']); 
    
$ready_descr sql_query("SELECT * FROM torrents WHERE ".$descr."");
$torrents mysql_fetch_assoc($ready_descr)    ;
    
$name = isset($_GET['id']); 
  
$file_name mysql_query("SELECT name FROM torrents WHERE ".$name."");
if(!
file_exists($descr)) {
   
$file_name "".$name.".txt";
   
      
header ('Expires: Tue, 1 Jan 1980 00:00:00 GMT');
      
header ('Last-Modified: ' gmdate ('D, d M Y H:i:s') . ' GMT');
      
header ('Cache-Control: no-store, no-cache, must-revalidate');
      
header ('Cache-Control: post-check=0, pre-check=0'false);
      
header ('Pragma: no-cache');
      
      
header ('Accept-Ranges: bytes');
      
header ('Connection: close');
    
header("Content-type: application/octet-stream");

    
header"Content-Disposition: attachment; filename=".basename$torrents['name'] ).".txt");
    echo 
$ready_descr;
}
?>
Here are two screens for evoking problem

Click the image to open in full size.

Click the image to open in full size.


This window opens fine but they are empty and the names of the torrents.

I'm in a TS 7.2 and I have asked for help on the site but to no avail xam no answers .....

If anyone can help me thank you to him

Or tell me where I can find a better source code for the two functions
Reply With Quote
  #2  
Old 22nd February 2013, 16:06
Cleanup Cleanup is offline
Senior Member
 
Join Date: Oct 2008
Posts: 34
Default
i noticed you've solved your problem with this would you mind to share it?

Last edited by Krypto; 22nd February 2013 at 18:57. Reason: Don't Quote the person above!!
Reply With Quote
  #3  
Old 24th January 2015, 14:51
eckeO5 eckeO5 is offline
Senior Member
 
Join Date: Jan 2011
P2P
Posts: 117
Default
has ne1 still found out how to download and not only show the uploaded nfo files in tsse 5.6
Maybe some1 knows how to enable it, may be due to the div class in
details.php around line 750?
i think its possible a new class is needed or something like that.

PHP Code:
<div class="yui-content">
            <
div id="details">'.$details.'</div>
            <
div id="comments">'.$showcommenttable.'</div>
            <
div id="filelist">'.$s.'</div>
            <
div id="peers">'.$peerstable.'</div>
            <
div id="report">'.$report.'</div>
            <
div id="bookmark">'.$bookmark.'</div>
            
'.($show_nfo != '' ? '<div id="nfo">'.$show_nfo.'</div>' : '').'
            '.($show_manage != '' ? '
<div id="manage">'.$show_manage.'</div>' : '').'
        
</div
would be very glad if some1 can help me out with that.
greetz ecke
Reply With Quote
Reply

Tags
download , nfo


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 22:47. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.