mirror of
https://github.com/e107inc/e107.git
synced 2025-09-03 11:22:40 +02:00
Corrected some of the confusion with news-preference labels. Option added to choose what displays in the news list page. $frm->checkboxes now renders field-help correctly.
This commit is contained in:
@@ -725,6 +725,7 @@ class news_admin_ui extends e_admin_ui
|
||||
$temp['news_ping_services'] = explode("\n",$_POST['news_ping_services']);
|
||||
$temp['news_default_template'] = preg_replace('#[^\w\pL\-]#u', '', $_POST['news_default_template']);
|
||||
$temp['news_list_limit'] = intval($_POST['news_list_limit']);
|
||||
$temp['news_list_templates'] = e107::getParser()->toDB($_POST['news_list_templates']);
|
||||
|
||||
e107::getConfig()->updatePref($temp);
|
||||
|
||||
@@ -960,6 +961,8 @@ class news_admin_ui extends e_admin_ui
|
||||
$pingVal = (!empty($pref['news_ping_services'])) ? implode("\n",$pref['news_ping_services']) : '';
|
||||
$newsTemplates = array('default'=>'Default', 'list'=>'List'); //TODO 'category'=>'Categories'? research 'Use non-standard template for news layout' and integrate here.
|
||||
|
||||
|
||||
|
||||
$text = "
|
||||
<form method='post' action='".e_SELF."?pref' id='core-newspost-settings-form'>";
|
||||
|
||||
@@ -978,25 +981,7 @@ class news_admin_ui extends e_admin_ui
|
||||
<div class='field-help'>".LAN_NEWS_88."</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Ping Services</td>
|
||||
<td>
|
||||
".$frm->textarea('news_ping_services', $pingVal, 4, 100, $pingOpt)."
|
||||
<div class='field-help'>".LAN_NEWS_89."<br />".LAN_NEWS_90."</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".NWSLAN_86."</td>
|
||||
<td>
|
||||
".$frm->radio_switch('news_cats', $pref['news_cats'])."
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".NWSLAN_87."</td>
|
||||
<td>
|
||||
".$frm->select('nbr_cols', $this->_optrange(6, false), $pref['nbr_cols'], 'class=tbox')."
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".NWSLAN_88."</td>
|
||||
<td>
|
||||
@@ -1012,6 +997,33 @@ class news_admin_ui extends e_admin_ui
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".LAN_NEWS_93."</td>
|
||||
<td>
|
||||
".$frm->checkboxes('news_list_templates', $this->news_renderTypes, varset($pref['news_list_templates'],0), array('useKeyValues' => 1))."
|
||||
<div class='field-help'>".LAN_NEWS_94."</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Ping Services</td>
|
||||
<td>
|
||||
".$frm->textarea('news_ping_services', $pingVal, 4, 100, $pingOpt)."
|
||||
<div class='field-help'>".LAN_NEWS_89."<br />".LAN_NEWS_90."</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>".NWSLAN_86."</td>
|
||||
<td>
|
||||
".$frm->radio_switch('news_cats', $pref['news_cats'])."
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".NWSLAN_87."</td>
|
||||
<td>
|
||||
".$frm->select('nbr_cols', $this->_optrange(6, false), $pref['nbr_cols'], 'class=tbox')."
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".NWSLAN_115."</td>
|
||||
<td id='newsposts-archive-cont'>
|
||||
|
Reference in New Issue
Block a user