From 9f1302afe9a8c3deb9bae32a581376a55ab8286a Mon Sep 17 00:00:00 2001 From: Leonard Jonathan Oh Date: Fri, 23 Feb 2024 15:05:34 +0000 Subject: [PATCH] Enhancement (bf2sclone): Add environment variable to hide country flags --- docker-compose.yml | 1 + src/bf2sclone/config.inc.php | 5 ++++- src/bf2sclone/template/leaderboard.php | 2 +- src/bf2sclone/template/my-leaderboard.php | 2 +- src/bf2sclone/template/playerstats.php | 2 +- src/bf2sclone/template/search.php | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 4897afd..3b0f16d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -147,6 +147,7 @@ services: # - TITLE=BF2S Clone - RANKING_REFRESH_TIME=0 # - RANKING_HIDE_BOTS=false + # - RANKING_HIDE_COUNTRY=false # - RANKING_HIDE_HIDDEN_PLAYERS=false # - RANKING_HIDE_PIDS_START=1 # - RANKING_HIDE_PIDS_END=999999999 diff --git a/src/bf2sclone/config.inc.php b/src/bf2sclone/config.inc.php index b62a7b3..158abb2 100644 --- a/src/bf2sclone/config.inc.php +++ b/src/bf2sclone/config.inc.php @@ -30,6 +30,9 @@ function defineVar($name, $default) { // Whether to hide bots from rankings defineVar('RANKING_HIDE_BOTS', false); +// Whether to hide player country flag from rankings +defineVar('RANKING_HIDE_COUNTRY', false); + // Whether to hide hidden players from rankings defineVar('RANKING_HIDE_HIDDEN_PLAYERS', false); @@ -37,7 +40,7 @@ function defineVar($name, $default) { defineVar('RANKING_HIDE_PIDS_START', 1); defineVar('RANKING_HIDE_PIDS_END', 999999999); -// Whether to show PIDs instead of player names hidden players from rankings +// Whether to show PIDs instead of player names in rankings defineVar('RANKING_PIDS_AS_NAMES', false); // Number of players to show on the leaderboard frontpage diff --git a/src/bf2sclone/template/leaderboard.php b/src/bf2sclone/template/leaderboard.php index 71465ca..10bb447 100644 --- a/src/bf2sclone/template/leaderboard.php +++ b/src/bf2sclone/template/leaderboard.php @@ -64,7 +64,7 @@ '.$value['score'].' - + '.intToTime($value['time']).'