Skip to content

Commit

Permalink
Fixes #3070 Featurebox LANs Issue #6
Browse files Browse the repository at this point in the history
  • Loading branch information
CaMer0n committed Aug 18, 2018
1 parent e9ddd09 commit 968a6d0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
6 changes: 4 additions & 2 deletions e107_handlers/plugin_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -3527,7 +3527,8 @@ function XmlMediaCategories($function, $tag)
$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++;
Expand All @@ -3538,7 +3539,8 @@ function XmlMediaCategories($function, $tag)

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;

Expand Down
14 changes: 7 additions & 7 deletions e107_plugins/featurebox/featurebox_setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ function install_post($var)
$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;
Expand All @@ -46,7 +46,7 @@ function install_post($var)

$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)
{
Expand All @@ -62,12 +62,12 @@ function install_post($var)
{
$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);
}

}
Expand Down
10 changes: 9 additions & 1 deletion e107_plugins/featurebox/languages/English_admin_featurebox.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,12 @@
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");



6 changes: 0 additions & 6 deletions e107_plugins/featurebox/languages/English_global.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,3 @@
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");

0 comments on commit 968a6d0

Please sign in to comment.