diff --git a/e107_core/shortcodes/batch/news_shortcodes.php b/e107_core/shortcodes/batch/news_shortcodes.php
index a532b817e..8db0a8fd1 100644
--- a/e107_core/shortcodes/batch/news_shortcodes.php
+++ b/e107_core/shortcodes/batch/news_shortcodes.php
@@ -212,7 +212,8 @@ class news_shortcodes extends e_shortcode
function sc_newscategory($parm)
{
$category_name = e107::getParser()->toHTML($this->news_item['category_name'], FALSE ,'defs');
- return "param['catlink'] : "#")."' href='".e107::getUrl()->create('news/list/category', $this->news_item)."'>".$category_name."";
+ $category = array('id' => $this->news_item['category_id'], 'name' => $this->news_item['category_sef'] );
+ return "param['catlink'] : "#")."' href='".e107::getUrl()->create('news/list/category', $category)."'>".$category_name."";
}
function sc_newsdate($parm)
diff --git a/e107_plugins/login_menu/login_menu.php b/e107_plugins/login_menu/login_menu.php
index 11cd51851..b1437a8ed 100644
--- a/e107_plugins/login_menu/login_menu.php
+++ b/e107_plugins/login_menu/login_menu.php
@@ -161,7 +161,11 @@ else
{
//get templates
if (!$LOGIN_MENU_FORM || !$LOGIN_MENU_MESSAGE) {
- if (file_exists(THEME."login_menu_template.php")){
+ if (file_exists(THEME.'templates/login_menu/login_menu_template.php')) // Preferred v2.x location.
+ {
+ require(THEME.'templates/login_menu/login_menu_template.php');
+ }
+ elseif (file_exists(THEME."login_menu_template.php")){
require_once(THEME."login_menu_template.php");
}else{
require_once(e_PLUGIN."login_menu/login_menu_template.php");
diff --git a/e107_plugins/login_menu/login_menu_shortcodes.php b/e107_plugins/login_menu/login_menu_shortcodes.php
index e83763339..a5f138213 100755
--- a/e107_plugins/login_menu/login_menu_shortcodes.php
+++ b/e107_plugins/login_menu/login_menu_shortcodes.php
@@ -311,13 +311,13 @@ class login_menu_shortcodes extends e_shortcode
if(!isset($data['new_news'])) return '';
$tmp = array();
if($data['new_news']){
- $tmp['LM_STAT_NEW'] = "return '".$data['new_news']."';";
- $tmp['LM_STAT_LABEL'] = $data['new_news'] == 1 ? "return '".LOGIN_MENU_L14."';" : "return '".LOGIN_MENU_L15."';";
+ $tmp['LM_STAT_NEW'] = $data['new_news'];
+ $tmp['LM_STAT_LABEL'] = $data['new_news'] == 1 ? LOGIN_MENU_L14 : LOGIN_MENU_L15;
$tmp['LM_STAT_EMPTY'] = '';
} else {
$tmp['LM_STAT_NEW'] = '';
$tmp['LM_STAT_LABEL'] = '';
- $tmp['LM_STAT_EMPTY'] = "return '".LOGIN_MENU_L26." ".LOGIN_MENU_L15."';";
+ $tmp['LM_STAT_EMPTY'] = LOGIN_MENU_L26." ".LOGIN_MENU_L15;
}
return $tp -> parseTemplate($LOGIN_MENU_STATITEM, false, $tmp);
}
@@ -329,13 +329,13 @@ class login_menu_shortcodes extends e_shortcode
if(!isset($data['new_comments'])) return '';
$tmp = array();
if($data['new_comments']){
- $tmp['LM_STAT_NEW'] = "return '".$data['new_comments']."';";
- $tmp['LM_STAT_LABEL'] = $data['new_comments'] == 1 ? "return '".LOGIN_MENU_L18."';" : "return '".LOGIN_MENU_L19."';";
+ $tmp['LM_STAT_NEW'] = $data['new_comments'];
+ $tmp['LM_STAT_LABEL'] = $data['new_comments'] == 1 ? LOGIN_MENU_L18 : LOGIN_MENU_L19;
$tmp['LM_STAT_EMPTY'] = '';
} else {
- $tmp['LM_STAT_NEW'] = '';
+ $tmp['LM_STAT_NEW'] = '';
$tmp['LM_STAT_LABEL'] = '';
- $tmp['LM_STAT_EMPTY'] = "return '".LOGIN_MENU_L26." ".LOGIN_MENU_L19."';";
+ $tmp['LM_STAT_EMPTY'] = LOGIN_MENU_L26." ".LOGIN_MENU_L19;
}
return $tp -> parseTemplate($LOGIN_MENU_STATITEM, false, $tmp);
}
@@ -347,13 +347,13 @@ class login_menu_shortcodes extends e_shortcode
if(!isset($data['new_users'])) return '';
$tmp = array();
if($data['new_users']){
- $tmp['LM_STAT_NEW'] = "return '".$data['new_users']."';";
- $tmp['LM_STAT_LABEL'] = $data['new_users'] == 1 ? "return '".LOGIN_MENU_L22."';" : "return '".LOGIN_MENU_L23."';";
+ $tmp['LM_STAT_NEW'] = $data['new_users'];
+ $tmp['LM_STAT_LABEL'] = $data['new_users'] == 1 ? LOGIN_MENU_L22 : LOGIN_MENU_L23;
$tmp['LM_STAT_EMPTY'] = '';
} else {
- $tmp['LM_STAT_NEW'] = '';
+ $tmp['LM_STAT_NEW'] = '';
$tmp['LM_STAT_LABEL'] = '';
- $tmp['LM_STAT_EMPTY'] = "return '".LOGIN_MENU_L26." ".LOGIN_MENU_L23."';";
+ $tmp['LM_STAT_EMPTY'] = LOGIN_MENU_L26." ".LOGIN_MENU_L23;
}
return $tp -> parseTemplate($LOGIN_MENU_STATITEM, false, $tmp);
}
@@ -422,4 +422,4 @@ class login_menu_shortcodes extends e_shortcode
}
-?>
\ No newline at end of file
+?>