From d9a5e7becee852871c282a3b2848e0bfdf6f5fc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Mon, 5 Jun 2017 09:43:21 +0200 Subject: [PATCH 1/5] Update English_admin_featurebox.php Add phrases. --- .../languages/English_admin_featurebox.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/e107_plugins/featurebox/languages/English_admin_featurebox.php b/e107_plugins/featurebox/languages/English_admin_featurebox.php index 3830e76cb..78b0e431d 100644 --- a/e107_plugins/featurebox/languages/English_admin_featurebox.php +++ b/e107_plugins/featurebox/languages/English_admin_featurebox.php @@ -37,8 +37,14 @@ define("FBLAN_14", "Show this message only"); define("FBLAN_22", "Render type"); define("FBLAN_23", "In theme box"); define("FBLAN_24", "Plain"); -//define("FBLAN_25", "Template"); //FIXME LAN - use generic. -//define("FBLAN_26", "you can use a different template for each message, add templates to e107_plugins/featurebox/templates/ folder"); +define("FBLAN_25", "Create Category"); +define("FBLAN_26", "Image/Video"); +define("FBLAN_27", "Image Link"); +define("FBLAN_28", "Featurebox Menu Category"); +define("FBLAN_29", "Category to use for the featurebox menu"); +define("FBLAN_30", "Category template"); +define("FBLAN_31", "Random"); +define("FBLAN_32", "Parameters (optional)"); +define("FBLAN_33", "Optional Javascript Parameters (format subject to change)"); - -?> \ No newline at end of file +?> From 4e3a89cf0cc3aea593946cbcafa2e51039814152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Mon, 5 Jun 2017 09:49:41 +0200 Subject: [PATCH 2/5] Add lang codes. --- e107_plugins/featurebox/admin_config.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/e107_plugins/featurebox/admin_config.php b/e107_plugins/featurebox/admin_config.php index 77fc29dbb..8951368d6 100644 --- a/e107_plugins/featurebox/admin_config.php +++ b/e107_plugins/featurebox/admin_config.php @@ -38,10 +38,10 @@ class fb_admin extends e_admin_dispatcher ); protected $adminMenu = array( - 'main/list' => array('caption'=> 'Featurebox List', 'perm' => 'P'), + 'main/list' => array('caption'=> 'Featurebox '.LAN_LIST', 'perm' => 'P'), 'main/create' => array('caption'=> LAN_CREATE, 'perm' => 'P'), 'category/list' => array('caption'=> LAN_CATEGORIES, 'perm' => 'P'), - 'category/create' => array('caption'=> "Create Category", 'perm' => 'P'), + 'category/create' => array('caption'=> FBLAN_25, 'perm' => 'P'), 'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => '0'), // 'main/custom' => array('caption'=> 'Custom Page', 'perm' => '0') ); @@ -68,11 +68,11 @@ class fb_category_ui extends e_admin_ui 'fb_category_id' => array('title'=> LAN_ID, 'type' => 'number', 'data' => 'int', 'width' =>'5%', 'forced'=> TRUE), 'fb_category_icon' => array('title'=> LAN_ICON, 'type' => 'icon', 'data' => 'str', 'width' => '5%', 'thclass' => 'center', 'class'=>'center'), 'fb_category_title' => array('title'=> LAN_TITLE, 'type' => 'text', 'data' => 'str', 'inline'=>true, 'width' => 'auto', 'help' => 'up to 200 characters', 'thclass' => 'left', 'writeParms'=>'size=xlarge'), - 'fb_category_template' => array('title'=> 'Category template', 'type' => 'layouts', 'inline'=>true, 'data' => 'str', 'width' => 'auto', 'thclass' => 'left', 'writeParms' => 'plugin=featurebox&id=featurebox_category&merge=1', 'filter' => true), - 'fb_category_random' => array('title'=> 'Random', 'type' => 'boolean', 'data' => 'int', 'width' => '5%', 'thclass' => 'center', 'class' => 'center', 'batch' => true, 'filter' => true), + 'fb_category_template' => array('title'=> FBLAN_30, 'type' => 'layouts', 'inline'=>true, 'data' => 'str', 'width' => 'auto', 'thclass' => 'left', 'writeParms' => 'plugin=featurebox&id=featurebox_category&merge=1', 'filter' => true), + 'fb_category_random' => array('title'=> FBLAN_31, 'type' => 'boolean', 'data' => 'int', 'width' => '5%', 'thclass' => 'center', 'class' => 'center', 'batch' => true, 'filter' => true), 'fb_category_class' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'data' => 'int', 'inline'=>true, 'width' => 'auto', 'filter' => true, 'batch' => true), - 'fb_category_limit' => array('title'=> 'Limit', 'type' => 'number', 'data' => 'int', 'width' => '5%', 'thclass' => 'left', 'help' => 'number of items to be shown, 0 - show all'), - 'fb_category_parms' => array('title'=> 'Parameters (optional)', 'type' => 'textarea', 'data' => 'str', 'width' => 'auto', 'thclass' => 'left', 'class' => 'left','writeParms' => 'expand=Advanced&help=Optional Javascript Parameters (format subject to change)'), + 'fb_category_limit' => array('title'=> LAN_LIMIT, 'type' => 'number', 'data' => 'int', 'width' => '5%', 'thclass' => 'left', 'help' => 'number of items to be shown, 0 - show all'), + 'fb_category_parms' => array('title'=> FBLAN_32, 'type' => 'textarea', 'data' => 'str', 'width' => 'auto', 'thclass' => 'left', 'class' => 'left','writeParms' => 'expand='.LAN_ADVANCED.'&help='.FBLAN_33), 'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'width' => '10%', 'forced'=>TRUE, 'thclass' => 'center last', 'class' => 'center') ); @@ -209,13 +209,13 @@ class fb_main_ui extends e_admin_ui 'fb_id' => array('title'=> LAN_ID, 'type' => 'number', 'data'=> 'int', 'width' =>'5%', 'forced'=> TRUE), 'fb_category' => array('title'=> LAN_CATEGORY, 'type' => 'dropdown', 'inline'=>true, 'data'=> 'int', 'width' => '10%', 'filter'=>TRUE, 'batch'=>TRUE), 'fb_title' => array('title'=> LAN_TITLE, 'type' => 'text', 'inline'=>true, 'width' => 'auto', 'thclass' => 'left'), - 'fb_image' => array('title'=> "Image/Video", 'type' => 'image', 'width' => '100px', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','writeParms'=>'size=xxlarge&media=featurebox&video=1'), + 'fb_image' => array('title'=> FBLAN_26, 'type' => 'image', 'width' => '100px', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','writeParms'=>'size=xxlarge&media=featurebox&video=1'), 'fb_text' => array('title'=> FBLAN_08, 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1','writeParms'=>'template=admin'), //DEPRECATED 'fb_mode' => array('title'=> FBLAN_12, 'type' => 'dropdown', 'data'=> 'int', 'width' => '5%', 'filter'=>TRUE, 'batch'=>TRUE), //DEPRECATED 'fb_rendertype' => array('title'=> FBLAN_22, 'type' => 'dropdown', 'data'=> 'int', 'width' => 'auto', 'noedit' => TRUE), 'fb_template' => array('title'=> LAN_TEMPLATE, 'type' => 'layouts', 'data'=> 'str', 'width' => 'auto', 'writeParms' => 'plugin=featurebox', 'filter' => true, 'batch' => true), // Photo - 'fb_imageurl' => array('title'=> "Image Link", 'type' => 'url', 'width' => 'auto','writeParms'=>'size=xxlarge'), + 'fb_imageurl' => array('title'=> FBLAN_27, 'type' => 'url', 'width' => 'auto','writeParms'=>'size=xxlarge'), 'fb_class' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'data' => 'int', 'inline'=>true, 'width' => 'auto', 'filter' => true, 'batch' => true), // User id 'fb_order' => array('title'=> LAN_ORDER, 'type' => 'number', 'data'=> 'int','width' => '5%' ), 'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center', 'readParms'=>'sort=1') @@ -224,7 +224,7 @@ class fb_main_ui extends e_admin_ui protected $fieldpref = array('checkboxes', 'fb_id', 'fb_category', 'fb_title', 'fb_template', 'fb_class', 'fb_order', 'options'); protected $prefs = array( - 'menu_category' => array('title'=> "Featurebox Menu Category", 'type'=>'dropdown', 'help' => 'Category to use for the featurebox menu') + 'menu_category' => array('title'=> FBLAN_28, 'type'=>'dropdown', 'help' => FBLAN_29) ); @@ -270,4 +270,4 @@ e107::getAdminUI()->runPage(); require_once(e_ADMIN."footer.php"); exit; -?> \ No newline at end of file +?> From 7452aa968098bda6ef1c380c7fbd79c796b2492a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Tue, 6 Jun 2017 07:11:21 +0200 Subject: [PATCH 3/5] Update admin_config.php --- e107_plugins/featurebox/admin_config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_plugins/featurebox/admin_config.php b/e107_plugins/featurebox/admin_config.php index 8951368d6..82f3767ee 100644 --- a/e107_plugins/featurebox/admin_config.php +++ b/e107_plugins/featurebox/admin_config.php @@ -41,7 +41,7 @@ class fb_admin extends e_admin_dispatcher 'main/list' => array('caption'=> 'Featurebox '.LAN_LIST', 'perm' => 'P'), 'main/create' => array('caption'=> LAN_CREATE, 'perm' => 'P'), 'category/list' => array('caption'=> LAN_CATEGORIES, 'perm' => 'P'), - 'category/create' => array('caption'=> FBLAN_25, 'perm' => 'P'), + 'category/create' => array('caption'=> LAN_CREATE_CATEGORY, 'perm' => 'P'), 'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => '0'), // 'main/custom' => array('caption'=> 'Custom Page', 'perm' => '0') ); From 6ace385e895e7378c41ed1fc541cbbaded39a57d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Tue, 6 Jun 2017 07:13:29 +0200 Subject: [PATCH 4/5] Update English_admin_featurebox.php --- e107_plugins/featurebox/languages/English_admin_featurebox.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_plugins/featurebox/languages/English_admin_featurebox.php b/e107_plugins/featurebox/languages/English_admin_featurebox.php index 78b0e431d..e5c488efe 100644 --- a/e107_plugins/featurebox/languages/English_admin_featurebox.php +++ b/e107_plugins/featurebox/languages/English_admin_featurebox.php @@ -37,7 +37,7 @@ define("FBLAN_14", "Show this message only"); define("FBLAN_22", "Render type"); define("FBLAN_23", "In theme box"); define("FBLAN_24", "Plain"); -define("FBLAN_25", "Create Category"); +define("FBLAN_25", "There are no featurebox items assigned to the [x] template."); define("FBLAN_26", "Image/Video"); define("FBLAN_27", "Image Link"); define("FBLAN_28", "Featurebox Menu Category"); From 7d16c139649361a3af329da13da97c552c780073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Tue, 6 Jun 2017 07:16:42 +0200 Subject: [PATCH 5/5] Update featurebox_menu.php --- e107_plugins/featurebox/featurebox_menu.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e107_plugins/featurebox/featurebox_menu.php b/e107_plugins/featurebox/featurebox_menu.php index 18d2516c8..2f96d9ff9 100644 --- a/e107_plugins/featurebox/featurebox_menu.php +++ b/e107_plugins/featurebox/featurebox_menu.php @@ -8,13 +8,14 @@ if (!defined('e107_INIT')) { exit; } // e107::Lan('featurebox', 'front'); +e107::includeLan(e_PLUGIN.'featurebox/languages/'.e_LANGUAGE.'_admin_featurebox.php'); // This line added to admin warning $type = vartrue(e107::getPlugPref('featurebox','menu_category'),'bootstrap_carousel'); $text = e107::getParser()->parseTemplate("{FEATUREBOX|".$type."}"); if(!$text) { - echo "
There are no featurebox items assigned to the ".$type." template
"; + echo "
".$message = e107::getParser()->lanVars(FBLAN_25, array('x'=>$type))."
"; // e107::getMessage()->addDebug("There are no featurebox items using the ".$type." template"); }