Home arrow Forum Top Menu links problem
  Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2008, 06:06:13 PM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Hacks
| |-+  Joomla-SMF Forum Support
| | |-+  Mambo-SMF 1.3.x
| | | |-+  Top Menu links problem
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Top Menu links problem  (Read 1115 times)
Alberto
Joomla 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 
« previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use
Joomla Hacks



Joomla Hacks
German Lang French Lang Italian Lang Spanish Lang Japanese Lang Chinese Lang
Search Contact About Advertise Blogs Topsites Submit News Register Login