Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
  #1  
Old 12th October 2019, 21:41
Elena's Avatar
Elena Elena is offline
Senior Member
 
Join Date: Sep 2010
Ukraine
Posts: 23
Default New (release status) within 7 days
The idea was to remove from the database table crowded readtorrents . There is "a fill" release dates in brovse, where you can immediately see when and what was covered (for what date). I changed the standard version of the relation to "looked release means is not new" on - if the release is filled with more than 7 days, then he is no longer new. Who does not like the number of days, change the number seven (7) in the request for its number of days!

open browse.php

remove from the request here it is:
Code:
".($CURUSER ? ", EXISTS(SELECT * FROM readtorrents WHERE readtorrents.userid = ".sqlesc($CURUSER["id"])."
AND readtorrents.torrentid = t.id) AS readtorrent" : ", 1 AS readtorrent") . "
Save and close the file.

open functions_torrenttable.php

we find:
Code:
if ($row["readtorrent"] == 0 && $variant == "index") print ("<b><font color=\"red\" size=\"1\">[новый]</font></b>");
and change it to:
Code:
$elapseds = floor((gmtime() - strtotime($row["added"])) / 86400);
if ($elapseds < 7 && $variant == "index"){print ("&nbsp;&nbsp;<img border=\"0\" src=\"pic/new.gif\" alt=\"New!\" title=\"New!\">");}else{}
picture of investment new.gif pour into the folder the pic.
View database and bang (delete) the table is fully readtorrents.

Open include / cleanup.php

find and delete:
Code:
sql_query("DELETE FROM readtorrents WHERE userid = ".sqlesc($arr["id"])) or sqlerr(__FILE__,__LINE__);
again to find and remove:
Code:
sql_query("DELETE FROM readtorrents WHERE userid = ".sqlesc($arr["id"])) or sqlerr(__FILE__,__LINE__);
open functions.php

find and delete:
Code:
sql_query('DELETE FROM readtorrents WHERE torrentid = '.$id);
open delacct.php

find and delete:
Code:
sql_query("DELETE FROM readtorrents WHERE userid = $id") or sqlerr(__FILE__,__LINE__);
open delacctadmin.php

find and delete:
Code:
sql_query("DELETE FROM readtorrents WHERE userid = $id") or sqlerr(__FILE__,__LINE__);
open deltorrent.php

find and delete (even if it is commented out, but too much):
Code:
/*sql_query("DELETE FROM torrents WHERE id IN (" . implode(", ", array_map("sqlesc", $_POST["delete"])) . ")") or sqlerr(__FILE__,__LINE__);
   sql_query("DELETE FROM snatched WHERE torrent IN (" . implode(", ", array_map("sqlesc", $_POST["delete"])) . ")") or sqlerr(__FILE__,__LINE__);   
   sql_query("DELETE FROM readtorrents WHERE torrentid IN (" . implode(", ", array_map("sqlesc", $_POST["delete"])) . ")") or sqlerr(__FILE__,__LINE__);
   sql_query("DELETE FROM ratings WHERE torrent IN (" . implode(", ", array_map("sqlesc", $_POST["delete"])) . ")") or sqlerr(__FILE__,__LINE__);
   sql_query("DELETE FROM checkcomm WHERE checkid IN (" . implode(", ", array_map("sqlesc", $_POST["delete"])) . ") AND torrent = 1") or sqlerr(__FILE__,__LINE__);
   sql_query("DELETE FROM bookmarks WHERE torrentid IN (" . implode(", ", array_map("sqlesc", $_POST["delete"])) . ")") or sqlerr(__FILE__,__LINE__);
   sql_query("DELETE FROM files WHERE torrent IN (" . implode(", ", array_map("sqlesc", $_POST["delete"])) . ")") or sqlerr(__FILE__,__LINE__);*/
open details.php

find and delete:

Code:
sql_query("INSERT INTO readtorrents (userid, torrentid) VALUES (".sqlesc($CURUSER["id"]).", ".sqlesc($id).")")/* or sqlerr(__FILE__,__LINE__)*/;
Delete the file completely markread.php

open modtask.php

find and delete:
Code:
sql_query("DELETE FROM readtorrents WHERE userid = $userid") or sqlerr(__FILE__,__LINE__);
Attached Files
File Type: rar new.rar (694 Bytes, 2 views)
Reply With Quote
  #2  
Old 13th October 2019, 09:54
fireknight's Avatar
fireknight fireknight is offline
VIP

 
Join Date: Aug 2010
Australia
Posts: 159
Default
Just interested in what version of TBDev are you working with.


06, 08, & 09 never had a file called - functions_torrenttable.php

One version did have that particular file was the CyBerFuN-CoDeX-master / TBDev / installer versions.



But neither the 4.0 or 4.1 have this line in that page
Code:
if ($row["readtorrent"] == 0 && $variant == "index") print ("<b><font color=\"red\" size=\"1\">[новый]</font></b>");
Reply With Quote
  #3  
Old 13th October 2019, 10:03
Elena's Avatar
Elena Elena is offline
Senior Member
 
Join Date: Sep 2010
Ukraine
Posts: 23
Default
Quote:
Originally Posted by fireknight View Post
Just interested in what version of TBDev are you working with.


06, 08, & 09 never had a file called - functions_torrenttable.php

One version did have that particular file was the CyBerFuN-CoDeX-master / TBDev / installer versions.



But neither the 4.0 or 4.1 have this line in that page
Code:
if ($row["readtorrent"] == 0 && $variant == "index") print ("<b><font color=\"red\" size=\"1\">[новый]</font></b>");
The version of Yuna, but you can search in your code for about the same and change for yourself. The scripts are the same.
Reply With Quote
Reply

Thread Tools

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