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
[MOD] Thanks 2.08
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2014-10-26 11:09:49
Very important ,people has forget this SQL

run sql

ALTER TABLE `torrents` ADD `thanks` LONGTEXT;

torrents-details.php, find:

$res = SQL_Query_exec("SELECT torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.nfo, torrents.last_action, torrents.numratings, torrents.name, torrents.owner, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.external, torrents.image1, torrents.image2, torrents.announce, torrents.numfiles, torrents.freeleech, if (torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.numratings, categories.name AS cat_name, torrentlang.name AS lang_name, torrentlang.image AS lang_image, categories.parent_cat as cat_parent, users.username, users.privacy FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN torrentlang ON torrents.torrentlang = torrentlang.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = $id") or die(mysql_error());

replace with:

$res = SQL_Query_exec("SELECT torrents.seeders, torrents.thanks, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.nfo, torrents.last_action, torrents.numratings, torrents.name, torrents.owner, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.external, torrents.image1, torrents.image2, torrents.announce, torrents.numfiles, torrents.freeleech, if(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.numratings, categories.name AS cat_name, torrentlang.name AS lang_name, torrentlang.image AS lang_image, categories.parent_cat as cat_parent, users.username, users.privacy FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN torrentlang ON torrents.torrentlang = torrentlang.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = $id") or die(mysql_error());

find:

print("<tr><td align='left'><b>".T_("HITS").":</b></td><td>" . number_format($row["hits"]) . "</td></tr>n");

Add below:

$thanksl = explode(",", $row['thanks']);

if ($CURUSER['username'] == $row['username'] || !$CURUSER) $leftthanks = true;
foreach ($thanksl as $u) {
   $thanks .= ($i>0)?", $u":$u;

if ($u == $CURUSER['username']) $leftthanks = true;
   $i++;
}

if (!$thanks) $thanks = "No one yet.";
   print("<tr><td align=left><b>Merci par:</b></td><td>$thanks</td></tr>n");

Add thanks.php to root site

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=7122"]thanks.php[/url]
thanks.php
Download
Unknown User
2014-12-20 00:01:58
But where is the button to thanks the torrent ?
2014-12-20 06:24:34
@jdsousa are you trying to thank for you'r own torrent? If so, there is no button. You can't thank you'r self.
Unknown User
2014-12-20 11:29:03
No it isn't this... another user can't thanks.
Unknown User
2017-04-01 23:53:46
"jdsousa, post: 93647":
No it isn't this... another user can't thanks.


your fix the error with this code


//STAR THANKS\\\\

$thanksl = explode(",", $row['thanks']);

if ($CURUSER['username'] == $row['username'] || !$CURUSER) $leftthanks = true;
foreach ($thanksl as $u) {
   $thanks .= ($i>0)?", $u":$u;

if ($u == $CURUSER['username']) $leftthanks = true;
   $i++;
}

if (!$thanks) $thanks = "No one yet.";
   print("<center><font size=3 color='#CC0000'><b>Thank you form : </b>$thanks</font></center>");

if (!$leftthanks)
print(" <tr>
<td>
<form action='thanks.php' method='post'>
<input type='hidden' name='torrent' value='$id'>
<center><button type='Thanks' class='btn btn-large btn-warning'>Thanks</button></center>
</form>
</td>
</tr>
</center>");

////END THANKS\\\\\
}
Unknown User
2019-11-22 00:49:06
Don't work and not complete :cry:
2024-05-14 05:45:13
Working complete on 2.0.8 ;
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