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
Remove Hit & Run With Seedbonus
Controls ·  Search New posts · Mark unread

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

2019-03-17 07:05:38
Updated for V3 credit to Original Author

Remove hit & run with seedbonus or upload, you must have seedbonus installed

[color=rgb(251, 160, 38)]sql (it is recommended you export your bonus table and edit for your own needs)[/color]
DROP TABLE IF EXISTS `bonus`;
CREATE TABLE `bonus` (
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
 `title` varchar(50) COLLATE utf8_bin NOT NULL,
 `cost` decimal(10,1) unsigned NOT NULL DEFAULT '0.0',
 `value` bigint(20) unsigned NOT NULL DEFAULT '0',
 `descr` varchar(100) COLLATE utf8_bin NOT NULL,
 `type` enum('traffic','invite','VIP','other','HnR') COLLATE utf8_bin NOT NULL DEFAULT 'other',
 PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

INSERT INTO `bonus` (`id`, `title`, `cost`, `value`, `descr`, `type`) VALUES
(1,'1 GB Uploaded',70.0,1073741824,'Exchange 70 points for 1 GB upload..','traffic'),
(2,'2 GB Uploaded',100.0,2147483648,'Exchange 100 points for 2 GB upload..','traffic'),
(3,'5 GB Uploaded',250.0,5368709120,'Exchange 250 points for 5 GB upload..','traffic'),
(4,'10 GB Uploaded',500.0,10737418240,'Exchange 500 points for 10 GB upload..','traffic'),
(5,'Invitations',100.0,4,'Receive 4 Invitations for 1000.00 points of seedbonus','invite'),
(6,'HnR',50.0,1,'Remove a hit and run from your account.','HnR');


[color=rgb(251, 160, 38)]In mybonus.php find (already added in mybonus TTv3 mod)[/color]
case 'traffic':
                SQL_Query_exec("UPDATE `users` SET `uploaded` = `uploaded` + '$row->value' WHERE `id` = '$CURUSER[id]'");
                break;



           case 'HnR':
               $uid = $CURUSER["class"] == "1" ? (int) $_POST["userid"] : (int) $CURUSER["id"];
               $tid = (int) $_POST["torrentid"];
     
           if ( empty($tid) )
               autolink("mybonus.php", "You must fill the box with the id of the torrent.");
           if ( isset ($uid) && isset ($tid) )
           {
               $res = SQL_Query_exec("SELECT * FROM `snatched` WHERE `tid` = '$tid' AND `uid` = '$uid' AND `hnr` = 'yes'");
               if ( mysqli_num_rows($res) == 0 )
                   autolink("mybonus.php", "No HnR found with this information.");
               $res1 = SQL_Query_exec("SELECT `username` FROM `users` WHERE `id` = '$uid'");
               $row1 = mysqli_fetch_assoc($res1);
               $res2 = SQL_Query_exec("SELECT `name` FROM `torrents` WHERE `id` = '$tid'");
               $row2 = mysqli_fetch_assoc($res2);
               $username = htmlspecialchars($row1["username"]);
               $torname = htmlspecialchars($row2["name"]);
     
               write_log ("The HnR of <a href='account-details.php?id=".$uid."'>".class_user($username)."</a> on the torrent <a href='torrents-details.php?id=".$tid."'>".$torname."</a> has been cleared by <a href='account-details.php?id=".$CURUSER['id']."'>".class_user($CURUSER['username'])."</a>");
         
               $new_modcomment = gmdate("d-m-Y \à H:i") . " - ";
               if ( $uid == $CURUSER["id"] )
                   $new_modcomment.= "H&R on the torrent ".$torname." cleared against ".$row->cost." points \n";
               else
                   $new_modcomment.= "H&R on the torrent ".$torname." cleared by ".$CURUSER['username']." \n";
               $modcom = sqlesc($new_modcomment);
         
               SQL_Query_exec("UPDATE `users` SET `modcomment` = CONCAT($modcom,modcomment) WHERE id = '$uid'");
               SQL_Query_exec("UPDATE `snatched` SET `ltime` = '129600', `hnr` = 'no' WHERE `tid` = '$tid' AND `uid` = '$uid'");
           }
           break;


[color=rgb(251, 160, 38)]in theme/default/footer.php find[/color]
 middleblocks();


add after
                // Start Hit and Run Warning
$jquery = SQL_Query_exec("SELECT COUNT `hnr` FROM `snatched` WHERE `uid` = '".$CURUSER["id"]."' AND `hnr` = 'yes'");

$res2 = mysqli_fetch_row($jquery);
$hnr = "<font style=\"background-color:#252525\" color=\"#FEFEFE\"><b>&nbsp; ".$res2[0]." &nbsp;</font>";
$hnr2 = $res2[0];

if  ($res2[0] > 0) {
   echo"<div style='margin-bottom:5px'>
       <table align=center width=100% border=0 cellspacing=0 cellpadding=10>
           <tr>
       <td style='padding: 10px; background: #AB0000' align=center>
       <div style='font: bold 15px Times New Roman; color:#FFBF00'>
           Hey $CURUSER[username], you have ".$hnr." recording".($hnr2 > 1 ? "s" : "")." for Hit and Run!&nbsp; View the recordings into <a href=snatched.php><font size=3 color=#CBCBCB>Your Snatch List</font></a>
           </div>
       <div style='font: bold 15px Times New Roman; color:#FFBF00'>
           You must to keep seeding or you can <a href=required.php><font size=3 color=#CBCBCB>Trade to Delete</font></a> ".($hnr2 > 1 ? "these recordings" : "this recording")." with Seed Bonus or Upload
           </div>
           </td>
           </tr>
           </table>
           </div>\n";
}
// End Hit and Run Warning


[color=rgb(251, 160, 38)]In english.php add[/color]

 // trade Hit & Run
$LANG["DELETED_RECORDING"] ="Has deleted a recording of H&R for Torrent ID:";
$LANG["POINTS_OF_SEED_BONUS"] ="with <b>100 points</b> of Seed Bonus.";
$LANG["YOUR_RECORDINGS_OF_HIT_AND_RUN"] ="Your Recordings of Hit and Run";
$LANG["ONE_RECORDING_HIT_AND_RUN_DELETED"] ="One recording for Hit and Run was deleted.";
$LANG["DELETED_RECORDING"] = "has deleted a recording of H&R for Torrent ID:";
$LANG["OF_UPLOAD"] = "of Upload";
$LANG["HIT_AND_RUN_FOR"] ="for";
$LANG["HIT_AND_RUN_HOURS_RATIO_BECOMES"] ="hours or until ratio becomes";
$LANG["HIT_AND_RUN_DELETE"] ="But if you want a fast way, you can trade to delete";
$LANG["HIT_AND_RUN_WITH"] = "With";
$LANG["SEED_TIME"] = "Seed Time";
$LANG["SNATCHLIST_SEEDBONUS"] = "Seed Bonus";
$LANG["SNATCHLIST_YOU_DONT_HAVE_ENOUGH"] = "You don't have enough";
$LANG["SNATCHLIST_FOR_TRADING"] = "for trading !";
$LANG["SNATCHLIST_UPLOAD"] = "Upload";
$LANG["SNATCHLIST_COST"] = "Cost";
$LANG["YOUR_LIST_OF_HITS_AND_RUN"] = "Your List of Hits and Run is empty";
$LANG["HIT_AND_RUN_YOUR_SNATCH_LIST"] ="View Your Snatch List";
$LANG["TO_SOLVE_THIS_PROBLEM_SEEDING"] ="To solve this problem you must to keep seeding";
$LANG["SNATCHLIST_POINTS_OF_SEED_BONUS"] = "points of Seed Bonus";



Add requried.php  to root
Add images to images folder



Trade.zip
Download
2019-03-28 14:42:33
Ive got this installed and so far so good, still in testing phase, its a pain testing HnR on a live site dont want to warn or ban everyone lol, if you can help improve it great
2019-03-28 23:18:03
this line here has obviously been a mistake of copy/paste from your forum to this one. It has bbcode in it. Its no big deal. Or this forum did a wierd edit to your code. bbcode is different depending on the forum you use and it appears that it turned your edit into bbcode. I hope I made sense. Tell master xblade thanks for the help.........
$jquery = SQL_Query_exec("SELECT COUNT([ICODE]hnr[/ICODE]) FROM [ICODE]snatched[/ICODE] WHERE [ICODE]uid[/ICODE] = '".$CURUSER["id"]."' AND [ICODE]hnr[/ICODE] = 'yes'");

change to
$jquery = SQL_Query_exec("SELECT COUNT `hnr` FROM `snatched` WHERE `uid` = '".$CURUSER["id"]."' AND `hnr` = 'yes'");

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)
Unknown User
2019-03-30 15:41:35
like i said the Post will not work on del hnr  also the write logs will not work too trust me i know its not working tell u what ill set it on my dev site ok test done as i said none of it working.......
2019-03-31 03:36:16
are you sure that the version of TT you are testing is the same as the one m-jay is testing on xblade? I remember your code had alot of differences in it. You had several versions so maybe im wrong
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)
2019-03-31 05:16:02
both deletion by seedbonus & upload GB are working, the log seems fine as well
Unknown User
2019-04-01 19:52:17
$bookmark
????????
2019-11-22 18:04:20
The edit of the footer file throws an error >>

