1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-16 03:24:20 +02:00

tp->toImage() now accepts 'placeholder' parm. NewsGrid template now uses placeholder by default.

This commit is contained in:
Cameron
2017-03-04 10:06:53 -08:00
parent 0f42d516e7
commit aaa5db36ab
3 changed files with 34 additions and 25 deletions

View File

@@ -733,7 +733,7 @@ class news_shortcodes extends e_shortcode
$this->imageItem = varset($media[$parm['item']]); // Set the current Image for other image shortcodes.
if(vartrue($parm['placeholder']))
if(!empty($parm['placeholder']))
{
return $this->sc_newsimage('placeholder');
}
@@ -853,10 +853,10 @@ class news_shortcodes extends e_shortcode
}
else
{
if(empty($srcPath))
{
if(varset($parm['type']) == 'placeholder' || vartrue($parm['placeholder']))
if(varset($parm['type']) == 'placeholder' || !empty($parm['placeholder']))
{
$src = $tp->thumbUrl(); // placeholder;
$dimensions = $tp->thumbDimensions();
@@ -899,8 +899,9 @@ class news_shortcodes extends e_shortcode
$imgParms = array(
'class'=>$class,
'alt'=>basename($src),
'style'=>$style
'alt'=>basename($srcPath),
'style'=>$style,
'placeholder'=>varset($parm['placeholder'])
);