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
Torrent Index Status Boxes
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Mods Completed

2020-06-16 11:32:26
I don't know what to call these, but I call them index tags ( per torrent, per ID). These just pick up the statistics on each torrent in the index, and lets users know right away how each result is doing, or how that result competes with the other results in favour of criteria/ID their after.

I took one look at UNIT3D and wrote it in because it looked nice.

So open backend/functions.php and find

$freeleech


add after

<div>$reseed $healthy $popular $fleech $comments</div>


Add this close by same file


           $state = SQL_Query_exec("SELECT id, seeders, hits, freeleech, comments FROM torrents WHERE id = " .$id);
           $check = mysql_fetch_assoc($state);
       
           if ($check["seeders"] <= 2) { // If torrent has 2 seeds or less (poor health)
               $reseed = '<span style="pointer-events:none;font-size:13px;background:orange;padding:3px 11px 4px 11px;text-align:center;border-radius:3px;color:#FFF;font-weight:500;text-decoration:none;text-shadow:0 1px 1px rgba(0,0,0,.3)">
                               Seeders Wanted
                          </span>';
           }else{
               $reseed = '';
           }
           if ($check["seeders"] >= 3) { // If torrent has 3 seeds or more (good health)
               $healthy = '<span style="margin-left:5px;pointer-events:none;font-size:13px;background:#ED2324;padding:3px 11px 4px 11px;text-align:center;border-radius:3px;color:#FFF;font-weight:500;text-decoration:none;text-shadow:0 1px 1px rgba(0,0,0,.3)">        
                               Healthy
                           </span>';
           }else{
               $healthy = '';
           }
           if ($check["hits"] >= 20) { // If torrent has 20 downloads or more (good hits)
               $popular = '<span style="margin-left:5px;pointer-events:none;font-size:13px;background:purple;padding:3px 11px 4px 11px;text-align:center;border-radius:3px;color:#FFF;font-weight:500;text-decoration:none;text-shadow:0 1px 1px rgba(0,0,0,.3)">
                               Popular
                           </span>';
           }else{
               $popular = '';
           }
           if ($check["freeleech"] == 1) { // If torrent has 20 downloads or more (good hits)
               $fleech = '<span style="margin-left:5px;pointer-events:none;font-size:13px;background:#0079FE;padding:3px 11px 4px 11px;text-align:center;border-radius:3px;color:#FFF;font-weight:500;text-decoration:none;text-shadow:0 1px 1px rgba(0,0,0,.3)">
                               Freeleech
                          </span>';
           }else{
               $fleech = '';
           }
           if ($check["comments"] >= 4) { // If torrent has 4 comments or more (user attention)
               $comments = '<span style="margin-left:5px;pointer-events:none;font-size:13px;background:green;padding:3px 11px 4px 11px;text-align:center;border-radius:3px;color:#FFF;font-weight:500;text-decoration:none;text-shadow:0 1px 1px rgba(0,0,0,.3)">
                               Social
                            </span>';
           }else{
               $comments = '';
           }


How it looks on my end

[ATTACH type="full" alt="NewTorrentIndexFeature.png"]5590[/ATTACH]

This is code is quick and posted as I completed. i’ll improve it. I'll expand on these, and update post. But you can see the general idea.
NewTorrentIndexFeature.png
NewTorrentIndexFeature.png
2020-06-17 22:17:24
Look really cool, but $freeleech is not in the MYSQLI 3.0 version at all. I can only find that in snatched.php, so maybe you are getting versions mixed up or are doing custom code that will not immediately be identifiable by people using the 3.0 as I posted it on github. Just something to be aware of, but thanks for all the help. I just think things are getting crossed over between projects. I have my own custom project that I dont share because I cant just help people "plug and play" using what I have altered, so I always have to refer and test against the code that is downloadable for all to use. If I share something, I test it against the code that I posted on git. I tried sharing custom code once, it was too difficult to help with since I was always fiddling with it lol. But as I said, very nice stuff you have and thank you very much for sharing :) If people know what they are looking at they can pick it apart and code it themselves, but I try to make it as easy as I can for the folks who may be just starting to have some fun with this
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)
2020-06-17 22:57:38
"MicroMonkey, post: 68730, member: 311":

Look really cool, but $freeleech is not in the MYSQLI 3.0 version at all. I can only find that in snatched.php, so maybe you are getting versions mixed up or are doing custom code that will not immediately be identifiable by people using the 3.0 as I posted it on github. Just something to be aware of, but thanks for all the help. I just think things are getting crossed over between projects. I have my own custom project that I dont share because I cant just help people "plug and play" using what I have altered, so I always have to refer and test against the code that is downloadable for all to use. If I share something, I test it against the code that I posted on git. I tried sharing custom code once, it was too difficult to help with since I was always fiddling with it lol. But as I said, very nice stuff you have and thank you very much for sharing :) If people know what they are looking at they can pick it apart and code it themselves, but I try to make it as easy as I can for the folks who may be just starting to have some fun with this


I’ll refine the post to fit the original functions file as best as possible. I tend to rely on mine because I’ve stripped out a lot of the old stuff. There lies the issue, the MVC version is not legacy-compatible so existing databases will never see it. I posted my code to fix this limitation, so I’m not sure where it ever went but it’s posted.

Too many mixed releases indeed. And mine is about to take off another 20 miles North due to completion of sessions and a template system tried and true.

Makes you just want to tinker on the old source and provide several parse warnings lol
2020-06-18 00:58:50
You should maybe have your own section on the forum if you want. Just for code you are working on. Up to you, create it and post stuff. Sharing is caring :)
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)
2020-06-18 05:43:05
No need for a new section, thats simply my own time spent on site itself.dont let the template fool you, the PHP code is all the same, and if your using V3 then your already able to use this, find $speedQ, add under block. The codes in TT already, there Is nothing unique about this, conditionals are all through the script, so they are also used in torrenttable()
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: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728