diff --git a/e107_core/shortcodes/batch/news_shortcodes.php b/e107_core/shortcodes/batch/news_shortcodes.php index 16d8e6c5a..bac868fec 100644 --- a/e107_core/shortcodes/batch/news_shortcodes.php +++ b/e107_core/shortcodes/batch/news_shortcodes.php @@ -84,13 +84,15 @@ class news_shortcodes extends e_shortcode function sc_newscomments($parm) { + $pref = e107::getPref(); $sql = e107::getDb(); if($pref['comments_disabled'] == 1) { - return; + return "Disabled"; } + $news_item = $this->news_item; $param = $this->param; @@ -123,7 +125,7 @@ class news_shortcodes extends e_shortcode { $NEWIMAGE = $param['image_nonew_small']; } - return (!$news_item['news_allow_comments'] ? ''.($pref['comments_icon'] ? $NEWIMAGE : '')." ".$param['commentlink'].$news_item['news_comment_total'].'' : $param['commentoffstring']); + return (!$news_item['news_allow_comments'] ? ''.($pref['comments_icon'] ? $NEWIMAGE : '')." ".$param['commentlink'].intval($news_item['news_comment_total']).'' : vartrue($param['commentoffstring'],'Disabled') ); } function sc_trackback($parm) @@ -452,15 +454,26 @@ class news_shortcodes extends e_shortcode return $info; } - function sc_newstags($parm=5) + function sc_newstags($parm='') { $tmp = explode(",",$this->news_item['news_meta_keywords']); $words = array(); foreach($tmp as $val) { - $words[] = "".$val.""; + if(trim($val)) + { + $words[] = "".$val.""; + } } - return implode(", ",$words); + + if(count($words)) + { + return implode("",$words); + } + else + { + return "None"; + } } } diff --git a/e107_plugins/news/templates/news_template.php b/e107_plugins/news/templates/news_template.php index cd79797cf..29d1968c0 100644 --- a/e107_plugins/news/templates/news_template.php +++ b/e107_plugins/news/templates/news_template.php @@ -71,6 +71,7 @@ $NEWS_TEMPLATE['list']['item'] = ' '; */ // Attempt at bootstrap style +// XXX As displayed by news.php (no query) or news.php?list.1.1 (ie. regular view of a particular category) $NEWS_TEMPLATE['default']['item'] = ' {SETIMAGE: w=600}