Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: cyberdyne - joulukuu 04, 2011, 01:28:41 AP

Otsikko: Menu alignment, custom tabs
Kirjoitti: cyberdyne - joulukuu 04, 2011, 01:28:41 AP
Hi,
I've edited a custom-pages-and-tab mod which originally allowed for two extra separate tabs on the main menu. I've changed this to 5 and am trying to place those 5 in a drop-down. I've succeeded with the menu to a degree, in that I've created the drop-down in subs.php but upon selecting any of the sub-menu tabs other than the top, the menu alignment changes and a visual issue occurs.

I'd be very grateful if one of you kind guru's could help me correct this please.

The forum is at: removed by OP
Problematic menu tab: 'M.O.T.M. 2011'

Temporary username is: smfuser
Password is: smfuser

The mod was originally:   http://custom.simplemachines.org/mods/index.php?mod=2604
My customised menu code is below.

Many thanks in advance for any help getting the menu to align correctly upon sub-menu links selection.

ps: please excuse the errors and colour issues, the site is far from finished !!

'mytab1' => array(
    'title' => (!empty ($modSettings['mytab1_label']) ? ($modSettings['mytab1_label']) : ($txt['mytab1defaultLabel'])),
    'href' => $scripturl . '?action=' . (!empty($modSettings['mytab1_Custom_URL']) ? $modSettings['mytab1_Custom_URL'] : $txt['mytab1default']),
    'show' => $context['show_mytab1'] && !empty($modSettings['mytab1_OnorOff']),
  'sub_buttons' => array(
'mytab2' => array(
    'title' => (!empty ($modSettings['mytab2_label']) ? ($modSettings['mytab2_label']) : ($txt['mytab2defaultLabel'])),
    'href' => $scripturl . '?action=' . (!empty($modSettings['mytab2_Custom_URL']) ? $modSettings['mytab2_Custom_URL'] : $txt['mytab2default']),
    'show' => $context['show_mytab2'] && !empty($modSettings['mytab2_OnorOff']),
),
'mytab3' => array(
    'title' => (!empty ($modSettings['mytab3_label']) ? ($modSettings['mytab3_label']) : ($txt['mytab3defaultLabel'])),
    'href' => $scripturl . '?action=' . (!empty($modSettings['mytab3_Custom_URL']) ? $modSettings['mytab3_Custom_URL'] : $txt['mytab3default']),
    'show' => $context['show_mytab3'] && !empty($modSettings['mytab3_OnorOff']),
),
'mytab4' => array(
    'title' => (!empty ($modSettings['mytab4_label']) ? ($modSettings['mytab4_label']) : ($txt['mytab4defaultLabel'])),
    'href' => $scripturl . '?action=' . (!empty($modSettings['mytab4_Custom_URL']) ? $modSettings['mytab4_Custom_URL'] : $txt['mytab4default']),
    'show' => $context['show_mytab4'] && !empty($modSettings['mytab4_OnorOff']),
),
'mytab5' => array(
    'title' => (!empty ($modSettings['mytab5_label']) ? ($modSettings['mytab5_label']) : ($txt['mytab5defaultLabel'])),
    'href' => $scripturl . '?action=' . (!empty($modSettings['mytab5_Custom_URL']) ? $modSettings['mytab5_Custom_URL'] : $txt['mytab5default']),
    'show' => $context['show_mytab5'] && !empty($modSettings['mytab5_OnorOff']),
  'is_last' => true,
    ),
  ),
),

Otsikko: Re: Menu alignment, custom tabs
Kirjoitti: ARG01 - joulukuu 04, 2011, 02:00:01 AP
Seems to be functioning fine on my end. No alignment changes at all.  ;)
Otsikko: Re: Menu alignment, custom tabs
Kirjoitti: cyberdyne - joulukuu 04, 2011, 02:06:07 AP
Really? That's strange. I see the following:



Thanks for checking though. Maybe it's a browser issue. I'm using FF Nightly, will try others.

Edit:
I also see the issue using IE 8 and FF 3.6.2

Does anyone else see the above issue  please ??
Otsikko: Re: Menu alignment, custom tabs
Kirjoitti: cyberdyne - joulukuu 04, 2011, 02:39:17 AP
I have found the following error in the forum logs, I assume it is related:

LainaaThemes/default/mytab2.template.php (body_above sub template - eval?)
Line: 359
(and Line: 360)
Otsikko: Re: Menu alignment, custom tabs
Kirjoitti: cyberdyne - joulukuu 04, 2011, 04:07:16 AP
Going to approach this in a different way so marking as solved. Thanks anyway.