mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 06:38:00 +02:00
Fixes #2475 - Default news template fix.
This commit is contained in:
@@ -851,7 +851,7 @@ class news_front
|
|||||||
|
|
||||||
$text = '';
|
$text = '';
|
||||||
|
|
||||||
if(vartrue($template['start']))
|
if(!empty($template['start']))
|
||||||
{
|
{
|
||||||
$text .= $tp->parseTemplate($template['start'], true);
|
$text .= $tp->parseTemplate($template['start'], true);
|
||||||
}
|
}
|
||||||
@@ -868,7 +868,7 @@ class news_front
|
|||||||
$text .= "<div class='news-empty'><div class='alert alert-info'>".(strstr(e_QUERY, "month") ? LAN_NEWS_462 : LAN_NEWS_83)."</div></div>";
|
$text .= "<div class='news-empty'><div class='alert alert-info'>".(strstr(e_QUERY, "month") ? LAN_NEWS_462 : LAN_NEWS_83)."</div></div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(vartrue($template['end']))
|
if(!empty($template['end']))
|
||||||
{
|
{
|
||||||
$text .= $tp->parseTemplate($template['end'], true);
|
$text .= $tp->parseTemplate($template['end'], true);
|
||||||
}
|
}
|
||||||
@@ -891,7 +891,7 @@ class news_front
|
|||||||
|
|
||||||
$text .= $tp->parseTemplate("{NEXTPREV={$parms}}");
|
$text .= $tp->parseTemplate("{NEXTPREV={$parms}}");
|
||||||
|
|
||||||
if(varset($template['caption'])) // v2.x
|
if(isset($template['caption'])) // v2.x
|
||||||
{
|
{
|
||||||
$NEWSLISTTITLE = str_replace("{NEWSCATEGORY}",$tp->toHTML($category_name,FALSE,'TITLE'), $template['caption']);
|
$NEWSLISTTITLE = str_replace("{NEWSCATEGORY}",$tp->toHTML($category_name,FALSE,'TITLE'), $template['caption']);
|
||||||
}
|
}
|
||||||
@@ -1460,6 +1460,7 @@ class news_front
|
|||||||
unset($tmp);
|
unset($tmp);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
//@todo remove
|
||||||
if (!defined("DATEHEADERCLASS")) {
|
if (!defined("DATEHEADERCLASS")) {
|
||||||
define("DATEHEADERCLASS", "nextprev");
|
define("DATEHEADERCLASS", "nextprev");
|
||||||
// if not defined in the theme, default class nextprev will be used for new date header
|
// if not defined in the theme, default class nextprev will be used for new date header
|
||||||
@@ -1479,15 +1480,20 @@ class news_front
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$tmp = e107::getTemplate('news', 'news', 'default'); // default - we show the full items, except for the 'extended' part..
|
$tmpl = e107::getTemplate('news', 'news', 'default'); // default - we show the full items, except for the 'extended' part..
|
||||||
$template = $tmp['item'];
|
$template = $tmpl['item'];
|
||||||
unset($tmp);
|
// unset($tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// NEW - news category title when in list
|
if(!empty($tmpl['start'])) //v2.1.5
|
||||||
if($sub_action && 'list' == $action && vartrue($newsAr[1]['category_name']))
|
{
|
||||||
|
$nsc = e107::getScBatch('news')->setScVar('news_item', $newsAr[1])->setScVar('param', $param);
|
||||||
|
echo $tp->parseTemplate($tmpl['start'],true,$nsc);
|
||||||
|
|
||||||
|
}
|
||||||
|
elseif($sub_action && 'list' == $action && vartrue($newsAr[1]['category_name'])) //old
|
||||||
{
|
{
|
||||||
// we know category name - pass it to the nexprev url
|
// we know category name - pass it to the nexprev url
|
||||||
$category_name = $newsAr[1]['category_name'];
|
$category_name = $newsAr[1]['category_name'];
|
||||||
@@ -1503,6 +1509,7 @@ class news_front
|
|||||||
echo $NEWSLISTCATTITLE;
|
echo $NEWSLISTCATTITLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$i= 1;
|
$i= 1;
|
||||||
|
|
||||||
$socialInstalled = e107::isInstalled('social');
|
$socialInstalled = e107::isInstalled('social');
|
||||||
@@ -1550,6 +1557,15 @@ class news_front
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!empty($tmpl['end']))
|
||||||
|
{
|
||||||
|
$nsc = e107::getScBatch('news')->setScVar('news_item', $newsAr[1])->setScVar('param', $param);
|
||||||
|
echo $tp->parseTemplate($tmpl['end'], true, $nsc);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$amount = ITEMVIEW;
|
$amount = ITEMVIEW;
|
||||||
$nitems = defined('NEWS_NEXTPREV_NAVCOUNT') ? '&navcount='.NEWS_NEXTPREV_NAVCOUNT : '' ;
|
$nitems = defined('NEWS_NEXTPREV_NAVCOUNT') ? '&navcount='.NEWS_NEXTPREV_NAVCOUNT : '' ;
|
||||||
$url = rawurlencode(e107::getUrl()->create($this->route, $this->newsUrlparms));
|
$url = rawurlencode(e107::getUrl()->create($this->route, $this->newsUrlparms));
|
||||||
|
@@ -80,8 +80,14 @@ $NEWS_TEMPLATE['default']['item'] = '
|
|||||||
';
|
';
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$NEWS_WRAPPER['default']['item']['NEWSIMAGE: item=1'] = '<span class="news-images-main pull-left col-xs-12 col-sm-6 col-md-6">{---}</span>';
|
$NEWS_WRAPPER['default']['item']['NEWSIMAGE: item=1'] = '<span class="news-images-main pull-left col-xs-12 col-sm-6 col-md-6">{---}</span>';
|
||||||
|
|
||||||
|
|
||||||
|
$NEWS_TEMPLATE['default']['start'] = '';
|
||||||
$NEWS_TEMPLATE['default']['item'] = '
|
$NEWS_TEMPLATE['default']['item'] = '
|
||||||
{SETIMAGE: w=400&h=400}
|
{SETIMAGE: w=400&h=400}
|
||||||
<div class="default-item">
|
<div class="default-item">
|
||||||
@@ -110,7 +116,7 @@ $NEWS_TEMPLATE['default']['item'] = '
|
|||||||
</div>
|
</div>
|
||||||
';
|
';
|
||||||
|
|
||||||
|
$NEWS_TEMPLATE['default']['end'] = '';
|
||||||
|
|
||||||
###### Default view item (temporary) ######
|
###### Default view item (temporary) ######
|
||||||
//$NEWS_MENU_TEMPLATE['view']['start'] = '<ul class="nav nav-list news-menu-months">';
|
//$NEWS_MENU_TEMPLATE['view']['start'] = '<ul class="nav nav-list news-menu-months">';
|
||||||
|
Reference in New Issue
Block a user