From 51acb739e907fd0a9cdffeb08ad494dacb144319 Mon Sep 17 00:00:00 2001 From: slawkens1 Date: Fri, 26 Jan 2018 08:04:28 +0100 Subject: [PATCH] * fixed #42 * changed mb_strtolower functions to strtolower() - was useless in this case * attemp to fix some bug with PHPMailer not finding its language file --- system/functions.php | 1 + system/pages/creatures.php | 26 +++++++++++++------------- system/templates/online.html.twig | 2 +- templates/tibiacom/index.php | 8 ++++---- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/system/functions.php b/system/functions.php index 4afe969b..144e21b4 100644 --- a/system/functions.php +++ b/system/functions.php @@ -799,6 +799,7 @@ function _mail($to, $subject, $body, $altBody = '', $add_html_tags = true) { require(SYSTEM . 'libs/phpmailer/PHPMailerAutoload.php'); $mailer = new PHPMailer(); + $mailer->setLanguage('en', LIBS . 'phpmailer/language/'); } $signature_html = ''; diff --git a/system/pages/creatures.php b/system/pages/creatures.php index d6e1cb4e..3ed99096 100644 --- a/system/pages/creatures.php +++ b/system/pages/creatures.php @@ -110,21 +110,21 @@ if(empty($_REQUEST['creature'])) $number_of_rows = 0; foreach($monsters as $monster) { echo ''.$monster['name'].''.$monster['health'].''.$monster['exp'].''; - + if($monster['summonable']) { echo ''.$monster['mana'].''; } else { echo '---'; } - + if($monster['convinceable']) { echo ''.$monster['mana'].''; } else { echo '---'; } - + echo ''.ucwords($monster['race']).''; } @@ -170,13 +170,13 @@ if(isset($monster['name'])) echo ' '; } - + $voices = json_decode($monster['voices'], true); if(count($voices) > 0) { foreach($voices as &$voice) { $voice = '"' . $voice . '"'; } - + $number_of_rows++; echo ''; } echo '
'; - $monster['gfx_name'] = trim(mb_strtolower($monster['name'])).".gif"; + $monster['gfx_name'] = trim(strtolower($monster['name'])).".gif"; if(!file_exists('images/monsters/'.$monster['gfx_name'])) { $gfx_name = str_replace(" ", "", $monster['gfx_name']); if(file_exists('images/monsters/' . $gfx_name)) echo ''; - else - echo ''; + else + echo ''; } else echo ''; @@ -190,19 +190,19 @@ if(isset($monster['name'])) $number_of_rows++; echo '
Immunities: '.implode(', ', $immunities).'
Voices: '.implode(', ', $voices).'
'; - + $loot = json_decode($monster['loot'], true); if($loot) { @@ -214,18 +214,18 @@ if(isset($monster['name'])) } return ($a['chance'] > $b['chance']) ? -1 : 1; } - + usort($loot, 'sort_by_chance'); - + $i = 0; foreach($loot as $item) { $name = getItemNameById($item['id']); $tooltip = $name . '
Chance: ' . round($item['chance'] / 1000, 2) . '%
Max count: ' . $item['count']; - + echo ' ' .$name . ''; $i++; } - + echo ''; } diff --git a/system/templates/online.html.twig b/system/templates/online.html.twig index faa46b52..5576d73f 100644 --- a/system/templates/online.html.twig +++ b/system/templates/online.html.twig @@ -14,7 +14,7 @@ {% set players_count = players|length %} {% set afk = players_count - status.players %} {% if afk < 0 %} - {% set players = players + afk|abs %} + {% set players_count = players_count + afk|abs %} {% set afk = 0 %} {% endif %} Currently there are {{ status.players }} active and {{ afk }} AFK players.
diff --git a/templates/tibiacom/index.php b/templates/tibiacom/index.php index d721e2e2..4fcac67e 100644 --- a/templates/tibiacom/index.php +++ b/templates/tibiacom/index.php @@ -46,7 +46,7 @@ if(isset($config['boxes'])) var activeSubmenuItem=""; var IMAGES="/images"; var LINK_ACCOUNT=""; - + function rowOverEffect(object) { if (object.className == 'moduleRow') object.className = 'moduleRowOver'; } @@ -54,7 +54,7 @@ if(isset($config['boxes'])) function rowOutEffect(object) { if (object.className == 'moduleRowOver') object.className = 'moduleRow'; } - + function InitializePage() { LoadLoginBox(); LoadMenu(); @@ -341,7 +341,7 @@ foreach($config['menu_categories'] as $id => $cat) {
_Submenu' class='Submenu'> $menu) { $link_color = '#' . (strlen($menu['color']) == 0 ? $default_menu_color : $menu['color']); ?> @@ -444,6 +444,6 @@ foreach($config['menu_categories'] as $id => $cat) { function logo_monster() { global $config; - return str_replace(" ", "", trim(mb_strtolower($config['logo_monster']))); + return str_replace(" ", "", trim(strtolower($config['logo_monster']))); } ?>