mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-19 13:01:12 -07:00
Some enhancements for flags (#1470)
* Some enhancements for flags * Update main.php * Upload * Update functions.php * Update functions.php * Update main.php * Update CHANGELOG.md
This commit is contained in:
parent
5774c14686
commit
b80fa8857d
3 changed files with 11 additions and 3 deletions
|
@ -13,6 +13,7 @@
|
||||||
- Some enhancements [\#1445](https://github.com/torrentpier/torrentpier/pull/1445) ([belomaxorka](https://github.com/belomaxorka))
|
- Some enhancements [\#1445](https://github.com/torrentpier/torrentpier/pull/1445) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Guests can view polls [\#1464](https://github.com/torrentpier/torrentpier/pull/1464) ([belomaxorka](https://github.com/belomaxorka))
|
- Guests can view polls [\#1464](https://github.com/torrentpier/torrentpier/pull/1464) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Improved app debug [\#1438](https://github.com/torrentpier/torrentpier/pull/1438) ([belomaxorka](https://github.com/belomaxorka))
|
- Improved app debug [\#1438](https://github.com/torrentpier/torrentpier/pull/1438) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
|
- Some enhancements for flags [\#1470](https://github.com/torrentpier/torrentpier/pull/1470) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Fixed quote selection for smiles [\#1457](https://github.com/torrentpier/torrentpier/pull/1457) ([belomaxorka](https://github.com/belomaxorka))
|
- Fixed quote selection for smiles [\#1457](https://github.com/torrentpier/torrentpier/pull/1457) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Demo mode: Allow registering torrents by default [\#1440](https://github.com/torrentpier/torrentpier/pull/1440) ([belomaxorka](https://github.com/belomaxorka))
|
- Demo mode: Allow registering torrents by default [\#1440](https://github.com/torrentpier/torrentpier/pull/1440) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Temp: Removed showing forum description in `viewforum.php` [\#1465](https://github.com/torrentpier/torrentpier/pull/1465) ([belomaxorka](https://github.com/belomaxorka))
|
- Temp: Removed showing forum description in `viewforum.php` [\#1465](https://github.com/torrentpier/torrentpier/pull/1465) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
|
|
|
@ -1193,9 +1193,15 @@ function render_flag(string $code): string
|
||||||
global $lang;
|
global $lang;
|
||||||
static $iconExtension = '.svg';
|
static $iconExtension = '.svg';
|
||||||
|
|
||||||
$flagIconPath = BB_ROOT . 'styles/images/flags/' . $code . $iconExtension;
|
if (isset($lang['COUNTRIES'][$code])) {
|
||||||
if (isset($lang['COUNTRIES'][$code]) && is_file($flagIconPath)) {
|
if ($code === '0') {
|
||||||
return '<img src="' . $flagIconPath . '" class="poster-flag" alt="' . $code . '" title="' . $lang['COUNTRIES'][$code] . '">';
|
return ''; // No selected
|
||||||
|
} else {
|
||||||
|
$flagIconPath = BB_ROOT . 'styles/images/flags/' . $code . $iconExtension;
|
||||||
|
if (is_file($flagIconPath)) {
|
||||||
|
return '<img src="' . $flagIconPath . '" class="poster-flag" alt="' . $code . '" title="' . $lang['COUNTRIES'][$code] . '">';
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $code;
|
return $code;
|
||||||
|
|
|
@ -979,6 +979,7 @@ $lang['DATETIME']['DEC'] = 'Dec';
|
||||||
|
|
||||||
// Country selector
|
// Country selector
|
||||||
$lang['COUNTRIES'] = [
|
$lang['COUNTRIES'] = [
|
||||||
|
0 => 'No select',
|
||||||
'AD' => 'Andorra',
|
'AD' => 'Andorra',
|
||||||
'AE' => 'United Arab Emirates',
|
'AE' => 'United Arab Emirates',
|
||||||
'AF' => 'Afghanistan',
|
'AF' => 'Afghanistan',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue