New configurable: item_images_extension

This commit is contained in:
slawkens 2020-10-08 00:13:35 +02:00
parent ed3d415c05
commit c30300c368
3 changed files with 3 additions and 2 deletions

View File

@ -87,6 +87,7 @@ $config = array(
// images
'outfit_images_url' => 'http://outfit-images.ots.me/outfit.php', // set to animoutfit.php for animated outfit
'item_images_url' => 'http://item-images.ots.me/1092/', // set to images/items if you host your own items in images folder
'item_images_extension' => '.gif',
// account
'account_management' => true, // disable if you're using other method to manage users (fe. tfs account manager)

View File

@ -168,7 +168,7 @@ function getItemImage($id, $count = 1)
$file_name .= '-' . $count;
global $config;
return '<img src="' . $config['item_images_url'] . $file_name . '.gif"' . $tooltip . ' width="32" height="32" border="0" alt="' .$id . '" />';
return '<img src="' . $config['item_images_url'] . $file_name . config('item_images_extension') . '"' . $tooltip . ' width="32" height="32" border="0" alt="' .$id . '" />';
}
function getFlagImage($country)

View File

@ -146,7 +146,7 @@ if (empty($_REQUEST['creature'])) {
$name = getItemNameById($item['id']);
$tooltip = $name . '<br/>Chance: ' . round($item['chance'] / 1000, 2) . '%<br/>Max count: ' . $item['count'];
echo '<img src="' . $config['item_images_url'] . $item['id'] . '.gif" class="item_image" title="' . $tooltip . '" width="32" height="32" border="0" alt=" ' . $name . '" />';
echo '<img src="' . $config['item_images_url'] . $item['id'] . config('item_images_extension') . '" class="item_image" title="' . $tooltip . '" width="32" height="32" border="0" alt=" ' . $name . '" />';
$i++;
}