News:

Wondering if this will always be free?  See why free is better.

Main Menu

text separator in template_menu

Started by tranzndance, January 01, 2006, 01:07:35 PM

Previous topic - Next topic

tranzndance

Hello,

How do I get a text separator to show up for the items in the template_menu function? I am trying to make my hxxp:takethu.com/forums/ [nonactive]match my hxxp:takethu.com/ [nonactive]. The gallery uses '::' to separate the menu items.

I modified Load.php here:
// Some basic information...
if (!isset($context['html_headers']))
$context['html_headers'] = '';
$context['menu_separator'] = !empty($settings['use_image_buttons']) ? ' :: ' : ' | ';
$context['session_id'] = &$sc;
$context['forum_name'] = &$mbname;


Here's my template_menu:
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

// Show the [home] and [help] buttons.
echo '
<a href="', $scripturl, '">', ($settings['use_image_buttons'] ? 'Home' : $txt[103]), '</a>', $context['menu_separator'], '
<a href="http://takethu.com">', ($settings['use_image_buttons'] ? 'Gallery' : $txt[103]), '</a>', $context['menu_separator'];

// Google Maps Mod
if ($modSettings['googleMapsEnable'])
echo '
<a href="', $scripturl, '?action=membermap">', ($settings['use_image_buttons'] ? 'Member Map' : 'Google Map'), '</a>', $context['menu_separator'];
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<a href="', $scripturl, '?action=profile">', ($settings['use_image_buttons'] ? 'My Profile' : $txt[467]), '</a>', $context['menu_separator'];

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<a href="', $scripturl, '?action=admin">', ($settings['use_image_buttons'] ? 'Admin' : $txt[2]), '</a>', $context['menu_separator'];

// Show [help] button.
echo '
<a href="', $scripturl, '?action=help" target="_blank">', ($settings['use_image_buttons'] ? 'Help' : $txt[119]), '</a>', $context['menu_separator'];
// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<a href="', $scripturl, '?action=login">', ($settings['use_image_buttons'] ? 'Login' : $txt[34]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=register">', ($settings['use_image_buttons'] ? 'Register' : $txt[97]), '</a>';
}
// Otherwise, they might want to [logout]...
else
echo '
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? 'Logout' : $txt[108]), '</a>';
}

As you can see, the text separator is not showing up and I can't figure out how to make it do so.

Thanks!

codenaught

It is showing up, just as the same color as the background. Highlight it to see it. :)

Try doing this:

$context['menu_separator'] = !empty($settings['use_image_buttons']) ? ' <span style="color: white;">::</span> ' : ' | ';
Dev Consultant
Former SMF Doc Coordinator

tranzndance

Oh... color me embarrassed. Thanks for the quick reply. :)

Advertisement: