Thread: PM on Comments
View Single Post
  #5  
Old 16th January 2010, 21:49
Edgein's Avatar
Edgein Edgein is offline
Senior Member
 
Join Date: Sep 2008
Netherlands
Posts: 154
Smile error fix
go to takecomment.php

find

PHP Code:
$res sql_query("SELECT name FROM torrents WHERE id = $torrentid") or sqlerr(__FILE__,__LINE__); 
and replace with

PHP Code:
$res sql_query("SELECT name, owner FROM torrents WHERE id = $torrentid") or sqlerr(__FILE__,__LINE__); 

find

PHP Code:
UserHandle::KPS("+","0.5",$CURUSER["id"]); 
and add above

PHP Code:
$ras mysql_query("SELECT commentpm FROM users WHERE id = $arr[owner]") or sqlerr(__FILE__,__LINE__);
                 
$arg mysql_fetch_array($ras);

                 if(
$arg['commentpm'] == 'yes')
                    {
$added sqlesc(get_date_time());
$subby sqlesc("Someone has commented on your torrent");
$notifs sqlesc("You have received a comment on your torrent [url=$DEFAULTBASEURL/details.php?id=$torrentid] " $arr['name'] . "[/url].");
mysql_query("INSERT INTO messages (sender, receiver, subject, msg, added) VALUES(0, " $arr['owner'] . ", $subby$notifs$added)") or sqlerr(__FILE____LINE__);
                     } 

grtzz edgein
Reply With Quote
The Following 3 Users Say Thank You to Edgein For This Useful Post:
Phogo (18th January 2010), Viperia (20th January 2010), yoligim (24th January 2010)