Home arrow Forum
Latest posts of: Alberto
  Welcome, Guest. Please login or register.
December 03, 2008, 05:06:10 PM
Home New Posts Search Calendar


Login with username, password and session length
  Show Posts
Pages: [1]
1  MamboHacks.com / Mambo-SMF Forum 1.3.0 Support / 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
2  MamboHacks.com / Mambo-SMF Integration 1.2.0 Support / Wrong Register link on: April 23, 2005, 09:50:41 AM
Hi,
I've just installed SMF + Mambo-SMF Integration... I have a "register" button with a wrong link in the buttons that appear above the forums (HOME|HELP|SEARCH|LOGIN|REGISTER:

 /component/option,com_smf_registration/task,register

In the Mambo_SMF_login module, the link is:

/component/option,com_smf/Itemid,26/task,register/ (this one works)

Where is the code that generates the wrong link?

Thank you for your help :-P

Alberto
Pages: [1]


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