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
PM Uploader on comment add
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2008-01-22 22:24:08
Hi peeps !

Here after a small add on to keep in touch with ur uploads :

in torrents-details find :

 
//take comment add
if ($_GET["takecomment"] == 'yes'){
$commentbody = $_POST['body'];

if (!$commentbody)
show_error_msg("Error","You did not enter anything!",1);

mysql_query("UPDATE torrents SET comments = comments + 1 WHERE id = $id") or die(mysql_error());

mysql_query("INSERT INTO comments (user, torrent, added, text) VALUES (".$CURUSER["id"].", ".$id.", '" .get_date_time(). "', " . sqlesc($body).")") or die(mysql_error());
 

and add after :

 
//PM to uploader on comment add

$msg = "one of Your Torrents $torrent has recieved a Comment by $CURUSER[username] Please check it [url="%24site_config%5BSITEURL"]/torrents-details.php?id=$id]HERE[/url]";


mysql_query("INSERT INTO `messages` (`sender`, `receiver`, `added`, `subject`, `msg`, `unread`, `location`) VALUES
('$CURUSER[username]', '".$row[owner]."', '".get_date_time()."', 'One of your torrents just recieved a comment. Please check !','$msg','yes','in')") or
die(mysql_error());
 

this will sent u a pm when a comment is added to one of urs uploads
Unknown User
2008-01-23 00:44:49
"sender" is meant to be either the user's id or 0 (for System)
Unknown User
2008-01-23 20:07:19
it worked for me thank you very much   :P  :)
Unknown User
2008-01-24 03:33:28
thanks  :)  work number one :P
Unknown User
2008-01-27 16:30:53
the variable $torrent doesn't work
Unknown User
2008-01-27 22:51:44
"dodez, post: 38053":
the variable $torrent doesn't work


OK so replace   var   $torrent by     . $row[name] . id n
Unknown User
2008-01-28 00:24:45
Try this.....

Find:

//take comment add

if ($_GET["takecomment"] == 'yes'){

$commentbody = $_POST['body'];



if (!$commentbody)

show_error_msg("Error","You did not enter anything!",1);





Below, add:



//PM NOTIF

$res = mysql_query("SELECT name, owner FROM torrents WHERE id = $id") or die (mysql_error());

$arr = mysql_fetch_array($res);



if($CURUSER['id'] != $arr["owner"]) {  

$msg = "You have received a comment on your torrent [url=". $site_config[SITEURL]

."/torrents-details.php?id=$id]" . $arr[name] . "[/url]";

mysql_query("INSERT INTO messages (poster, sender, receiver, msg, added,subject) VALUES('0','0', " . $arr['owner'] . ", " .

sqlesc($msg) . ", '" . get_date_time() . "','New comment!')") or die (mysql_error());

}  

//PM NOTIF
Unknown User
2008-03-20 19:19:51
Thank you very much, I find this one very useful and works like a charm on TT v2.04. Respect!
Unknown User
2009-01-04 21:01:06
tnx Ezerbeth, works fine for me :)
Unknown User
2009-12-22 15:00:55
tnx Ezerbeth, works 100% for me also
Unknown User
2010-12-11 05:05:41
how to do with that

if ($CURUSER) {

if ($do == "takecomment") {

$body = $_POST['body'];

if (!$body) die;

mysql_query("INSERT INTO comments (user, torrent, added, text) VALUES (".$CURUSER["id"].", ".$id.", '" .get_date_time(). "', " . sqlesc($body).")");

if (mysql_affected_rows() == 1)

mysql_query("UPDATE torrents SET comments = comments + 1 WHERE id = $id");

echo "<script type='text/javascript'>parent.loadComments(-1)</script>";

die;

}
Unknown User
2010-12-24 13:30:26
THX MAN :rolleyes:
Unknown User
2011-01-01 18:31:41
For an error of display

add

header('Content-type: text/html; charset=iso-8859-1');





After

if (strlen($_GET['q']) > 3) {
Unknown User
2011-08-17 20:49:34
Hi Guys,

I have taken Alamandra's post since Ezerbeth was duplicating my comment post for some unexplained reason.  I was wondering if anyone can ENHANCE THIS MOD by being able to DEACTIVATE this OPTION in the PROFILE of the PARAMETERS OF THE MEMBER who doesn't won't it.  Some of the members DO and OTHERS don't.

I think this would be a nice CUSTOMIZATION.

Thanx. Regards.
Unknown User
2011-08-17 23:11:36
yes , good idea :angry:
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