no work for me ^^
PHP Code:
mysql_query ('INSERT INTO ts_thanks VALUES (\'' . $torrentid . '\', \'' . $userid . '\')');
if (mysql_affected_rows ())
{
$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);
$q = sql_query("SELECT u.id, u.username, g.namestyle FROM users u LEFT JOIN usergroups g ON (u.usergroup=g.gid) WHERE u.id =" . sqlesc ($userid));
while($c=mysql_fetch_assoc($q))
{
$color_n .= ''.get_user_color($c['username'], $c['namestyle']).'';
}
$seolink = ('' . ''.$BASEURL.'/details.php?id=' . sqlesc ($torrentid) . '&hit=1');
$shoutbOT = sprintf ('' .$color_n. ' dit merci pour le torrent : [url='.$seolink.']' . sqlesc ($name) . '[/url] .·._.·´¯)');
$shout_sql = 'INSERT INTO shoutbox (userid, date, content) VALUES (\'999999999\', \'' . TIMENOW . '\', ' . sqlesc ('{systemnotice}' . $shoutbOT) . ')';
$shout_result = sql_query ($shout_sql);
namestyle = <span style="color: #1E90FF"><strong>{username}</strong></span> for me :p
no work in shoutbox
So use this methode :)
Save your old version i'm not testing this code. Go sleeping sorry :p:p
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'];
$resowner = mysql_query("SELECT id, username, usergroup FROM users WHERE id=" . sqlesc ($userid));
$arr2 = htmlspecialchars_uni (mysql_fetch_array($resowner));
if ($arr2["usergroup"] == "13")
$arr1= "[color=#999900]";
if ($arr2["usergroup"] == "11")
$arr1= "[color=grey]";
if ($arr2["usergroup"] == "10")
$arr1= "[color=darkgreen]";
if ($arr2["usergroup"] == "8")
$arr1= "[color=darkred]";
if ($arr2["usergroup"] == "7")
$arr1= "[color=#2587A7]";
if ($arr2["usergroup"] == "6")
$arr1= "[color=#B000B0]";
if ($arr2["usergroup"] == "5")
$arr1= "[color=#ff5151]";
if ($arr2["usergroup"] == "4")
$arr1= "[color=navy]";
if ($arr2["usergroup"] == "3")
$arr1= "[color=#66CC00]";
if ($arr2["usergroup"] == "2")
$arr1= "[color=#0099FF]";
if ($arr2["usergroup"] == "1")
$arr1= "[color=black]";
$seo_link = ts_seo ($torrentid, $name, 's');
$shoutbOT = sprintf ($lang->global['shoutbOT'], $seo_link, $name, $anon, $arr1);
$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;
}
and in global.lang.php in folder /include/languages/English
PHP Code:
'shoutbOT' =>'{4}{3} said thank you for the torrent {2} .',
THIS WORK ???