Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares > Mods & Themes
Reply
Thread Tools
  #1  
Old 3rd March 2011, 03:48
lafouine022 lafouine022 is offline
Senior Member
 
Join Date: Feb 2010
P2P
Posts: 120
Wink System Notice - Thanks
edite takethanks.php

line 93
remplace
PHP Code:
mysql_query ('INSERT INTO ts_thanks VALUES (\'' $torrentid '\', \'' $userid '\')');
  if (
mysql_affected_rows ())
  { 
by

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);
    
          
$seolink = ('' ''.$BASEURL.'/details.php?id=' sqlesc ($torrentid) . '&hit=1');
          
$shoutbOT sprintf ('' .$CURUSER['username']. ' said thank you for the 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); 
enjoy :bubble:
Reply With Quote
The Following 4 Users Say Thank You to lafouine022 For This Useful Post:
Danix (3rd March 2011), Edgein (3rd March 2011), Fynnon (4th March 2011), Marco (3rd March 2011)
  #2  
Old 3rd March 2011, 09:30
Marco Marco is offline
Senior Member
 
Join Date: Jun 2009
Seychelles
Posts: 327
Default Thank you
Very nice mod thank you working charm on my TS 5.6 Nightcrawler :)
Reply With Quote
  #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)
  #4  
Old 3rd March 2011, 17:36
Muikku Muikku is offline
Senior Member
 
Join Date: Aug 2008
Posts: 68
Default
thanx nice mod. but if someone want upload anonym now if i thanks his torrent it was show relaser name in shoutbox.
How fix that ???
Reply With Quote
  #5  
Old 4th March 2011, 01:41
EMPEREUR1 EMPEREUR1 is offline
Senior Member
 
Join Date: Sep 2010
P2P
Posts: 44
Wink
Quote:
Originally Posted by Danix View Post
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...

color usergroup possible ??????
Reply With Quote
  #6  
Old 4th March 2011, 07:11
lafouine022 lafouine022 is offline
Senior Member
 
Join Date: Feb 2010
P2P
Posts: 120
Exclamation
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 ???

Last edited by lafouine022; 4th March 2011 at 07:38.
Reply With Quote
The Following 4 Users Say Thank You to lafouine022 For This Useful Post:
EMPEREUR1 (4th March 2011), Fynnon (4th March 2011), Marco (11th March 2011), PAX (11th December 2011)
  #7  
Old 4th March 2011, 12:56
Omenke Omenke is offline
Senior Member
 
Join Date: May 2010
Hungary
Posts: 35
Default RE
I thank you for it works perfectly.








Last edited by Omenke; 5th March 2011 at 12:35.
Reply With Quote
  #8  
Old 4th March 2011, 14:16
lafouine022 lafouine022 is offline
Senior Member
 
Join Date: Feb 2010
P2P
Posts: 120
Smile
Reply With Quote
  #9  
Old 8th December 2011, 14:13
Darkness's Avatar
Darkness Darkness is offline
Senior Member
 
Join Date: Oct 2011
P2P
Posts: 43
Default Hello!!
It`s work ...but appear only the name of the boot and nothing else ....how I can fix that ?
And I make both types
Reply With Quote
  #10  
Old 11th December 2011, 14:47
SpEnSeR SpEnSeR is offline
Senior Member
 
Join Date: Nov 2011
P2P
Posts: 48
Default
nice one it works.. :)
Reply With Quote
Reply

Tags
notice , system


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 01:43. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.