Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   Browse & details Anonymous Colours (http://www.bvlist.com/showthread.php?t=11871)

\n";
    }else{
    $htmlout .= "\n";
}
Now @browse.php


Find


Code:

users.username,
Add so it looks like this



Code:

users.username, users.class FROM
@details.php change too
@ the query add



Code:

torrents.anonymous,
Also so it looks like this


Code:

users.username, users.class FROM
Change too



Code:

if ($row['anonymous'] == 'yes')
    $uprow = "Anonymous";
    $uprow = (isset($row["username"]) ? (($row["anonymous"] == "yes" && $CURUSER['class'] < UC_STAFF && $row['owner'] != $CURUSER['id']) ? " ".$lang['details_anon']."" : " " . htmlspecialchars($row['username']) . "") : "{$lang['details_unknown']}");
  if ($owned)

Now for UC_STAFF

@include
@config.php




Before the End Tag Replace with


Code:

define ('UC_USER', 0);
define ('UC_POWER_USER', 1);
define ('UC_VIP', 2);
define ('UC_UPLOADER', 3);
define ('UC_MODERATOR', 4);
define ('UC_ADMINISTRATOR', 5);
define ('UC_SYSOP', 6);
define('UC_MIN', 0);
define('UC_MAX', 6);
define('UC_STAFF', 4);

Now @user_functions.php


Replace with


Code:

function get_user_class(){
global $CURUSER;
    return $CURUSER["class"];
}
$class_names = array(
    UC_USER                => 'User',
    UC_POWER_USER          => 'Power User',
    UC_VIP                  => 'VIP',
    UC_UPLOADER            => 'Uploader',
    UC_MODERATOR            => 'Moderator',
    UC_ADMINISTRATOR        => 'Administrator',
    UC_SYSOP                => 'SysOp');
$class_colors = array(
    UC_USER                => '8E35EF',
    UC_POWER_USER          => 'f9a200',
    UC_VIP                  => '009F00',
    UC_UPLOADER            => '0000FF',
    UC_MODERATOR            => 'FE2E2E',
    UC_ADMINISTRATOR        => 'B000B0',
    UC_SYSOP                => '4080B0');
$class_images = array(
    UC_USER                => $TBDEV['pic_base_url'].'class/user.png',
    UC_POWER_USER          => $TBDEV['pic_base_url'].'class/power_user.png',
    UC_VIP                  => $TBDEV['pic_base_url'].'class/vip.png',
    UC_UPLOADER            => $TBDEV['pic_base_url'].'class/uploader.png',
    UC_MODERATOR            => $TBDEV['pic_base_url'].'class/moderator.png',
    UC_ADMINISTRATOR        => $TBDEV['pic_base_url'].'class/admin.png',
    UC_SYSOP                => $TBDEV['pic_base_url'].'class/sysop.png');
function get_user_class_name($class) {
global $class_names;
    $class = (int)$class;
if (!valid_class($class))
    return '';
if (isset($class_names[$class]))
    return $class_names[$class];
    else
    return '';
}
function get_user_class_color($class) {
global $class_colors;
    $class = (int)$class;
if (!valid_class($class))
    return '';
if (isset($class_colors[$class]))
    return $class_colors[$class];
    else
    return '';
}
function get_user_class_image($class) {
global $class_images;
    $class = (int)$class;
if (!valid_class($class))
    return '';
if (isset($class_images[$class]))
    return $class_images[$class];
    else
    return '';
}
function valid_class($class) {
    $class = (int)$class;
    return (bool)($class >= UC_MIN && $class <= UC_MAX);
}
function min_class($min = UC_MIN, $max = UC_MAX) {
global $CURUSER;
    $minclass = (int)$min;
    $maxclass = (int)$max;
if (!isset($CURUSER))
    return false;
if (!valid_class($minclass) || !valid_class($maxclass))
    return false;
if ($maxclass < $minclass)
    return false;
    return (bool)($CURUSER['class'] >= $minclass && $CURUSER['class'] <= $maxclass);
}
function is_valid_user_class($class){
  return is_numeric($class) && floor($class) == $class && $class >= UC_USER && $class <= UC_SYSOP;
}

now @userdetails.php


Replace for user bars class


Code:

    $HTMLOUT .= "

   
\n";
    $HTMLOUT .= "

now every tbdev site will have this mod so good luck all my mod i made easy for class Colours


And thanks to bigjoos for the function get_user_class

Just a side Note this will also work on u232 v1 v2 v3 v4 and v5
Napon 29th November 2018 17:07

Browse & details Anonymous Colours
 
1 Attachment(s)
So here we go


@include torrenttable


we need to add the class Colours you will need to change this part to


Code:

if ($variant == "index")
if ($row['anonymous'] == 'yes') {
    $htmlout.= "

    ".(isset($row["username"]) ? (($row["anonymous"] == "yes" && $CURUSER['class'] < UC_STAFF && $row['owner'] != $CURUSER['id']) ? " ".$lang['torrenttable_anon']."" : " " . htmlspecialchars($row['username']) . "") : "(".$lang["torrenttable_unknown_uploader"].")") . "
   

    " . (isset($row["username"]) ? (" " . htmlspecialchars($row['username']) . "") : "(".$lang["torrenttable_unknown_uploader"].")") . "
   
{$lang['userdetails_class']}
   

elvira 29th November 2018 22:14

nice this is for TBDev 09 will post later for TBDev08

Napon 29th November 2018 22:18

Yes i do have a 08 too, Aswell to mysqli 08 PHP 5.6.32 with its own themes too no bittorrant crap ilke ive seen on here no names but we know who.... this ill not release out here sorry


All times are GMT +2. The time now is 15:30.

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