View Single Post
  #3  
Old 3rd March 2011, 14:56
Danix's Avatar
Danix Danix is offline
Senior Member
 
Join Date: Jul 2008
Bulgaria
Posts: 37
Thumbs up Little edit for better performance
Little edit for better performance...
Line 92 replace
PHP Code:
mysql_query ('INSERT INTO ts_thanks VALUES (\'' $torrentid '\', \'' $userid '\')');
  if (
mysql_affected_rows ()) 
with this
PHP Code:
  mysql_query ('INSERT INTO ts_thanks VALUES (\'' $torrentid '\', \'' $userid '\')');
  if (
mysql_affected_rows ())
  {
  if ((
$tsshoutbot == 'yes' AND preg_match ('#thanks#'$tsshoutboxoptions)))
  {
    
$name1 = @mysql_fetch_array(@mysql_query('SELECT name FROM torrents WHERE id = \'' $torrentid '\''));
    
$name htmlspecialchars($name1['name']);
    
$name str_replace('.'' '$name);
    
$name str_replace('-'' '$name);
    
$anon $CURUSER['username'];
    
          
$seo_link ts_seo ($torrentid$name's');
          
$shoutbOT sprintf ($lang->global['shoutbOT'], $seo_link$name$anon);
          
$shout_sql 'INSERT INTO shoutbox (userid, date, content) VALUES (\'999999999\', \'' TIMENOW '\', ' sqlesc ('{systemnotice}' $shoutbOT) . ')';
          
$shout_result sql_query ($shout_sql);
    }
    include 
INC_PATH '/readconfig_kps.php';
    
kps ('+'$kpsthanks$userid);
    
show_thanks ();
    return 
1;
  } 
Open global.lang.php in folder /include/languages/English and paste this in bottom of page
PHP Code:
    'shoutbOT'                          =>'[color=#FF0000]{3}[/color] said thank you for the torrent [url={1}][color=#FFFF00]{2}[/color][/url] .'// Added by Danix 
before
PHP Code:
); 
?> 
Navigate to Tracker Settings=>EXTRA Settings and where fields Shoutbot Options add thanks after upload,newuser,request

Example: upload,newuser,request,thanks

That is...
Reply With Quote
The Following 6 Users Say Thank You to Danix For This Useful Post:
bodinho (24th November 2011), Edgein (3rd March 2011), EMPEREUR1 (4th March 2011), Fynnon (4th March 2011), Marco (6th March 2011), Protheush (30th November 2013)