Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   - Bonus Points for activity on site (http://www.bvlist.com/showthread.php?t=9316)

wMan 19th July 2013 16:00

- Bonus Points for activity on site
 
im looking for this mod anyone know of it i do have the - Bonus already just need to add it for users online to get it

- Bonus Points for activity on site

BamBam0077 19th July 2013 16:17

for comment on torrent = 3 points
in comment.php just after

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

add

  1. //===add karma
  2. mysql_query("UPDATE users SET seedbonus = seedbonus+3.0 WHERE id = ".sqlesc($CURUSER["id"])."") or sqlerr(__FILE__, __LINE__);
  3. //===end


also in comment.php just after

  1. mysql_query("UPDATE torrents SET comments = comments - 1 WHERE id = $torrentid");

add

  1. //===Remove karma
  2. mysql_query("UPDATE users SET seedbonus = seedbonus-3.0 WHERE id = ".sqlesc($owner["id"])."") or sqlerr(__FILE__, __LINE__);
  3. //===end
for saying thanks = 2 points - several versions of this adapt yours if you need to



find in takethankyou.php:


  1. mysql_query("UPDATE torrents SET thanks = thanks + 1 WHERE id = ".sqlesc($id)."");



add under it:

  1. mysql_query("UPDATE users SET seedbonus = seedbonus+5.0 WHERE id = ".sqlesc($CURUSER["id"])."") or sqlerr(__FILE__, __LINE__);
Or for putyns new thanks mod find :


  1. print($ajax? json_encode(array('status'=>false,'err'=>$msg)) : $msg);
  2. }
  3. }
  4. }
  5. break;
  6. }
Hope these help you out mate :) if I have miss read please do tell me :ok:



wMan 19th July 2013 16:22

for comment on torrent = 3 points
in comment.php just after

Code:

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

Code:

  //===add karma
    mysql_query("UPDATE users SET seedbonus = seedbonus+3.0 WHERE id = ".sqlesc($CURUSER["id"])."") or sqlerr(__FILE__, __LINE__);
    //===end

also in comment.php just after

Code:

  mysql_query("UPDATE torrents SET comments = comments - 1 WHERE id = $torrentid");
add
for saying thanks = 2 points - several versions of this adapt yours if you need to
Code:

  //===Remove karma
    mysql_query("UPDATE users SET seedbonus = seedbonus-3.0 WHERE id = ".sqlesc($owner["id"])."") or sqlerr(__FILE__, __LINE__);
    //===end

find in takethankyou.php:

Code:

    mysql_query("UPDATE torrents SET thanks = thanks + 1 WHERE id = ".sqlesc($id)."");
add under it:
Or for putyns new thanks mod find :
Code:

mysql_query("UPDATE users SET seedbonus = seedbonus+5.0 WHERE id = ".sqlesc($CURUSER["id"])."") or sqlerr(__FILE__, __LINE__);

    print($ajax? json_encode(array('status'=>false,'err'=>$msg)) : $msg);
    }
    }
    }
    break;
    }

many thax

BamBam0077 19th July 2013 16:32

Your welcomed mate glad I was on track with your idea :friend::ok:


All times are GMT +2. The time now is 08:10.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.