diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index 30f0e8ee9..6d1519e07 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -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'] = "".LAN_CONFIGURE.""; diff --git a/e107_core/shortcodes/batch/news_shortcodes.php b/e107_core/shortcodes/batch/news_shortcodes.php index 7c90929e2..49bfb5c37 100644 --- a/e107_core/shortcodes/batch/news_shortcodes.php +++ b/e107_core/shortcodes/batch/news_shortcodes.php @@ -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 "
".$news_body.'
'; } - 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); } diff --git a/e107_core/templates/comment_template.php b/e107_core/templates/comment_template.php index 16a79bbd7..f3b6ae551 100644 --- a/e107_core/templates/comment_template.php +++ b/e107_core/templates/comment_template.php @@ -97,7 +97,7 @@ $sc_style['MODERATE']['post'] = ''; $COMMENT_TEMPLATE['form'] = " - {SETIMAGE: w=100&h=100} + {SETIMAGE: w=90&h=90&crop=1}
{COMMENT_AVATAR} @@ -119,7 +119,7 @@ $COMMENT_TEMPLATE['form'] = " $COMMENT_TEMPLATE['item'] = ' - {SETIMAGE: w=80&h=80} + {SETIMAGE: w=90&h=90&crop=1}
{COMMENT_AVATAR}
diff --git a/e107_handlers/comment_class.php b/e107_handlers/comment_class.php index 2c47faa5b..ec5287690 100644 --- a/e107_handlers/comment_class.php +++ b/e107_handlers/comment_class.php @@ -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)); } diff --git a/e107_plugins/banner/banner_menu.php b/e107_plugins/banner/banner_menu.php index 6a1fde378..eadde56c4 100644 --- a/e107_plugins/banner/banner_menu.php +++ b/e107_plugins/banner/banner_menu.php @@ -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);