mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +02:00
Fix for forgot password and activation links. Fix for news-edit button. Fix for html5 validation of html code using '&'.
This commit is contained in:
@@ -109,7 +109,7 @@ class news_shortcodes extends e_shortcode
|
||||
$pref = e107::getPref();
|
||||
$sql = e107::getDb();
|
||||
|
||||
if($this->commentsDisabled)
|
||||
if($this->commentsDisabled || ($this->commentsEngine != 'e107'))
|
||||
{
|
||||
return '';
|
||||
}
|
||||
@@ -259,7 +259,7 @@ class news_shortcodes extends e_shortcode
|
||||
function sc_newscommentlink($parm=null)
|
||||
{
|
||||
|
||||
if($this->commentsDisabled)
|
||||
if($this->commentsDisabled || ($this->commentsEngine != 'e107'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -336,7 +336,7 @@ class news_shortcodes extends e_shortcode
|
||||
|
||||
$class = varset($parm['class']);
|
||||
|
||||
return "<a class='e-tip ".$class."' rel='external' href='".e_ADMIN_ABS."newspost.php?action=create&sub=edit&id=".$this->news_item['news_id']."' title=\"".LAN_NEWS_25."\">".$adop_icon."</a>\n";
|
||||
return "<a class='e-tip ".$class."' rel='external' href='".e_ADMIN_ABS."newspost.php?action=edit&id=".$this->news_item['news_id']."' title=\"".LAN_NEWS_25."\">".$adop_icon."</a>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -1522,6 +1522,7 @@ class e_parse extends e_parser
|
||||
$noBreak = TRUE;
|
||||
// $code_text = str_replace("\r\n", " ", $code_text);
|
||||
$code_text = html_entity_decode($code_text, ENT_QUOTES, CHARSET);
|
||||
$code_text = str_replace('&','&',$code_text); // validation safe.
|
||||
$html_start = "<!-- bbcode-html-start -->"; // markers for html-to-bbcode replacement.
|
||||
$html_end = "<!-- bbcode-html-end -->";
|
||||
$full_text = str_replace(array("[html]","[/html]"), "",$code_text); // quick fix.. security issue?
|
||||
|
@@ -33,8 +33,6 @@ if (!defined('e107_INIT')) { exit(); }
|
||||
global $tp;
|
||||
|
||||
|
||||
$login_menu_shortcodes = e107::getScBatch('login_menu',TRUE);
|
||||
|
||||
//$login_menu_shortcodes = $tp -> e_sc -> parse_scbatch(__FILE__);
|
||||
if(!class_exists('login_menu_shortcodes'))
|
||||
{
|
||||
@@ -267,7 +265,10 @@ $login_menu_shortcodes = e107::getScBatch('login_menu',TRUE);
|
||||
|
||||
function sc_lm_external_links($parm='')
|
||||
{
|
||||
global $tp, $menu_pref, $login_menu_shortcodes, $LOGIN_MENU_EXTERNAL_LINK;
|
||||
global $menu_pref, $login_menu_shortcodes, $LOGIN_MENU_EXTERNAL_LINK;
|
||||
|
||||
$tp = e107::getParser();
|
||||
|
||||
if(!vartrue($menu_pref['login_menu']['external_links'])) return '';
|
||||
$lbox_infos = login_menu_class::parse_external_list(true, false);
|
||||
$lbox_active = $menu_pref['login_menu']['external_links'] ? explode(',', $menu_pref['login_menu']['external_links']) : array();
|
||||
@@ -299,15 +300,17 @@ $login_menu_shortcodes = e107::getScBatch('login_menu',TRUE);
|
||||
|
||||
function sc_lm_stats($parm='')
|
||||
{
|
||||
global $LOGIN_MENU_STATS, $tp, $login_menu_shortcodes;
|
||||
$tp = e107::getParser();
|
||||
global $LOGIN_MENU_STATS;
|
||||
$data = getcachedvars('login_menu_data');
|
||||
if(!$data['enable_stats']) return '';
|
||||
return $tp -> parseTemplate($LOGIN_MENU_STATS, true, $login_menu_shortcodes);
|
||||
return $tp -> parseTemplate($LOGIN_MENU_STATS, true, $this);
|
||||
}
|
||||
|
||||
function sc_lm_new_news($parm='')
|
||||
{
|
||||
global $LOGIN_MENU_STATITEM, $tp;
|
||||
$tp = e107::getParser();
|
||||
global $LOGIN_MENU_STATITEM;
|
||||
$data = getcachedvars('login_menu_data');
|
||||
if(!isset($data['new_news'])) return '';
|
||||
$tmp = array();
|
||||
@@ -408,8 +411,10 @@ $login_menu_shortcodes = e107::getScBatch('login_menu',TRUE);
|
||||
return "<script type='text/javascript'>
|
||||
alert('".$tp->toJS(LOGINMESSAGE)."');
|
||||
</script>";
|
||||
}else{
|
||||
return $tp->parseTemplate($LOGIN_MENU_MESSAGE, true, $login_menu_shortcodes);
|
||||
}
|
||||
else
|
||||
{
|
||||
return e107::getParser()->parseTemplate($LOGIN_MENU_MESSAGE, true, $this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -424,4 +429,11 @@ $login_menu_shortcodes = e107::getScBatch('login_menu',TRUE);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$login_menu_shortcodes = e107::getScBatch('login_menu',TRUE);
|
||||
|
||||
|
||||
|
||||
?>
|
@@ -83,7 +83,7 @@ class social_ui extends e_admin_ui
|
||||
'twitter_menu_height' => array('title'=> 'Height', 'type'=>'number', 'tab'=>2, 'data' => 'int','help'=>'Height in px'),
|
||||
'twitter_menu_limit' => array('title'=> 'Limit', 'type'=>'number', 'tab'=>2, 'data' => 'int','help'=>'Number of tweets to display.'),
|
||||
|
||||
'sharing_mode' => array('title'=> 'Display Mode', 'type'=>'dropdown', 'tab'=>0, 'writeParms'=>array('optArray'=>array('off'=>'Disabled','normal'=>'Normal','dropdown'=>'Dropdown')), 'data' => 'str','help'=>''),
|
||||
'sharing_mode' => array('title'=> 'Display Mode', 'type'=>'dropdown', 'tab'=>0, 'writeParms'=>array('optArray'=>array('normal'=>'Normal','dropdown'=>'Dropdown','off'=>'Disabled')), 'data' => 'str','help'=>''),
|
||||
'sharing_providers' => array('title'=> 'Providers', 'type'=>'checkboxes', 'tab'=>0, 'writeParms'=>array(), 'data' => 'str','help'=>''),
|
||||
|
||||
);
|
||||
|
@@ -119,11 +119,18 @@ class theme_shortcodes extends e_shortcode
|
||||
|
||||
if(!empty($userReg)) // value of 1 or 2 = login okay.
|
||||
{
|
||||
|
||||
global $sc_style;
|
||||
$sc_style = array(); // remove an wrappers.
|
||||
|
||||
$text .='
|
||||
|
||||
<form method="post" onsubmit="hashLoginPassword(this);return true" action="'.e_REQUEST_HTTP.'" accept-charset="UTF-8">
|
||||
{LM_USERNAME_INPUT}
|
||||
{LM_PASSWORD_INPUT}
|
||||
<p>{LM_USERNAME_INPUT}</p>
|
||||
<p>{LM_PASSWORD_INPUT}</p>
|
||||
|
||||
|
||||
<div class="form-group"></div>
|
||||
{LM_IMAGECODE_NUMBER}
|
||||
{LM_IMAGECODE_BOX}
|
||||
|
||||
@@ -199,6 +206,7 @@ class theme_shortcodes extends e_shortcode
|
||||
|
||||
';
|
||||
|
||||
|
||||
return $tp->parseTemplate($text,true,$login_menu_shortcodes);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user