1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 14:46:56 +02:00

Admin News: respect positions of news-media - allowing admin to choose placement.

This commit is contained in:
Cameron
2016-07-29 13:36:42 -07:00
parent 70b2e96f6e
commit 1a07500b4f
2 changed files with 15 additions and 4 deletions

View File

@@ -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
{

View File

@@ -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'];