mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
Featurebox Menu added.
This commit is contained in:
parent
3b953d1315
commit
8143448903
@ -44,7 +44,7 @@ class fb_admin extends e_admin_dispatcher
|
||||
'main/create' => array('caption'=> LAN_CREATE, 'perm' => 'P'),
|
||||
'category/list' => array('caption'=> LAN_CATEGORIES, 'perm' => 'P'),
|
||||
'category/create' => array('caption'=> "Create Category", 'perm' => 'P'),
|
||||
// 'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => '0'),
|
||||
'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => '0'),
|
||||
// 'main/custom' => array('caption'=> 'Custom Page', 'perm' => '0')
|
||||
);
|
||||
|
||||
@ -225,7 +225,10 @@ 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();
|
||||
protected $prefs = array(
|
||||
'menu_category' => array('title'=> "Featurebox Menu Category", 'type'=>'dropdown', 'help' => 'Category to use for the featurebox menu')
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -238,19 +241,19 @@ class fb_main_ui extends e_admin_ui
|
||||
while ($row = e107::getDb()->db_Fetch())
|
||||
{
|
||||
$id = $row['fb_category_id'];
|
||||
$tmpl = $row['fb_category_template'];
|
||||
$categories[$id] = $row['fb_category_title'];
|
||||
$menuCat[$tmpl] = $row['fb_category_title'];
|
||||
}
|
||||
}
|
||||
|
||||
$this->fields['fb_category']['writeParms'] = $categories;
|
||||
// DEPRECATED
|
||||
//$this->fields['fb_rendertype']['writeParms'] = array(FBLAN_23,FBLAN_24);
|
||||
//$this->fields['fb_mode']['writeParms'] = array(FBLAN_13,FBLAN_14);
|
||||
|
||||
$this->fields['fb_category']['writeParms'] = $categories;
|
||||
$this->fields['fb_category']['readParms'] = $categories;
|
||||
// DEPRECATED
|
||||
//$this->fields['fb_rendertype']['readParms'] = array(FBLAN_23,FBLAN_24);
|
||||
//$this->fields['fb_mode']['readParms'] = array(FBLAN_13,FBLAN_14);
|
||||
|
||||
unset($menuCat['unassigned']);
|
||||
|
||||
$this->prefs['menu_category']['writeParms'] = $menuCat;
|
||||
$this->prefs['menu_category']['readParms'] = $menuCat;
|
||||
|
||||
}
|
||||
|
||||
|
24
e107_plugins/featurebox/featurebox_menu.php
Normal file
24
e107_plugins/featurebox/featurebox_menu.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (c) 2013 e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
* $Id: e_shortcode.php 12438 2011-12-05 15:12:56Z secretr $
|
||||
*
|
||||
* Gallery Template
|
||||
*/
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
// e107::Lan('featurebox', 'front');
|
||||
|
||||
$type = vartrue(e107::getPlugPref('featurebox','menu_category'),'bootstrap_carousel');
|
||||
$text = e107::getParser()->parseTemplate("{FEATUREBOX|".$type."}");
|
||||
|
||||
if(!$text)
|
||||
{
|
||||
echo "<div class='alert alert-block'>There are no featurebox items assigned to the ".$type." template</div>";
|
||||
// e107::getMessage()->addDebug("There are no featurebox items using the ".$type." template");
|
||||
}
|
||||
|
||||
echo $text;
|
||||
unset($text);
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user