1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

Check the featurebox {SETIMAGE} value before using resize method.

This commit is contained in:
Cameron
2013-11-12 14:37:43 -08:00
parent aaf193375a
commit 287260ee03

View File

@@ -126,10 +126,15 @@ class plugin_featurebox_item extends e_model
}
parse_str($parm, $parm);
$tp = e107::getParser();
// $src = $tp->replaceConstants($this->get('fb_image'), 'full');
// Use {SETIMAGE} inside theme.php to configure.
$src = $tp->thumbUrl($this->get('fb_image')); //XXX TODO TBD Add a pref to use without resizing? Or, detect {SETIMAGE} in template to enable?
if($tp->thumbWidth > 600 && $tp->thumbHeight > 300) //Guessing it's a featurebox image. Use {SETIMAGE} inside theme.php to configure.
{
$src = $tp->thumbUrl($this->get('fb_image')); //XXX TODO TBD Add a pref to use without resizing? Or, detect {SETIMAGE} in template to enable?
}
else
{
$src = $tp->replaceConstants($this->get('fb_image'), 'full');
}
if(isset($parm['src']))
{