1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-11 09:04:38 +02:00

Allow for more than 2 default news layout options. (work in progress)

This commit is contained in:
Cameron
2017-09-26 12:32:55 -07:00
parent 8fc80c545b
commit a8a49f5aad
3 changed files with 49 additions and 6 deletions

View File

@@ -1098,9 +1098,21 @@ class news_admin_ui extends e_admin_ui
$sefbaseDiz = str_replace(array("[br]","[","]"), array("<br />","<a href='".e_ADMIN_ABS."eurl.php'>","</a>"), NWSLAN_128 );
$pingOpt = array('placeholder'=>LAN_NEWS_87);
$pingVal = (!empty($pref['news_ping_services'])) ? implode("\n",$pref['news_ping_services']) : '';
$newsTemplates = array('default'=>LAN_DEFAULT, 'list'=>LAN_LIST); //TODO 'category'=>'Categories'? research 'Use non-standard template for news layout' and integrate here.
$newsTemplates = array();
if($newInfo = e107::getTemplateInfo('news', 'news')) //TODO 'category'=>'Categories'? research 'Use non-standard template for news layout' and integrate here.
{
foreach($newInfo as $k=>$val)
{
$newsTemplates[$k] = $val['title'];
}
}
else
{
$newsTemplates = array('default'=>LAN_DEFAULT, 'list'=>LAN_LIST);
}
$text = "
<form method='post' action='".e_REQUEST_URI."' id='core-newspost-settings-form'>";