mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 06:38:00 +02:00
Admin News: respect positions of news-media - allowing admin to choose placement.
This commit is contained in:
@@ -686,7 +686,7 @@ class news_admin_ui extends e_admin_ui
|
|||||||
{
|
{
|
||||||
if(is_array($postedImage))
|
if(is_array($postedImage))
|
||||||
{
|
{
|
||||||
return implode(",",array_filter($postedImage));
|
return implode(",", $postedImage);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -705,14 +705,24 @@ class news_shortcodes extends e_shortcode
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->imageItem = varset($media[$parm['item']]); // Set the current Image for other image shortcodes.
|
$this->imageItem = varset($media[$parm['item']]); // Set the current Image for other image shortcodes.
|
||||||
|
|
||||||
|
|
||||||
if(vartrue($parm['placeholder']))
|
if(vartrue($parm['placeholder']))
|
||||||
{
|
{
|
||||||
return $this->sc_newsimage('placeholder');
|
return $this->sc_newsimage('placeholder');
|
||||||
}
|
}
|
||||||
|
elseif($video = e107::getParser()->toVideo($this->imageItem, array('class'=> 'news-media news-media-'.$parm['item'])))
|
||||||
|
{
|
||||||
|
return $video;
|
||||||
|
}
|
||||||
else
|
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);
|
$parm = array('type'=> $parm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$tmp = $this->handleMultiple($parm);
|
$tmp = $this->handleMultiple($parm);
|
||||||
$srcPath = $tmp['file'];
|
$srcPath = $tmp['file'];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user