diff --git a/e107_core/shortcodes/batch/news_shortcodes.php b/e107_core/shortcodes/batch/news_shortcodes.php
index 6f25de93e..900c5b272 100644
--- a/e107_core/shortcodes/batch/news_shortcodes.php
+++ b/e107_core/shortcodes/batch/news_shortcodes.php
@@ -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}");
}
diff --git a/e107_plugins/news/templates/news_template.php b/e107_plugins/news/templates/news_template.php
index 110d033e7..65f39b1dd 100644
--- a/e107_plugins/news/templates/news_template.php
+++ b/e107_plugins/news/templates/news_template.php
@@ -13,13 +13,51 @@ global $sc_style;
###### Default list item (temporary) - TODO rewrite news, template standards ######
//$NEWS_MENU_TEMPLATE['list']['start'] = '
';
+
+$NEWS_MENU_TEMPLATE['list']['start'] = '
-
{NEWSURLTITLE}
+ {SETIMAGE: w=400&h=300&crop=1}
+
+
+
+
+
{NEWSTITLELINK}
+
+ {NEWSSUMMARY}
+
+
+ Read More
+
+
+
+
+';
+
+//$NEWS_MENU_TEMPLATE['list']['separator'] = '
';
+
+
+
+// XXX As displayed by news.php (no query) or news.php?list.1.1 (ie. regular view of a particular category)
+$NEWS_TEMPLATE['default']['item'] = '
+ {SETIMAGE: w=400}
+
+
{NEWSTITLE}
in {NEWSCATEGORY}
{NEWSDATE=short}
{NEWSAUTHOR}
-
+
{NEWSIMAGE}
{NEWSBODY}
@@ -30,12 +68,18 @@ $NEWS_TEMPLATE['list']['item'] = '
';
-//$NEWS_MENU_TEMPLATE['list']['separator'] = '
';
+
+
+
+
###### Default view item (temporary) - TODO rewrite news, template standards ######
//$NEWS_MENU_TEMPLATE['view']['start'] = '';
+
+// As displayed by news.php?extend.1
$NEWS_TEMPLATE['view']['item'] = '
+{SETIMAGE: w=800}
{NEWSTITLE}
in {NEWSCATEGORY}
diff --git a/news.php b/news.php
index f12c5f588..cdf950819 100644
--- a/news.php
+++ b/news.php
@@ -241,7 +241,7 @@ if ($action == 'cat' || $action == 'all' || vartrue($_GET['tag']))
\n";
}*/
-
+
if(vartrue($NEWSLISTSTYLE))
{
$template = $NEWSLISTSTYLE;
@@ -730,14 +730,15 @@ else
$thispostday = 0;
$pref['newsHeaderDate'] = 1;
$gen = new convert();
- if(vartrue($NEWSLISTSTYLE)) $template = $NEWSLISTSTYLE;
+ /*
+ if(vartrue($NEWSLISTSTYLE)) $template = $NEWSLISTSTYLE; v1.x doesn't do this.. so no point doing it here.
else
{
$tmp = e107::getTemplate('news', 'news', 'list');
$template = $tmp['item'];
unset($tmp);
}
-
+ */
if (!defined("DATEHEADERCLASS")) {
define("DATEHEADERCLASS", "nextprev");
// if not defined in the theme, default class nextprev will be used for new date header
@@ -748,7 +749,7 @@ else
$param['current_action'] = $action;
// Get Correct Template
- // XXX we use $NEWSLISTSTYLE above - correct as we are currently in list mode
+ // XXX we use $NEWSLISTSTYLE above - correct as we are currently in list mode - XXX No this is not NEWSLISTSTYLE - which provides only summaries.
// TODO requires BC testing if we comment this one
if(vartrue($NEWSSTYLE))
{
@@ -756,7 +757,7 @@ else
}
else
{
- $tmp = e107::getTemplate('news', 'news', 'list');
+ $tmp = e107::getTemplate('news', 'news', 'default'); // default - we show the full items, except for the 'extended' part..
$template = $tmp['item'];
unset($tmp);
}