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
force user to add comment
Controls ·  Search New posts · Mark unread

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

2021-10-05 12:37:48
Hello, I just tested the hack function "forced comment to download" of V2 and it does not work for V3, can you help me to make it work for v3 thank you in advance

url  hack  v2 >>>  https://torrenttrader.uk/topic?topicid=3209


I made the modification below and it doesn't work, when we made a comment on the torrent we can't download it..


open download.php

find :

$fn = "$torrent_dir/$id.torrent";



add after:

$com = mysqli_query("SELECT id FROM comments WHERE torrent =".intval($id)." and user ='" . $CURUSER["id"] ."'");

$verif_com = mysqli_num_rows($com);



find :

$name = $row['filename'];



add before:

if ($verif_com < 1 && $CURUSER["id"] != $row["owner"] && $row["owner"] != 0)

 show_error_msg("Error", "You must add a comment before download.",1);






2021-10-05 17:46:38
Try get_row_count
Find
$fn = "$torrent_dir/$id.torrent";


Under add
$commented = get_row_count("comments", "WHERE torrent = $id AND user = $CURUSER[id]");
if ($commented == 0) {      // or try if (!$commented ) {  
   show_error_msg("Error", "You must add a comment before download.",1);
}


See if that works then we can add if owner
Last edited by M-jay warn on 2021-10-05 17:53:33
2021-10-05 19:33:44
thank you M-jay,  works well now and I have modified the code with a message for the return to the torrent and can you tell me how to modify the code below for a return to the torrent at the bottom of the page directly on the box to add a comment


$commented = get_row_count("comments", "WHERE torrent = $id AND user = $CURUSER[id]");
if ($commented == 0) {      // or try if (!$commented ) {  
show_error_msg("Error", "::: You must add a comment before download</b>

<br /><br /><a href=torrents-details.php?id=$id>-- Click here to return to your Torrent page. --</a><br /><br />",1);

}

2021-10-05 21:58:21
Change mysqli_query to SQL_Query_exec. v3 still uses it and it works well
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)
Last edited by MicroMonkey on 2021-10-05 21:59:07
2021-10-06 08:50:55
thank you for your help and can you tell me how to allow the administrator and uploader to upload without posting a comment, I added owner in the code as below and it does not work the uploader and administrator are required to respond to his upload to download  :help


$res = SQL_Query_exec("SELECT filename, banned, external, announce, thanks, owner,  category FROM torrents WHERE id =".intval($id));


2021-10-06 09:12:51
Try on the if

if ($commented == 0
&& $CURUSER["id"] != $row["owner"] && $CURUSER["class"] < 7) {


The code needs to be below the $row =
2021-10-06 09:40:39
thank you M-jay i did like this and it doesn't work



$fn = "$torrent_dir/$id.torrent";


$commented = get_row_count("comments", "WHERE torrent = $id AND user = $CURUSER[id]");

if ($commented == 0
&& $CURUSER["id"] != $row["owner"] && $CURUSER["class"] < 7) {

if ($commented == 0) {      // or try if (!$commented ) {  
show_error_msg("Error", "::: You must add a comment before download</b>

<br /><br /><a href=torrents-details.php?id=$id>-- Click here to return to your Torrent page. --</a><br /><br />",1);

}

2021-10-06 09:49:18
thanks M-jay like this with the code below it works fine now



$fn = "$torrent_dir/$id.torrent";


$commented = get_row_count("comments", "WHERE torrent = $id AND user = $CURUSER[id]");

if ($commented == 0
&& $CURUSER["id"] != $row["owner"] && $CURUSER["class"] < 7) {  
show_error_msg("Error", "::: You must add a comment before download</b>

<br /><br /><a href=torrents-details.php?id=$id>-- Click here to return to your Torrent page. --</a><br /><br />",1);

}
2021-10-06 12:13:57
thank you works well now and can you tell me if it is possible to be redirected at the bottom of the page in the details of the torrent on the function and the comment box when you click on return to the torrent  :help


can be modify this part of the code but I don't see how ??

<a href=torrents-details.php?id=$id>





$fn = "$torrent_dir/$id.torrent";


$commented = get_row_count("comments", "WHERE torrent = $id AND user = $CURUSER[id]");

if ($commented == 0
&& $CURUSER["id"] != $row["owner"] && $CURUSER["class"] < 7) {  
show_error_msg("Error", "::: You must add a comment before download</b>

<br /><br /><a href=torrents-details.php?id=$id>-- Click here to return to your Torrent page. --</a><br /><br />",1);

}
Last edited by niki on 2021-10-06 12:16:46
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