Database Error in themes/default/footer.php on line 6: Unknown column 'COUNT' in 'field list'. Query was: SELECT COUNT `hnr` FROM `snatched` WHERE `uid` = '1' AND `hnr` = 'yes'.

If It Ain't Dutch, It Ain't Much!!
2019-11-23 10:19:49
Do you have snatchlist mod and your snatched table like this
[URL unfurl="true"]https://www.torrenttrader.xyz/index.php?threads/anti-hit-run-ttv3.9830/[/url]
2019-11-29 15:39:40
"m-jay, post: 67547, member: 20288":

Do you have snatchlist mod and your snatched table like this
[URL unfurl="true"]https://www.torrenttrader.xyz/index.php?threads/anti-hit-run-ttv3.9830/[/url]


Yes

[ATTACH]5272[/ATTACH]
SnatchedTable.JPG
SnatchedTable.JPG

If It Ain't Dutch, It Ain't Much!!
2022-08-29 21:35:11
Hi,
why I got that error message on bonus exchange for H&R removing?


and on required.php (just a message not H&R torrents)



this part working OK



VIP  ===>  Working
Invite  ===>  Working
GB UL   ===>  Working
H&R   ===>  not  :( (but points are deducted for H&R)

If someone can help, please hit PM for more details

Regards


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
Last edited by Botanicar on 2022-08-29 21:37:07
2023-05-02 10:49:15
@Botanicar did you manage to do the h&r part from mybonus? have the same issue  points deducted but get the same think "you must fill the box with the id..."

Thanks in advance
2023-05-02 13:16:03
Hi @djlive
unfortunately not on this way, but on another one yes


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2023-05-02 15:00:51
Can you share it?? If no i understand thank you
2023-05-02 16:53:08
@djlive
Of course I can share it with everyone, it's an open source code and we help each other, I think it's cool.

Must add that the full code is already here you might have missed it, M-Jay did it in his first post with it needs to be converted to MySQLi
https://torrenttrader.uk/post/9731/user/#post66305

prerequisite is that you already have H&R MOD installed

download zip file request.zip
if you have needs to stylize that just add bootstrap.css from link
https://getbootstrap.com/docs/5.1/getting-started/introduction/

Screenshots:








if you need to link numbers of H&R to this part just make a link as that:


//===| H&R
$qry = SQL_Query_exec("SELECT COUNT(`hnr`) FROM `snatched` WHERE `uid` = '$CURUSER[id]' AND `hnr` = 'yes'");
$res12 = mysqli_fetch_row($qry);
$hnr = $res12[0];
//===| End H&R




<tr><td><div style='font:normal 14px Robo'>".T_("H&R").":</div></td><td><div style='font:normal 14px Robo'><a href='required.php'> $hnr </a></div></td></tr>


Good luck
required.zip
Download



www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
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: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728