function team_wins($value, $data) { global $cms; $bar = dual_bar(array('pct1' => $data['bravowonpct'], 'pct2' => $data['alphawonpct'], 'title1' => $data['bravowon'] . " " . $cms->trans("Bravo Wins") . " (" . $data['bravowonpct'] . "%)", 'title2' => $data['alphawon'] . " " . $cms->trans("Alpha Wins") . " (" . $data['alphawonpct'] . "%)", 'color1' => 'cc0000', 'color2' => '0000cc')); return $bar; }
function team_wins($value, $data) { global $cms; $bar = dual_bar(array('pct1' => $data['alienwonpct'], 'pct2' => $data['marinewonpct'], 'title1' => $data['alienwon'] . " " . $cms->trans("Alien Wins") . " (" . $data['alienwonpct'] . "%)", 'title2' => $data['marinewon'] . " " . $cms->trans("Marine Wins") . " (" . $data['marinewonpct'] . "%)")); return $bar; }
function team_wins($value, $data) { global $cms; $bar = dual_bar(array('pct1' => $data['terroristwonpct'], 'pct2' => $data['ctwonpct'], 'title1' => $data['terroristwon'] . " " . $cms->trans("Terrorist Wins") . " (" . $data['terroristwonpct'] . "%)", 'title2' => $data['ctwon'] . " " . $cms->trans("Counter-Terrorist Wins") . " (" . $data['ctwonpct'] . "%)")); return $bar; }
function team_wins($value, $data) { global $cms; $bar = dual_bar(array('pct1' => $data['axiskillspct'], 'pct2' => $data['allieskillspct'], 'title1' => commify($data['axiskills']) . " " . $cms->trans("Axis Kills") . " (" . $data['axiskillspct'] . "%)", 'title2' => commify($data['allieskills']) . " " . $cms->trans("Ally Kills") . " (" . $data['allieskillspct'] . "%)")); return $bar; }
/** Creates a non-image dual percentage bar with defined width and color. **/ function smarty_function_dualbar($args, &$smarty) { return dual_bar($args); }
function team_wins($value, $data) { global $cms; $bar = dual_bar(array('pct1' => $data['axiswonpct'], 'pct2' => $data['allieswonpct'], 'title1' => $data['axiswon'] . " " . $cms->trans("Axis Wins") . " (" . $data['axiswonpct'] . "%)", 'title2' => $data['allieswon'] . " " . $cms->trans("Ally Wins") . " (" . $data['allieswonpct'] . "%)")); return $bar; }
function player_left_column_mod(&$plr, &$theme) { global $cms; parent::player_left_column_mod($plr, $theme); $tpl = 'player_left_column_mod'; if ($theme->template_found($tpl, false)) { $actions = $theme->get_template_vars('mod_actions'); if (!is_array($actions)) { $actions = array(); } // remove actions that are not relevant to GG //unset($actions['bombexploded'], $actions['bombdefused'],$actions['rescuedhostages'],...); $actions['winsgained'] = array('label' => $cms->trans("Wins Gained"), 'type' => 'pct_bar', 'value' => array('pct' => $plr['winsgainedpct'], 'title' => $plr['winsgained'] . ' ' . $cms->trans('wins gained') . ' (' . $plr['winsgainedpct'] . '%)', 'color1' => 'cc0000', 'color2' => '00cc00', 'width' => 130)); $cms->filter('left_column_actions', $actions); foreach (array_keys($actions) as $i) { // if the value is not an array then it's been processed // already from the sub-class. if (!is_array($actions[$i]['value'])) { continue; } if ($actions[$i]['type'] == 'dual_bar') { $actions[$i]['value'] = dual_bar($actions[$i]['value']); } else { $actions[$i]['value'] = pct_bar($actions[$i]['value']); } } $theme->assign(array('mod_actions' => $actions)); $output = $theme->parse($tpl, false); $theme->assign('player_left_column_mod', $output); } }