Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=87)
-   -   Max Torrents Download Per Class (http://www.bvlist.com/showthread.php?t=11008)

Chez 1st November 2016 22:03

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.

Napon 26th November 2018 21:11

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


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

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