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}
diff --git a/e107_themes/bootstrap/style.css b/e107_themes/bootstrap/style.css index a8ed4ef9c..bb0aef0d3 100644 --- a/e107_themes/bootstrap/style.css +++ b/e107_themes/bootstrap/style.css @@ -71,12 +71,14 @@ legend { font-size: 14px; font-weight: bold; padding: 5px; } /******** News item styling */ + .post-meta { margin: -7px 0 10px; } .post-meta span { margin-right: 7px; margin-bottom: 0; padding-right: 10px; white-space: nowrap; border-right: 1px solid #dddddd; font-size: 12px; } -.post-meta span:last-child { margin: 0; padding: 0; border: none; } +.post-meta span:last-child { border: none; } .post-meta span i[class^="icon-"] { margin-right: 7px; } .news_image { margin-bottom: 10px; } +div.view-item { margin-bottom:50px } /******** FEATUREBOX PLUGIN */ #featurebox-ajax-container { display: block }