Bravo List
Register
Go Back   > Bravo List > Source Code > Active Trackers > Torrent Trader > Mods & Themes
Reply
  #1  
Old 1st November 2016, 22:03
Chez's Avatar
Chez Chez is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 278
Default Max Torrents Download Per Class
This is not my work. Just sharing it.

I dont know if this mod its already posted.


Run SQL

PHP Code:

ALTER TABLE 
`groupsADD `maxslotsint(10NOT NULL DEFAULT '0'
Open admincp.php go near groups management and find...

PHP Code:
print("<td class=table_head>Download</td>\n"); 
Underneath add

PHP Code:
print("<td class=table_head>Download Slots</td>\n"); 
Abit underneath you will find...

PHP Code:
print("<td class=table_col1>".$level["can_download"]."</td>\n"); 
Underneath add

PHP Code:
print("<td class=table_col1>".$level["maxslots"]."</td>\n"); 
Find

PHP Code:
<tr><td>Can Download:</td><td>  <?php echo  YES;?> <input type="radio" name="down" value="yes" <?php if  ($level["can_download"]=="yes") echo "checked" ?>  />&nbsp;&nbsp; <?php echo NO;?> <input type="radio"  name="down" value="no" <?php if ($level["can_download"]=="no") echo  "checked" ?> /></td></tr>
Underneath add

PHP Code:
<tr><td>Download  Slots:</td><td><input type="text" name="downslots"  value="<?php echo number_format($level["maxslots"]);?>" size="40"  /></td></tr>
Find

PHP Code:
$update[]="control_panel='".$_POST["admincp"]."'"
Underneath add

PHP Code:
if (is_valid_id($_POST["downslots"]))
             
$update[]="maxslots='".$_POST["downslots"]."'"
Find

PHP Code:
 $update[]="control_panel='".$level["control_panel"]."'"
Underneath add

PHP Code:
$update[]="maxslots='".$level["maxslots"]."'"
open announce.php find...

PHP Code:
// FILL $SELF WITH DETAILS FROM PEERS TABLE (CONNECTING PEERS DETAILS)
if (!isset($self)){ 
Underneath add

PHP Code:
 if ($MEMBERSONLY){
        
$query  = @mysql_fetch_row(@mysql_query("SELECT COUNT(DISTINCT torrent) FROM  `peers` WHERE `userid` = '$userid' AND `seeder`='no'"));
   
        
        
$queries mysql_query("SELECT `maxslots` FROM `groups` WHERE `group_id` = $user[class]");
        
$row mysql_fetch_array($queries);
        
$maxslot $row[0];
      
        if (
$query[0] >= $maxslot)
            
err("Maximum Slot exceeded! You may only download $maxslot torrent at a time.");
    } 
Open login_block.php

PHP Code:
$userratio "---"
Underneath add

PHP Code:
$query  = @mysql_fetch_row(@mysql_query("SELECT COUNT(DISTINCT torrent) FROM  peers WHERE userid = $CURUSER[id] AND seeder='no'"));
    
$slots number_format($CURUSER["maxslots"]) . "/" number_format($query[0]); 
Find

PHP Code:
$userratio 
Add after
PHP Code:
<BR>Download Slots$slots 
By default the slots are 0 for every class so i as soon as u do the sql query i would enter some numbers in there for each user class.
__________________
http://www.bvlist.com/images/avatars/signaturepics/sigpic16443_2.gif
Reply With Quote
The Following 2 Users Say Thank You to Chez For This Useful Post:
Phogo (2nd November 2016), romano1 (14th January 2017)
  #2  
Old 26th November 2018, 21:11
Napon Napon is offline
Banned
 
Join Date: Feb 2016
P2P
Posts: 522
Default
and if you have a hnr mod it will fuck them up lol will get done for hnrs


also its a tbdev mod converted to tt
Reply With Quote
Reply

Tags
class , download , max , torrents

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