Home
Top Menu links problem
  Welcome, Guest. Please login or register.
December 01, 2008, 04:47:10 PM
Home New Posts Search Calendar


Login with username, password and session length
Forum  |  MamboHacks.com  |  Mambo-SMF Forum 1.3.0 Support  |  Topic: Top Menu links problem « previous next »
Pages: [1] Go Down Print
Author Topic: Top Menu links problem  (Read 1640 times)
Alberto
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 2


View Profile
Top Menu links problem
« on: May 31, 2005, 03:00:08 AM »

Hi,

Mambo 4.5.2, Mambo-SMF 1.3.1.2

I have some problems with the links in the top menu ([Home][Help][Search][Login][Register]). I've tried to fix it but I don't understand how this works:

This is the code from /forum/Themes/default/index.template.php:

Code:
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

// Show the [home] and [help] buttons.
echo '
<a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=help" target="_blank">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];

// How about the [search] button?
if ($context['allow_search'])
echo '
<a href="', $scripturl, '?action=search">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/search.gif" alt="' . $txt[182] . '" style="margin: 2px 0;" border="0" />' : $txt[182]), '</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'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin.gif" alt="' . $txt[2] . '" style="margin: 2px 0;" border="0" />' : $txt[2]), '</a>', $context['menu_separator'];

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<a href="', $scripturl, '?action=profile">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/profile.gif" alt="' . $txt[79] . '" style="margin: 2px 0;" border="0" />' : $txt[467]), '</a>', $context['menu_separator'];

// The [calendar]!
if ($context['allow_calendar'])
echo '
<a href="', $scripturl, '?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '" style="margin: 2px 0;" border="0" />' : $txt['calendar24']), '</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'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/login.gif" alt="' . $txt[34] . '" style="margin: 2px 0;" border="0" />' : $txt[34]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=register">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/register.gif" alt="' . $txt[97] . '" style="margin: 2px 0;" border="0" />' : $txt[97]), '</a>', $context['menu_separator'];
}
// Otherwise, they might want to [logout]...
else
echo '
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108] . '" style="margin: 2px 0;" border="0" />' : $txt[108]), '</a>';
}

The HTML code generated when I'm not logged:

Code:
<a href="http://www.xxx.com/component/option,com_smf/Itemid,44/expv,0/"><img src="forum/Themes/default/images/english/home.gif" alt="Home" style="margin: 2px 0;" border="0" /></a>
<a href="http://www.xxx.com/component/option,com_smf/Itemid,44/expv,0/action,help" target="_blank"><img src="forum/Themes/default/images/english/help.gif" alt="Help" style="margin: 2px 0;" border="0" /></a>
<a href="http://www.xxx.com/component/option,com_smf/Itemid,44/expv,0/action,search"><img src="forum/Themes/default/images/english/search.gif" alt="Search" style="margin: 2px 0;" border="0" /></a>
<a href="http://www.xxx.com/component/option,com_smf/Itemid,44/expv,0/action,login"><img src="forum/Themes/default/images/english/login.gif" alt="Login" style="margin: 2px 0;" border="0" /></a>
<a href="http://www.xxx.com/index.php?option=com_registration&task=register"><img src="forum/Themes/default/images/english/register.gif" alt="Register" style="margin: 2px 0;" border="0" /></a>

Why the link generated for 'Register' is not SEF? The PHP code is similar to the other buttons...


And when I'm logged as admin:

Code:
<a href="http://www.xxx.com/component/option,com_smf/Itemid,28/expv,0/"><img src="forum/Themes/default/images/english/home.gif" alt="Home" style="margin: 2px 0;" border="0" /></a>
<a href="http://www.xxx.com/component/option,com_smf/Itemid,28/expv,0/action,help" target="_blank"><img src="forum/Themes/default/images/english/help.gif" alt="Help" style="margin: 2px 0;" border="0" /></a>
<a href="http://www.xxx.com/component/option,com_smf/Itemid,28/expv,0/action,search"><img src="forum/Themes/default/images/english/search.gif" alt="Search" style="margin: 2px 0;" border="0" /></a>
<a href="http://www.xxx.com/forum/index.php?action=admin" target="new"><img src="forum/Themes/default/images/english/admin.gif" alt="Admin" style="margin: 2px 0;" border="0" /></a>
<a href="http://www.xxx.com/component/option,com_smf/Itemid,28/expv,0/action,profile"><img src="forum/Themes/default/images/english/profile.gif" alt="Edit Profile" style="margin: 2px 0;" border="0" /></a>
<a href="http://www.xxx.com/component/option,com_smf/Itemid,28/expv,0/action,calendar"><img src="forum/Themes/default/images/english/calendar.gif" alt="Calendar" style="margin: 2px 0;" border="0" /></a>
<a href="http://www.xxx.com/component/option,com_smf/Itemid,28/expv,0/action,logout/sesc,fc55df3e9f2fdc8aaca4eee6e497bd2e"><img src="forum/Themes/default/images/english/logout.gif" alt="Logout" style="margin: 2px 0;" border="0" /></a>



The link for 'Admin' have target="new", I want to get rid of it  but I cant find any reference of it in the PHP code.
Any ideas?

Alberto
Logged
Pages: [1] Go Up Print 
Forum  |  MamboHacks.com  |  Mambo-SMF Forum 1.3.0 Support  |  Topic: Top Menu links problem « previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Forum | Powered by SMF 1.0.5 & Mambo-SMF.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!
None of the text or images in this public website may be copied without the expressed written consent of the authors.
Copyright 2005 by MamboHacks.com. Powered by Mambo. All rights reserved.
TERMS OF USE