1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-19 04:02:28 +02:00

Fixed {NEWSTHUMBNAIL} to work with images and video.

This commit is contained in:
Cameron 2014-02-04 06:50:01 -08:00
parent 8c49efe1b1
commit bb34f0f425
2 changed files with 6 additions and 4 deletions

View File

@ -414,7 +414,7 @@ class news_shortcodes extends e_shortcode
*/
function sc_newsthumbnail($parm = '') //TODO Add support {NEWSTHUMBNAIL: x=y} format
{
$tmp = $this->handleMultiple($parm);
$tmp = $this->handleMultiple($parm,'all');
$newsThumb = $tmp['file'];
$class = 'news-thumbnail-'.$tmp['count'];
@ -557,12 +557,14 @@ class news_shortcodes extends e_shortcode
$list['image'][] = $file;
}
$list['all'][] = $file;
}
if(is_string($parm) || !vartrue($parm['item']))
{
$item = 0;
$parm = array('item' => 1);
}
else
{
@ -571,9 +573,9 @@ class news_shortcodes extends e_shortcode
$file = varset($list[$type][$item]);
$count = $item;
$count = varset($parm['item'],1);
return array('file'=>$file, 'count'=>varset($parm['item'],1));
return array('file'=>$file, 'count'=> $count);
}

View File

@ -135,7 +135,7 @@ $NEWS_TEMPLATE['view']['item'] = '
{NEWSBODY=body}
<br />
{SETIMAGE: w=600&h=600}
{SETIMAGE: w=400&h=400}
<div class="row news-images-1">
<div class="col-md-6">{NEWSIMAGE: item=2}</div>