1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 14:17:49 +02:00

Issue #3030 NewForumPosts "main" BC Fix for top/bottom position.

This commit is contained in:
Cameron
2018-02-09 10:08:36 -08:00
parent e045c6c91c
commit 42b7121347

View File

@@ -90,9 +90,31 @@ class news_front
return null;
}
if(!empty($this->pref['nfp_display']) && intval($this->pref['nfp_display']) === 1) // top position
{
$this->text .= $this->renderNewForumPosts();
}
$this->text .= $this->renderDefaultTemplate();
// BC replacement for newforumposts_main
if(!empty($this->pref['nfp_display']) && intval($this->pref['nfp_display']) === 2) // bottom position
{
$this->text .= $this->renderNewForumPosts();
}
$this->text .= $this->show_newsarchive();
$this->text .= $this->render_newscats();
return null;
}
/**
* BC replacement for newforumposts_main
* @return string
*/
private function renderNewForumPosts()
{
if(e107::isInstalled('newforumposts_main') && !empty($this->pref['nfp_display']))
{
$parms = array('layout'=>'main', 'display'=>$this->pref['nfp_amount']);
@@ -102,18 +124,13 @@ class news_front
$parms['scroll'] = $this->pref['nfp_layer_height'];
}
$this->text .= e107::getMenu()->renderMenu('forum','newforumposts_menu', $parms, true);
return e107::getMenu()->renderMenu('forum','newforumposts_menu', $parms, true);
}
$this->text .= $this->show_newsarchive();
$this->text .= $this->render_newscats();
return null;
}
private function getRenderId()
{
$tmp = explode('/',$this->route);