mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 14:17:49 +02:00
News List caption option added to v2 template (same as $NEWSLISTTITLE in v1.x)
This commit is contained in:
@@ -23,6 +23,7 @@ $NEWS_MENU_TEMPLATE['list']['end'] = '</div>';
|
|||||||
// {NEWSBODY} should not appear in the LISTSTYLE as it is NOT the same as what would appear on news.php (no query)
|
// {NEWSBODY} should not appear in the LISTSTYLE as it is NOT the same as what would appear on news.php (no query)
|
||||||
|
|
||||||
// Template/CSS to be reviewed for best bootstrap implementation
|
// Template/CSS to be reviewed for best bootstrap implementation
|
||||||
|
$NEWS_TEMPLATE['list']['caption'] = '{NEWSCATEGORY}';
|
||||||
$NEWS_TEMPLATE['list']['start'] = '{SETIMAGE: w=400&h=300&crop=1}';
|
$NEWS_TEMPLATE['list']['start'] = '{SETIMAGE: w=400&h=300&crop=1}';
|
||||||
$NEWS_TEMPLATE['list']['end'] = '';
|
$NEWS_TEMPLATE['list']['end'] = '';
|
||||||
$NEWS_TEMPLATE['list']['item'] = '
|
$NEWS_TEMPLATE['list']['item'] = '
|
||||||
|
8
news.php
8
news.php
@@ -275,11 +275,15 @@ if ($action == 'cat' || $action == 'all' || vartrue($_GET['tag']))
|
|||||||
|
|
||||||
$text .= $tp->parseTemplate("{NEXTPREV={$parms}}");
|
$text .= $tp->parseTemplate("{NEXTPREV={$parms}}");
|
||||||
|
|
||||||
if(!$NEWSLISTTITLE)
|
if(varset($template['caption'])) // v2.x
|
||||||
|
{
|
||||||
|
$NEWSLISTTITLE = str_replace("{NEWSCATEGORY}",$tp->toHTML($category_name,FALSE,'TITLE'), $template['caption']);
|
||||||
|
}
|
||||||
|
elseif(!$NEWSLISTTITLE) // default
|
||||||
{
|
{
|
||||||
$NEWSLISTTITLE = LAN_NEWS_82." '".$tp->toHTML($category_name,FALSE,'TITLE')."'";
|
$NEWSLISTTITLE = LAN_NEWS_82." '".$tp->toHTML($category_name,FALSE,'TITLE')."'";
|
||||||
}
|
}
|
||||||
else
|
else // v1.x
|
||||||
{
|
{
|
||||||
$NEWSLISTTITLE = str_replace("{NEWSCATEGORY}",$tp->toHTML($category_name,FALSE,'TITLE'),$NEWSLISTTITLE);
|
$NEWSLISTTITLE = str_replace("{NEWSCATEGORY}",$tp->toHTML($category_name,FALSE,'TITLE'),$NEWSLISTTITLE);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user