mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
Comment fixes. News table comment count was not incrementing. (may be manually corrected in debug mode)
This commit is contained in:
parent
f5e9a1345b
commit
fa8f25dfc5
@ -762,6 +762,12 @@ class news_admin_ui extends e_admin_ui
|
||||
$this->saveSettings();
|
||||
}
|
||||
|
||||
if(e_DEBUG == true) // allowing manual fixing of comment total in DEBUG mode.
|
||||
{
|
||||
$this->fields['news_comment_total']['noedit'] = false;
|
||||
$this->fields['news_comment_total']['inline'] = true;
|
||||
}
|
||||
|
||||
|
||||
$this->fields['news_email_notify']['writeParms']['post'] = "<span class='radio-inline radio inline'><a class='e-modal btn btn-xs btn-mini btn-primary' data-modal-caption='".ADLAN_149."' href='notify.php?iframe=1&type=admin_news_notify#/tab-news-events'>".LAN_CONFIGURE."</a></span>";
|
||||
|
||||
|
@ -251,6 +251,59 @@ class news_shortcodes extends e_shortcode
|
||||
}
|
||||
|
||||
|
||||
//New v2.x Aliases
|
||||
|
||||
public function sc_news_id($parm=null)
|
||||
{
|
||||
return $this->sc_newsid();
|
||||
}
|
||||
|
||||
public function sc_news_title($parm=null)
|
||||
{
|
||||
return (!empty($parm['link'])) ? $this->sc_newstitlelink($parm) : $this->sc_newstitle($parm);
|
||||
}
|
||||
|
||||
public function sc_news_body($parm=null)
|
||||
{
|
||||
return $this->sc_newsbody($parm);
|
||||
}
|
||||
|
||||
public function sc_news_author($parm=null)
|
||||
{
|
||||
return $this->sc_newsauthor($parm);
|
||||
}
|
||||
|
||||
public function sc_news_summary($parm=null)
|
||||
{
|
||||
return $this->sc_newssummary($parm);
|
||||
}
|
||||
|
||||
public function sc_news_description($parm=null)
|
||||
{
|
||||
return $this->sc_newsmetadiz($parm);
|
||||
}
|
||||
|
||||
public function sc_news_tags($parm=null)
|
||||
{
|
||||
return $this->sc_newstags($parm);
|
||||
}
|
||||
|
||||
public function sc_news_comment_count($parm=null)
|
||||
{
|
||||
return $this->sc_newscommentcount($parm);
|
||||
}
|
||||
|
||||
public function sc_news_date($parm=null)
|
||||
{
|
||||
return $this->sc_newsdate($parm);
|
||||
}
|
||||
|
||||
public function sc_news_user_avatar($parm=null)
|
||||
{
|
||||
return $this->sc_newsavatar($parm);
|
||||
}
|
||||
|
||||
// ----------------------------------- BC compatible Shortcodes ------------------------------------------- //
|
||||
|
||||
function sc_newscategory($parm=null)
|
||||
{
|
||||
@ -286,7 +339,7 @@ class news_shortcodes extends e_shortcode
|
||||
}
|
||||
|
||||
|
||||
function sc_newsavatar()
|
||||
function sc_newsavatar($parm=null)
|
||||
{
|
||||
return vartrue($this->news_item['user_id']) ? e107::getParser()->parseTemplate("{USER_AVATAR=".$this->news_item['user_id']."}",true) : '';
|
||||
}
|
||||
@ -425,7 +478,7 @@ class news_shortcodes extends e_shortcode
|
||||
return "<div class='".(defined('ADMINNAME') ? ADMINNAME : 'null')."'>".$news_body.'</div>';
|
||||
}
|
||||
|
||||
function sc_newssummary()
|
||||
function sc_newssummary($parm=null)
|
||||
{
|
||||
if($this->news_item['news_summary'])
|
||||
{
|
||||
@ -887,7 +940,7 @@ class news_shortcodes extends e_shortcode
|
||||
}
|
||||
|
||||
|
||||
function sc_newsmetadiz()
|
||||
function sc_newsmetadiz($parm=null)
|
||||
{
|
||||
return e107::getParser()->toHtml($this->news_item['news_meta_description'],true);
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ $sc_style['MODERATE']['post'] = '</div>';
|
||||
|
||||
|
||||
$COMMENT_TEMPLATE['form'] = "
|
||||
{SETIMAGE: w=100&h=100}
|
||||
{SETIMAGE: w=90&h=90&crop=1}
|
||||
<div class='media comment-box comment-box-form clearfix'>
|
||||
<div class='comment-box-left media-object pull-left' >
|
||||
{COMMENT_AVATAR}
|
||||
@ -119,7 +119,7 @@ $COMMENT_TEMPLATE['form'] = "
|
||||
|
||||
|
||||
$COMMENT_TEMPLATE['item'] = '
|
||||
{SETIMAGE: w=80&h=80}
|
||||
{SETIMAGE: w=90&h=90&crop=1}
|
||||
<div class="media-object comment-box-left pull-left span1">
|
||||
{COMMENT_AVATAR}
|
||||
</div>
|
||||
|
@ -754,7 +754,7 @@ class comment
|
||||
{
|
||||
if ($sql2->select("user", "*", "user_name='".$tp->toDB($_POST['author_name'])."' "))
|
||||
{
|
||||
if ($sql2->select("user", "*", "user_name='".$tp->toDB($_POST['author_name'])."' AND user_ip='".$tp->toDB($ip, true)."' "))
|
||||
if ($sql2->select("user", "*", "user_name='".$tp->toDB($_POST['author_name'])."' AND user_ip='".USERIP."' "))
|
||||
{
|
||||
//list($cuser_id, $cuser_name) = $sql2->db_Fetch();
|
||||
$tmp = $sql2->fetch();
|
||||
@ -859,7 +859,7 @@ class comment
|
||||
e107::getCache()->clear("comment");
|
||||
|
||||
|
||||
if ((empty($type) || $type == "news") && !$this->moderateComment($pref['comments_moderate']))
|
||||
if ((empty($table) || $table == "news") && !$this->moderateComment($pref['comments_moderate']))
|
||||
{
|
||||
$sql->update("news", "news_comment_total=news_comment_total+1 WHERE news_id=".intval($id));
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ if(!empty($menu_pref['banner_campaign']) && !empty($menu_pref['banner_amount']))
|
||||
$ret[$cat][] = $tp->simpleParse($BANNER_MENU_ITEM, $var);
|
||||
}
|
||||
}
|
||||
elseif(e_DEBUG == true)
|
||||
elseif(e_DEBUG == true && getperms('0'))
|
||||
{
|
||||
echo "no banner data";
|
||||
print_a($menu_pref);
|
||||
|
Loading…
x
Reference in New Issue
Block a user