From d5af6beb9f97f5fdeb9ec693a0a527e67cb13132 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 21 May 2015 15:53:20 -0700 Subject: [PATCH] Fix for status coloring on registered users. --- .../shortcodes/batch/admin_shortcodes.php | 34 +++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/e107_core/shortcodes/batch/admin_shortcodes.php b/e107_core/shortcodes/batch/admin_shortcodes.php index 72bd8a66d..fdb55724f 100644 --- a/e107_core/shortcodes/batch/admin_shortcodes.php +++ b/e107_core/shortcodes/batch/admin_shortcodes.php @@ -1106,7 +1106,7 @@ class admin_shortcodes // for BC only. - $oldconfigs['e-user'][0] = array('icon'=>E_16_USER, 'title'=>ADLAN_110, 'url'=> e_ADMIN_ABS."users.php?searchquery=&filter_options=user_ban__0", 'total'=>$members); + $oldconfigs['e-user'][0] = array('icon'=>E_16_USER, 'title'=>ADLAN_110, 'url'=> e_ADMIN_ABS."users.php?searchquery=&filter_options=user_ban__0", 'total'=>$members, 'invert'=>1); $oldconfigs['e-user'][1] = array('icon'=>E_16_USER, 'title'=>ADLAN_111, 'url'=> e_ADMIN."users.php?searchquery=&filter_options=user_ban__2", 'total'=>$unverified); $oldconfigs['e-user'][2] = array('icon'=>E_16_BANLIST, 'title'=>ADLAN_112, 'url'=> e_ADMIN."users.php?searchquery=&filter_options=user_ban__1", 'total'=>$banned); @@ -1166,7 +1166,8 @@ class admin_shortcodes { foreach($v as $val) { - $class = admin_shortcodes::getBadge($val['total']); + $type = empty($val['invert']) ? 'latest' : 'invert'; + $class = admin_shortcodes::getBadge($val['total'], $type); $link = "".str_replace(":"," ",$val['title'])." ".$val['total'].""; $text .= "
  • ".$val['icon']." ".$link."
  • \n"; } @@ -1213,19 +1214,40 @@ Important 6 6 Info 8 8 Inverse 10 10 */ + if($type != 'invert') + { + $important = 'badge-important'; + $warning = 'badge-warning'; + $info = 'badge-info'; + $invert = false; + } + else // invert + { + $info = 'badge-important'; + $warning = 'badge-warning'; + $important = 'badge-info'; + $type = 'latest'; + $invert = true; + } + $class = 'badge '; - if($total > 100 && $type == 'latest') + + if($total > 500 && $invert == true) { - $class .= 'badge-important'; + $class .= 'badge-success'; + } + elseif($total > 100 && $type == 'latest') + { + $class .= $important; } elseif($total > 50 && $type == 'latest') { - $class .= 'badge-warning'; + $class .= $warning; } elseif($total > 0) { - $class .= 'badge-info'; + $class .= $info; }