Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Template Shares (http://www.bvlist.com/forumdisplay.php?f=26)
-   -   download Nfo .... (http://www.bvlist.com/showthread.php?t=8904)

easy62120 21st February 2013 13:57

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

http://img15.hostingpics.net/pics/310773bravo1.png

http://img15.hostingpics.net/pics/721060bravo2.png


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

Cleanup 22nd February 2013 16:06

i noticed you've solved your problem with this would you mind to share it?

eckeO5 24th January 2015 14:51

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


All times are GMT +2. The time now is 12:01.

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