mirror of
https://github.com/e107inc/e107.git
synced 2025-07-30 19:30:25 +02:00
Login menu shortcodes now using SEF Urls.
This commit is contained in:
@@ -229,24 +229,28 @@ class login_menu_shortcodes extends e_shortcode
|
||||
|
||||
function sc_lm_usersettings($parm='')
|
||||
{
|
||||
$text = ($parm) ? $parm : LOGIN_MENU_L12;
|
||||
return '<a class="login_menu_link usersettings" id="login_menu_link_usersettings" href="'.e_HTTP.'usersettings.php">'.$text.'</a>';
|
||||
$text = ($parm) ? $parm : LOGIN_MENU_L12;
|
||||
$url = $this->sc_lm_usersettings_href();
|
||||
return '<a class="login_menu_link usersettings" id="login_menu_link_usersettings" href="'.$url.'">'.$text.'</a>';
|
||||
}
|
||||
|
||||
function sc_lm_usersettings_href($parm='')
|
||||
{
|
||||
return e_HTTP.'usersettings.php';
|
||||
return e107::getUrl()->create('user/myprofile/edit');
|
||||
// return e_HTTP.'usersettings.php';
|
||||
}
|
||||
|
||||
function sc_lm_profile($parm='')
|
||||
{
|
||||
$text = ($parm) ? $parm : LOGIN_MENU_L13;
|
||||
return '<a class="login_menu_link profile" id="login_menu_link_profile" href="'.e_HTTP.'user.php?id.'.USERID.'">'.$text.'</a>';
|
||||
$text = ($parm) ? $parm : LOGIN_MENU_L13;
|
||||
$url = $this->sc_lm_profile_href();
|
||||
return '<a class="login_menu_link profile" id="login_menu_link_profile" href="'.$url.'">'.$text.'</a>';
|
||||
}
|
||||
|
||||
function sc_lm_profile_href($parm='')
|
||||
{
|
||||
return e_HTTP.'user.php?id.'.USERID;
|
||||
return e107::getUrl()->create('user/profile/view',array('user_id'=>USERID, 'user_name'=>USERNAME));
|
||||
// return e_HTTP.'user.php?id.'.USERID;
|
||||
}
|
||||
|
||||
function sc_lm_logout($parm='')
|
||||
|
@@ -23,6 +23,7 @@ class theme_shortcodes extends e_shortcode
|
||||
include_lan(e_PLUGIN."login_menu/languages/".e_LANGUAGE.".php");
|
||||
|
||||
$tp = e107::getParser();
|
||||
require_once(e_PLUGIN."login_menu/login_menu_shortcodes.php");
|
||||
|
||||
if(!USERID) // Logged Out.
|
||||
{
|
||||
@@ -79,7 +80,7 @@ class theme_shortcodes extends e_shortcode
|
||||
</ul>";
|
||||
|
||||
|
||||
require_once(e_PLUGIN."login_menu/login_menu_shortcodes.php");
|
||||
|
||||
return $tp->parseTemplate($text, false, $login_menu_shortcodes);
|
||||
}
|
||||
|
||||
@@ -92,8 +93,12 @@ class theme_shortcodes extends e_shortcode
|
||||
<ul class="nav navbar-nav pull-right">
|
||||
<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">{SETIMAGE: w=20}{USER_AVATAR} '. USERNAME.' <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="'.e_HTTP.'usersettings.php"><span class="glyphicon glyphicon-cog"></span> Settings</a></li>
|
||||
<li><a class="dropdown-toggle no-block" role="button" href="'.e_HTTP.'user.php?id.'.USERID.'"><span class="glyphicon glyphicon-user"></span> Profile</a></li>
|
||||
<li>
|
||||
<a href="{LM_USERSETTINGS_HREF}"><span class="glyphicon glyphicon-cog"></span> Settings</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-toggle no-block" role="button" href="{LM_PROFILE_HREF}"><span class="glyphicon glyphicon-user"></span> Profile</a>
|
||||
</li>
|
||||
<li class="divider"></li>';
|
||||
|
||||
if(ADMIN)
|
||||
@@ -109,7 +114,7 @@ class theme_shortcodes extends e_shortcode
|
||||
|
||||
';
|
||||
|
||||
return $tp->parseTemplate($text,true);
|
||||
return $tp->parseTemplate($text,true,$login_menu_shortcodes);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user