mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Add extra menus for mobile
This commit is contained in:
parent
0bd6ec3b84
commit
6cefe1c715
2 changed files with 25 additions and 3 deletions
|
@ -15,9 +15,11 @@ if(!empty($obj->YPTSocket)){
|
|||
$obj->webSocketTypes = json_encode($refl->getConstants());
|
||||
$obj->webSocketURL = addQueryStringParameter(YPTSocket::getWebSocketURL(true), 'page_title', 'Mobile APP');
|
||||
}
|
||||
$obj->tabMenuItems = array();
|
||||
$obj->leftMenuItems = array();
|
||||
$obj->tabMenuItemsInABrowser = array();
|
||||
$obj->leftMenuItemsInABrowser = array();
|
||||
if(AVideoPlugin::isEnabledByName("TopMenu")){
|
||||
$obj->tabMenuItems = array();
|
||||
$obj->leftMenuItems = array();
|
||||
if(empty($_POST['sort'])){
|
||||
$_POST['sort'] = array('item_order'=>"ASC");
|
||||
}
|
||||
|
@ -35,5 +37,21 @@ if(AVideoPlugin::isEnabledByName("TopMenu")){
|
|||
$obj->leftMenuItems[] = $value2;
|
||||
}
|
||||
}
|
||||
$tabMenu = Menu::getAllActive(Menu::$typeMobileTabMenuInABrowser);
|
||||
foreach ($tabMenu as $key => $value) {
|
||||
$menuItems = MenuItem::getAllFromMenu($value['id'], true);
|
||||
foreach ($menuItems as $value2) {
|
||||
$value2['target'] = '_blank';
|
||||
$obj->tabMenuItems[] = $value2;
|
||||
}
|
||||
}
|
||||
$tabMenu = Menu::getAllActive(Menu::$typeMobileLeftMenuInABrowser);
|
||||
foreach ($tabMenu as $key => $value) {
|
||||
$menuItems = MenuItem::getAllFromMenu($value['id'], true);
|
||||
foreach ($menuItems as $value2) {
|
||||
$value2['target'] = '_blank';
|
||||
$obj->leftMenuItems[] = $value2;
|
||||
}
|
||||
}
|
||||
}
|
||||
echo json_encode($obj);
|
||||
|
|
|
@ -15,6 +15,8 @@ class Menu extends ObjectYPT {
|
|||
static $typeActionMenuCustomURLForUsersThatCanNotWatchVideo = 7;
|
||||
static $typeMobileTabMenu = 8;
|
||||
static $typeMobileLeftMenu = 9;
|
||||
static $typeMobileTabMenuInABrowser = 10;
|
||||
static $typeMobileLeftMenuInABrowser = 11;
|
||||
|
||||
static $typeName = array(
|
||||
1=>'Left',
|
||||
|
@ -25,7 +27,9 @@ class Menu extends ObjectYPT {
|
|||
6=>'Action Per Video For Users That can Watch Video',
|
||||
7=>'Action Per Video For Users That can NOT Watch Video',
|
||||
8=>'Mobile Tab Menu',
|
||||
9=>'Mobile Left Menu');
|
||||
9=>'Mobile Left Menu',
|
||||
10=>'Mobile Tab Menu in a Browser',
|
||||
11=>'Mobile Tab Left in a Browser');
|
||||
|
||||
protected $id, $menuName, $categories_id, $users_groups_id, $menu_order, $status, $position, $type, $icon, $menuSeoUrl;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue