You can delete a NFO file on an existing torrent. This is very simple. I did this because I was trying to test something and the NFO was blowing my screen out. It was too big and caused me to have to scroll to the right to see the whole page. Rather than edit the database with phpmyadmin, I chose this method so anyone who uploads an NFO with bad formatting that destroys the page can remove it
in torrents-edit.php find
add after
find
replace with
in torrents-edit.php find
$img2action = $_POST['img2action'];
if ($img2action == "update")
$updateset[] = "image2 = " .sqlesc(uploadimage(1, $row["image2"], $id));
if ($img2action == "delete") {
if ($row[image2]) {
$del = unlink($site_config["torrent_dir"]."/images/$row[image2]");
$updateset[] = "image2 = ''";
}
}add after
if ($nfoaction == "delete"){
$updateset[] = "nfo = 'no'";
}find
echo "<tr><td class='table_col1' align='right'><b>".T_("NFO").": </b><br /></td><td class='table_col2' ><input type='radio' name='nfoaction' value='keep' checked='checked' />Keep NFO <input type='radio' name='nfoaction' value='update' />Update NFO:";replace with
echo "<tr><td class='table_col1' align='right'><b>".T_("NFO").": </b><br /></td><td class='table_col2' ><input type='radio' name='nfoaction' value='keep' checked='checked' />Keep NFO <input type='radio' name='nfoaction' value='update' />Update NFO <input type='radio' name='nfoaction' value='delete'/>Delete NFO ";[ATTACH type="full"]5080[/ATTACH]
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
