mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Fixes #873 - Latest news Menu - hide brackets around comment count when comments are off.
This commit is contained in:
@@ -721,8 +721,11 @@ class e_news_tree extends e_front_tree_model
|
|||||||
$parser = e107::getParser();
|
$parser = e107::getParser();
|
||||||
$batch = e107::getScBatch('news')
|
$batch = e107::getScBatch('news')
|
||||||
->setScVar('param', $param);
|
->setScVar('param', $param);
|
||||||
|
|
||||||
|
$batch->wrapper('news_menu/latest'); //@SecretR - Please FIXME, I'm lost in here. (Cam)
|
||||||
$i = 1;
|
$i = 1;
|
||||||
|
|
||||||
|
|
||||||
foreach ($this->getTree() as $news)
|
foreach ($this->getTree() as $news)
|
||||||
{
|
{
|
||||||
$vars->counter = $i;
|
$vars->counter = $i;
|
||||||
|
@@ -10,11 +10,8 @@ if (!defined('e107_INIT')) exit;
|
|||||||
|
|
||||||
global $sc_style;
|
global $sc_style;
|
||||||
|
|
||||||
$sc_style['NEWS_CATEGORY_NEWS_COUNT']['pre'] = '(';
|
// $sc_style['NEWS_CATEGORY_NEWS_COUNT']['pre'] = '(';
|
||||||
$sc_style['NEWS_CATEGORY_NEWS_COUNT']['post'] = ')';
|
// $sc_style['NEWS_CATEGORY_NEWS_COUNT']['post'] = ')';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -24,6 +21,8 @@ $NEWS_MENU_TEMPLATE['category']['end'] = '</ul>';
|
|||||||
$NEWS_MENU_TEMPLATE['category']['item'] = '
|
$NEWS_MENU_TEMPLATE['category']['item'] = '
|
||||||
<li><a class="e-menu-link newscats{active}" href="{NEWS_CATEGORY_URL}">{NEWS_CATEGORY_TITLE} {NEWS_CATEGORY_NEWS_COUNT}</a></li>
|
<li><a class="e-menu-link newscats{active}" href="{NEWS_CATEGORY_URL}">{NEWS_CATEGORY_TITLE} {NEWS_CATEGORY_NEWS_COUNT}</a></li>
|
||||||
';
|
';
|
||||||
|
|
||||||
|
$NEWS_MENU_WRAPPER['category']['NEWS_CATEGORY_NEWS_COUNT'] = "({---})"; // Wrap brackets around the news count when value is returned.
|
||||||
//$NEWS_MENU_TEMPLATE['category']['separator'] = '<br />';
|
//$NEWS_MENU_TEMPLATE['category']['separator'] = '<br />';
|
||||||
|
|
||||||
|
|
||||||
@@ -47,9 +46,9 @@ $NEWS_MENU_TEMPLATE['months']['item'] = '
|
|||||||
// latest menu
|
// latest menu
|
||||||
$NEWS_MENU_TEMPLATE['latest']['start'] = '<ul class="nav nav-list news-menu-latest">';
|
$NEWS_MENU_TEMPLATE['latest']['start'] = '<ul class="nav nav-list news-menu-latest">';
|
||||||
$NEWS_MENU_TEMPLATE['latest']['end'] = '</ul>'; // Example: $NEWS_MENU_TEMPLATE['latest']['end'] '<br />{currentTotal} from {total}';
|
$NEWS_MENU_TEMPLATE['latest']['end'] = '</ul>'; // Example: $NEWS_MENU_TEMPLATE['latest']['end'] '<br />{currentTotal} from {total}';
|
||||||
$NEWS_MENU_TEMPLATE['latest']['item'] = '<li><a class="e-menu-link newsmonths" href="{NEWSURL}">{NEWSTITLE} ({NEWSCOMMENTCOUNT})</a></li>';
|
$NEWS_MENU_TEMPLATE['latest']['item'] = '<li><a class="e-menu-link newsmonths" href="{NEWSURL}">{NEWSTITLE} {NEWSCOMMENTCOUNT}</a></li>';
|
||||||
|
|
||||||
|
|
||||||
|
$NEWS_MENU_WRAPPER['latest']['NEWSCOMMENTCOUNT'] = "({---})";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user