Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares > Mods & Themes
Reply
  #1  
Old 15th July 2013, 04:39
lafouine022 lafouine022 is offline
Senior Member
 
Join Date: Feb 2010
P2P
Posts: 120
Smile Auto promote/demote uploader by upload torrent
You need the class users = 1
your class upoader = 4

This code Auto promote/demote uploader if uploaded 5torrents by week or no

ADD this code in include/cron/dailly_clenup.php
copy all the code below.

PHP Code:
 ///////AUTO PROMOTE USER if uploaded 5 torrent by week//////Lafouine022/////////////// 

//require INC_PATH . '/functions_pm.php'; no need in dailly_cleanup
$Tadded TIMENOW 604800/// 604 800 sec for 1 week

   
    
$query mysql_query ('SELECT t.owner,COUNT(*) AS counta FROM torrents t INNER JOIN users u ON (t.owner=u.id) WHERE u.usergroup = \'1\' and t.banned = \'no\' and t.added > FROM_UNIXTIME(' $Tadded ') GROUP BY t.owner') or sqlerr(__FILE__,__LINE__);
   
    while (
$UP mysql_fetch_assoc ($query))
    {
        if (
$UP['counta'] > 4)
        {
        
mysql_query ('UPDATE users SET usergroup = usergroup + 3 WHERE id = ' sqlesc ($UP['owner']));
        
        
$subject 'Promote';
        
$msg 'You upload 5 Torrents in the week you become Uploader';
        
send_pm ($UP['owner'], $msg$subject0);
        }

    }
///////demote uploader if no uploaded 5 torrent by Week    
   
$query mysql_query ('SELECT t.owner,COUNT(*) AS counta FROM torrents t INNER JOIN users u ON (t.owner=u.id) WHERE u.usergroup = \'4\' and t.banned = \'no\' and t.added > FROM_UNIXTIME(' $Tadded ') GROUP BY t.owner') or sqlerr(__FILE__,__LINE__);
   
    while (
$UP mysql_fetch_assoc ($query))
    {
        if (
$UP['counta'] < 4)
        {
        
mysql_query ('UPDATE users SET usergroup = usergroup - 3 WHERE id = ' sqlesc ($UP['owner']));
        
        
$subject 'demote';
        
$msg 'You do not have 5 Upload Torrent week in become Users.';
        
send_pm ($UP['owner'], $msg$subject0);
        }

    }    
//////////////////////////////////////////// 
Enjoy baby
Reply With Quote
The Following 7 Users Say Thank You to lafouine022 For This Useful Post:
Botanicar (7th August 2013), DARCK (28th July 2013), eckeO5 (15th July 2013), FENIX (16th July 2013), Marco (16th July 2013), SpEnSeR (29th July 2013), Titya (15th July 2013)
  #2  
Old 16th July 2013, 09:16
Marco Marco is offline
Senior Member
 
Join Date: Jun 2009
Seychelles
Posts: 327
Default
you're good :) thank you very much
Reply With Quote
  #3  
Old 19th July 2013, 17:11
open open is offline
Senior Member
 
Join Date: Nov 2010
P2P
Posts: 22
Thumbs up Auto promote/demote uploader by upload torrent
thank you lafouine022
Reply With Quote
The Following User Says Thank You to open For This Useful Post:
SpEnSeR (29th July 2013)
  #4  
Old 29th July 2013, 04:14
SpEnSeR SpEnSeR is offline
Senior Member
 
Join Date: Nov 2011
P2P
Posts: 48
Default
thanks mate. ill try it out!
Reply With Quote
  #5  
Old 29th July 2013, 11:54
Marco Marco is offline
Senior Member
 
Join Date: Jun 2009
Seychelles
Posts: 327
Default
i believe it's something same to make users with different rank, like extreme user, elite users etc... :D i will dig it.
thank you very much

Bump: i couldn't edit my post,
i wish to know if it's possible with power users too ?

Bump: I will just bumping

After 5 torrents the user is uploader , but it take almost a month but it not downgrade back, what's the problem?
Reply With Quote
Reply

Tags
auto , promote or demote , torrent , upload , uploader

Thread Tools

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 16:26. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.