1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

Fixes #3070 Featurebox LANs Issue #6

This commit is contained in:
Cameron 2018-08-18 11:48:10 -07:00
parent e9ddd09766
commit 968a6d0a4f
4 changed files with 20 additions and 16 deletions

View File

@ -3527,7 +3527,8 @@ class e107plugin
$data['class'] = $this->getPerm(varset($v['@attributes']['perm']), 'member');
$status = e107::getMedia()->createCategory($data) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$message = str_replace('[x]', $data['category'], EPL_ADLAN_245);
$message = e107::getParser()->lanVars(EPL_ADLAN_245,$data['category'],true);
// $message = str_replace('[x]', $data['category'], EPL_ADLAN_245);
$mes->add($message, $status);
e107::getMedia()->import($data['category'],e_PLUGIN.$folder, false,'min-size=20000');
$c++;
@ -3538,7 +3539,8 @@ class e107plugin
case 'uninstall': // Probably best to leave well alone
$status = e107::getMedia()->deleteAllCategories($folder)? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$message = str_replace('[x]', $folder, EPL_ADLAN_246);
// $message = str_replace('[x]', $folder, EPL_ADLAN_246);
$message = e107::getParser()->lanVars(EPL_ADLAN_246,$folder,true);
$mes->add($message, $status);
break;

View File

@ -32,9 +32,9 @@ class featurebox_setup
$mes = e107::getMessage();
$e107_featurebox_category = array(
array('fb_category_id'=> 1,'fb_category_title'=>FBLAN_INSTALL_04,'fb_category_icon'=>'','fb_category_template'=>'bootstrap3_carousel','fb_category_random'=>'0','fb_category_class'=>'0','fb_category_limit'=>'0','fb_category_parms'=>''),
array('fb_category_id'=> 2,'fb_category_title'=>FBLAN_INSTALL_05,'fb_category_icon'=>'','fb_category_template'=>'bootstrap_tabs','fb_category_random'=>'0','fb_category_class'=>'0','fb_category_limit'=>'0','fb_category_parms'=>''),
array('fb_category_id'=> 3,'fb_category_title'=>FBLAN_INSTALL_03,'fb_category_icon'=>'','fb_category_template'=>'unassigned','fb_category_random'=>'0','fb_category_class'=>'255','fb_category_limit'=>'0','fb_category_parms'=>'')
array('fb_category_id'=> 1,'fb_category_title'=>FBLAN_34,'fb_category_icon'=>'','fb_category_template'=>'bootstrap3_carousel','fb_category_random'=>'0','fb_category_class'=>'0','fb_category_limit'=>'0','fb_category_parms'=>''),
array('fb_category_id'=> 2,'fb_category_title'=>FBLAN_35,'fb_category_icon'=>'','fb_category_template'=>'bootstrap_tabs','fb_category_random'=>'0','fb_category_class'=>'0','fb_category_limit'=>'0','fb_category_parms'=>''),
array('fb_category_id'=> 3,'fb_category_title'=>FBLAN_36,'fb_category_icon'=>'','fb_category_template'=>'unassigned','fb_category_random'=>'0','fb_category_class'=>'255','fb_category_limit'=>'0','fb_category_parms'=>'')
);
$count = 0;
@ -46,7 +46,7 @@ class featurebox_setup
$status = ($count == 3) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$mes->add(FBLAN_INSTALL_01, $status);
$mes->add(LAN_DEFAULT_TABLE_DATA." <strong>featurebox_category</strong>", $status);
if($status)
{
@ -62,12 +62,12 @@ class featurebox_setup
{
$status = e107::getDb('sql2')->insert('featurebox', $qry) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
}
$mes->add(FBLAN_INSTALL_02, $status);
$mes->add(LAN_DEFAULT_TABLE_DATA." <strong>featurebox</strong>", $status);
}
else
{
$status = E_MESSAGE_ERROR;
$mes->add(FBLAN_INSTALL_02, $status);
$mes->addError(LAN_DEFAULT_TABLE_DATA);
}
}

View File

@ -47,4 +47,12 @@ define("FBLAN_31", "Random");
define("FBLAN_32", "Parameters (optional)");
define("FBLAN_33", "Optional Javascript Parameters (format subject to change)");
?>
// Install/uninstall messages
define("FBLAN_34", "Unassigned");
define("FBLAN_35", "Carousel");
define("FBLAN_36", "Tabs");

View File

@ -11,9 +11,3 @@ define("LAN_PLUGIN_FEATUREBOX_DESCRIPTION", "Displays an animated area on the to
define("LAN_PLUGIN_FEATUREBOX_BATCH", "Create Featurebox Item");
// Install/uninstall messages
define("FBLAN_INSTALL_01", "Adding Default category table data."); //XXX Use Generic
define("FBLAN_INSTALL_02", "Adding Default table data."); //XXX Use Generic
define("FBLAN_INSTALL_03", "Unassigned");
define("FBLAN_INSTALL_04", "Carousel");
define("FBLAN_INSTALL_05", "Tabs");