1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

Fixes #3862 - news archive button template added.

This commit is contained in:
Cameron
2019-06-19 13:38:08 -07:00
parent 4c2762d7b9
commit 5a1a1def12
2 changed files with 23 additions and 12 deletions

View File

@@ -129,13 +129,22 @@ if(false === $cached)
{ {
if(!$parms['showarchive']) if(!$parms['showarchive'])
{ {
$footer = '<div class="e-menu-link news-menu-archive"><a class="btn btn-default btn-secondary btn-sm" href="'.e_PLUGIN_ABS.'blogcalendar_menu/archive.php">'.BLOGCAL_L2.'</a></div>'; if(isset($template['footer']))
$ns->setContent('footer', $footer); {
$cached .= $footer; $footer = $tp->replaceConstants($template['footer'],'abs');
$footer = $tp->parseTemplate($footer,true);
$ns->setUniqueId('news-months-menu')->setContent('footer', $footer);
}
else
{
$footer = '<div class="e-menu-link news-menu-archive"><a class="btn btn-default btn-secondary btn-sm" href="'.e_PLUGIN_ABS.'blogcalendar_menu/archive.php">'.BLOGCAL_L2.'</a></div>';
$cached .= $footer;
}
} }
$cached = $ns->tablerender(BLOGCAL_L1." ".$req_year, $cached, 'news_months_menu', true); $cached = $ns->tablerender(BLOGCAL_L1." ".$req_year, $cached, 'news_months_menu', true);
$ns->setUniqueId(null);
} }

View File

@@ -32,6 +32,10 @@ $NEWS_MENU_TEMPLATE['months']['end'] = '</ul>';
$NEWS_MENU_TEMPLATE['months']['item'] = ' $NEWS_MENU_TEMPLATE['months']['item'] = '
<li><a class="e-menu-link newsmonths{active}" href="{url}">{month} <span class="badge">{count}</span></a></li> <li><a class="e-menu-link newsmonths{active}" href="{url}">{month} <span class="badge">{count}</span></a></li>
'; ';
// sends value to tablestyle / $options['footer'];
// $NEWS_MENU_TEMPLATE['months']['footer'] = '<div class="e-menu-link news-menu-archive" ><a class="btn btn-default btn-secondary btn-sm btn-block" href="{e_PLUGIN}blogcalendar_menu/archive.php">{LAN=BLOGCAL_L2}</a></div>';;
//$NEWS_MENU_TEMPLATE['months']['separator'] = '<br />'; //$NEWS_MENU_TEMPLATE['months']['separator'] = '<br />';
@@ -131,19 +135,17 @@ $NEWS_MENU_TEMPLATE['archive']['start'] = '<ul class="news-archive-menu">'
$NEWS_MENU_TEMPLATE['archive']['end'] = '</ul>'; $NEWS_MENU_TEMPLATE['archive']['end'] = '</ul>';
$NEWS_MENU_TEMPLATE['archive']['year_start'] = "<li> $NEWS_MENU_TEMPLATE['archive']['year_start'] = "<li>
<a class='e-expandit {EXPANDOPEN}' href='#{YEAR_ID}'>{YEAR_NAME}</a> <a class='e-expandit {EXPANDOPEN}' href='#{YEAR_ID}'>{YEAR_NAME}</a>
<ul id='{YEAR_ID}' class='news-archive-menu-months' style='display:{YEAR_DISPLAY}'> <ul id='{YEAR_ID}' class='news-archive-menu-months' style='display:{YEAR_DISPLAY}'>
"; ";
$NEWS_MENU_TEMPLATE['archive']['year_end'] = '</ul></li>'; $NEWS_MENU_TEMPLATE['archive']['year_end'] = '</ul></li>';
$NEWS_MENU_TEMPLATE['archive']['month_start'] = "<li> $NEWS_MENU_TEMPLATE['archive']['month_start'] = "<li>
<a class='e-expandit' href='#{MONTH_ID}'>{MONTH_NAME}</a> <a class='e-expandit' href='#{MONTH_ID}'>{MONTH_NAME}</a>
<ul id='{MONTH_ID}' class='news-archive-menu-items' style='display:none'> <ul id='{MONTH_ID}' class='news-archive-menu-items' style='display:none'>
"; ";
$NEWS_MENU_TEMPLATE['archive']['month_end'] = '</ul></li>'; $NEWS_MENU_TEMPLATE['archive']['month_end'] = '</ul></li>';
$NEWS_MENU_TEMPLATE['archive']['item'] = " $NEWS_MENU_TEMPLATE['archive']['item'] = "<li><a href='{ITEM_URL}'>{ITEM_TITLE}</a></li>\n";
<li><a href='{ITEM_URL}'>{ITEM_TITLE}</a></li>
";