diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index 4e62941f6..259804a38 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -686,7 +686,7 @@ class news_admin_ui extends e_admin_ui { if(is_array($postedImage)) { - return implode(",",array_filter($postedImage)); + return implode(",", $postedImage); } else { diff --git a/e107_core/shortcodes/batch/news_shortcodes.php b/e107_core/shortcodes/batch/news_shortcodes.php index bf2ff3cc0..63f7d2e28 100644 --- a/e107_core/shortcodes/batch/news_shortcodes.php +++ b/e107_core/shortcodes/batch/news_shortcodes.php @@ -705,14 +705,24 @@ class news_shortcodes extends e_shortcode } $this->imageItem = varset($media[$parm['item']]); // Set the current Image for other image shortcodes. - + + if(vartrue($parm['placeholder'])) { return $this->sc_newsimage('placeholder'); } + elseif($video = e107::getParser()->toVideo($this->imageItem, array('class'=> 'news-media news-media-'.$parm['item']))) + { + return $video; + } else { - return $this->sc_newsimage(); + $parm['item'] = ($parm['item'] +1); + if(empty($parm['class'])) + { + $parm['class'] = 'img-responsive news-media news-media-'.$parm['item']; + } + return $this->sc_newsimage($parm); } @@ -797,7 +807,8 @@ class news_shortcodes extends e_shortcode { $parm = array('type'=> $parm); } - + + $tmp = $this->handleMultiple($parm); $srcPath = $tmp['file'];