1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +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

@@ -127,9 +127,14 @@ class plugin_featurebox_item extends e_model
parse_str($parm, $parm); parse_str($parm, $parm);
$tp = e107::getParser(); $tp = e107::getParser();
// $src = $tp->replaceConstants($this->get('fb_image'), 'full'); if($tp->thumbWidth > 600 && $tp->thumbHeight > 300) //Guessing it's a featurebox image. Use {SETIMAGE} inside theme.php to configure.
// 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? $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'])) if(isset($parm['src']))
{ {