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

News template BC problem corrected. May require renaming some templates in your theme.php

This commit is contained in:
Cameron
2013-03-24 03:04:33 -07:00
parent e2dffbe0f7
commit fd4fff52d4
3 changed files with 57 additions and 14 deletions

View File

@@ -320,15 +320,13 @@ class news_shortcodes extends e_shortcode
function sc_newsimage($parm = '')
{
$tp = e107::getParser();
if(!$this->news_item['news_thumbnail'])
{
return '';
}
$w = vartrue($pref['resize_dimensions']['news-image']['w']);
$h = vartrue($pref['resize_dimensions']['news-image']['h']);
if($this->news_item['news_thumbnail'][0] == '{' && ($w || $h))
if($this->news_item['news_thumbnail'][0] == '{' ) // Always resize. Use {SETIMAGE: w=x&y=x&crop=0} PRIOR to calling shortcode to change.
{
$src = $tp->thumbUrl($this->news_item['news_thumbnail'],"w={$w}&h={$h}");
}