Skip to content

Commit

Permalink
tibiacom: Fix the closing MenuBottom if there are extra categories
Browse files Browse the repository at this point in the history
  • Loading branch information
slawkens committed Jan 17, 2025
1 parent dd47423 commit d639e77
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion templates/tibiacom/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,11 @@ function MouseOutSubmenuItem(source)
<?php
$menus = get_template_menus();

$countElements = count($config['menu_categories']);
$i = 0;
foreach($config['menu_categories'] as $id => $cat) {
$i++;

if(!isset($menus[$id]) || ($id == MENU_CATEGORY_SHOP && !setting('core.gifts_system'))) {
continue;
}
Expand Down Expand Up @@ -369,7 +373,7 @@ function MouseOutSubmenuItem(source)
?>
</div>
<?php
if($id == MENU_CATEGORY_SHOP || (!setting('core.gifts_system') && $id == MENU_CATEGORY_SHOP - 1)) {
if($id == MENU_CATEGORY_SHOP || (!setting('core.gifts_system') && $i == $countElements - 1)) {
?>
<div id='MenuBottom' style='background-image:url(<?php echo $template_path; ?>/images/general/box-bottom.gif);'></div>
<?php
Expand Down

0 comments on commit d639e77

Please sign in to comment.