1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Update e107_plugins/news

Add lang codes.
This commit is contained in:
Gábor
2017-03-03 10:18:05 +01:00
committed by GitHub
parent 551bee9b47
commit 34f4716b31

View File

@@ -21,7 +21,7 @@ class news_menu
function __construct() function __construct()
{ {
// e107::lan('news','admin', 'true'); e107::lan('news','admin', 'true');
} }
@@ -29,12 +29,12 @@ class news_menu
* Configuration Fields. * Configuration Fields.
* @return array * @return array
*/ */
public function config($menu='') //TODO LAN public function config($menu='')
{ {
$fields = array(); $fields = array();
$categories = array(); $categories = array();
$sources = array('latest'=> "Latest News Items", 'sticky' => "Sticky News Items", 'template'=>"Assigned News items"); $sources = array('latest'=> LAN_NEWS_ADMIN_00, 'sticky' => LAN_NEWS_ADMIN_01, 'template'=> LAN_NEWS_ADMIN_02);
$tmp = e107::getDb()->retrieve('news_category','category_id,category_name',null, true); $tmp = e107::getDb()->retrieve('news_category','category_id,category_name',null, true);
@@ -56,25 +56,25 @@ class news_menu
break; break;
case "news_grid": case "news_grid":
$this->tabs = array(0 => LAN_PREFS, 1 => "Limits"); $this->tabs = array(0 => LAN_PREFS, 1 => LAN_NEWS_ADMIN_09);
$fields['caption'] = array('title'=> LAN_CAPTION, 'type'=>'text', 'tab'=>0, 'multilan'=>true, 'writeParms'=>array('size'=>'xxlarge'), 'help'=>LAN_OPTIONAL); $fields['caption'] = array('title'=> LAN_CAPTION, 'type'=>'text', 'tab'=>0, 'multilan'=>true, 'writeParms'=>array('size'=>'xxlarge'), 'help'=>LAN_OPTIONAL);
$fields['category'] = array('title'=> LAN_CATEGORY, 'type'=>'dropdown', 'tab'=>0, 'writeParms'=>array('optArray'=>$categories, 'default'=>"(".LAN_ALL.")"), 'help'=>"Limit news items to a specific category"); $fields['category'] = array('title'=> LAN_CATEGORY, 'type'=>'dropdown', 'tab'=>0, 'writeParms'=>array('optArray'=>$categories, 'default'=>"(".LAN_ALL.")"), 'help'=>"Limit news items to a specific category");
$fields['source'] = array('title'=> "Source", 'type'=>'dropdown','tab'=>0, 'writeParms'=>array('optArray'=>$sources), 'help'=>"Assigned items are those with a template assigned to 'News Grid Menu' "); $fields['source'] = array('title'=> LAN_SOURCE, 'type'=>'dropdown','tab'=>0, 'writeParms'=>array('optArray'=>$sources), 'help'=>"Assigned items are those with a template assigned to 'News Grid Menu' ");
$fields['layout'] = array('title'=> LAN_TEMPLATE, 'type'=>'dropdown', 'tab'=>0, 'writeParms'=>array('optArray'=>$templates)); $fields['layout'] = array('title'=> LAN_TEMPLATE, 'type'=>'dropdown', 'tab'=>0, 'writeParms'=>array('optArray'=>$templates));
// $fields['layout'] = array('title'=> "Layout", 'type'=>'method', 'tab'=>0,'writeParms'=>''); // $fields['layout'] = array('title'=> "Layout", 'type'=>'method', 'tab'=>0,'writeParms'=>'');
$fields['count'] = array('title'=> "Number of Items to Display", 'tab'=>1, 'type'=>'number', 'writeParms'=>array('pattern'=>'[0-9]*', 'default'=>4)); $fields['count'] = array('title'=> LAN_NEWS_ADMIN_05, 'tab'=>1, 'type'=>'number', 'writeParms'=>array('pattern'=>'[0-9]*', 'default'=>4));
$fields['feature'] = array('title'=> "Number of Feature Items", 'tab'=>1, 'type'=>'number', 'writeParms'=>array('pattern'=>'[0-9]*', 'default'=>0)); $fields['feature'] = array('title'=> LAN_NEWS_ADMIN_10, 'tab'=>1, 'type'=>'number', 'writeParms'=>array('pattern'=>'[0-9]*', 'default'=>0));
$fields['titleLimit'] = array('title'=> "Title Character Limit", 'tab'=>1, 'type'=>'number', 'writeParms'=>''); $fields['titleLimit'] = array('title'=> LAN_NEWS_ADMIN_06, 'tab'=>1, 'type'=>'number', 'writeParms'=>'');
$fields['summaryLimit'] = array('title'=> "Summary Character Limit",'tab'=>1, 'type'=>'number', 'writeParms'=>''); $fields['summaryLimit'] = array('title'=> LAN_NEWS_ADMIN_07,'tab'=>1, 'type'=>'number', 'writeParms'=>'');
break; break;
case "news_carousel": case "news_carousel":
$fields['caption'] = array('title'=> LAN_CAPTION, 'type'=>'text', 'multilan'=>true, 'writeParms'=>array('size'=>'xxlarge'), 'help'=>LAN_OPTIONAL); $fields['caption'] = array('title'=> LAN_CAPTION, 'type'=>'text', 'multilan'=>true, 'writeParms'=>array('size'=>'xxlarge'), 'help'=>LAN_OPTIONAL);
$fields['category'] = array('title'=> LAN_CATEGORY, 'type'=>'dropdown', 'writeParms'=>array('optArray'=>$categories, 'default'=>"(".LAN_ALL.")"), 'help'=>"Limit news items to a specific category"); $fields['category'] = array('title'=> LAN_CATEGORY, 'type'=>'dropdown', 'writeParms'=>array('optArray'=>$categories, 'default'=>"(".LAN_ALL.")"), 'help'=>"Limit news items to a specific category");
$fields['source'] = array('title'=> "Source", 'type'=>'dropdown','writeParms'=>array('optArray'=>$sources), 'help'=>"Assigned items are those with a template assigned to 'News Carousel' "); $fields['source'] = array('title'=> LAN_SOURCE, 'type'=>'dropdown','writeParms'=>array('optArray'=>$sources), 'help'=>"Assigned items are those with a template assigned to 'News Carousel' ");
$fields['count'] = array('title'=> "Number of Items to Display", 'type'=>'number', 'writeParms'=>array('pattern'=>'[0-9]*', 'default'=>4)); $fields['count'] = array('title'=> LAN_NEWS_ADMIN_05, 'type'=>'number', 'writeParms'=>array('pattern'=>'[0-9]*', 'default'=>4));
break; break;
@@ -84,7 +84,7 @@ class news_menu
break; break;
case "news_months": case "news_months":
$fields['showarchive'] = array('title'=> "Display Archive Link", 'type'=>'boolean'); $fields['showarchive'] = array('title'=> LAN_NEWS_ADMIN_08, 'type'=>'boolean');
$fields['year'] = array('title'=> "Year", 'type'=>'text', 'writeParms'=>array('pattern'=>'[0-9]*', 'size'=>'mini')); $fields['year'] = array('title'=> "Year", 'type'=>'text', 'writeParms'=>array('pattern'=>'[0-9]*', 'size'=>'mini'));
break; break;
@@ -133,4 +133,4 @@ class news_menu_form extends e_form
return $text; return $text;
} }
} }