1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 11:50:30 +02:00

Merge pull request #2680 from yesszus/patch-2

Issue #6 Update English_admin_featurebox.php
This commit is contained in:
Cameron
2017-06-07 12:35:24 -07:00
committed by GitHub
3 changed files with 22 additions and 15 deletions

View File

@@ -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'=> LAN_CREATE_CATEGORY, '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;
?>
?>

View File

@@ -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 "<div class='alert alert-block alert-warning'>There are no featurebox items assigned to the ".$type." template</div>";
echo "<div class='alert alert-block alert-warning'>".$message = e107::getParser()->lanVars(FBLAN_25, array('x'=>$type))."</div>";
// e107::getMessage()->addDebug("There are no featurebox items using the ".$type." template");
}

View File

@@ -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", "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");
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)");
?>
?>