Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Mark torrents New longer?
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Support

2020-04-01 19:34:55
How can I make so I can have torrents flagged as New! to last longer? user refreshes and they go away right after that permanently until next new upload. This would make sense to have this stay as New! until user clicks on the torrent link.

Maybe the code is not good?

$last_access = $CURUSER["last_browse"];
           $time_now = gmtime();
           if ($last_access > $time_now || !is_numeric($last_access))
               $last_access = $time_now;
           if (sql_timestamp_to_unix_timestamp($result2["added"]) >= $last_access) {
               $disname .= "New!";
           }
2020-04-01 20:43:00
Answered myself again, whoops. Post deletion disabled on here.

So the fix is


            //functions.php
           $added = date("M d, Y", utc_to_tz_time($result2['added']));
           /*
           $last_access = $CURUSER["last_browse"];
           $time_now = gmtime();
           if ($last_access > $time_now || !is_numeric($last_access))
               $last_access = $time_now;
           if (sql_timestamp_to_unix_timestamp($result2["added"]) >= $last_access) {
           */  
           if (strtotime($added) >= strtotime("yesterday")){ // Only show for torrents 1 day old
           $new = "New!";
           }
           //}

           $new; // use this alongside $dispname
2025-03-05 13:07:39
merci pour ce post
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728