From bf820beb791d8a5c0c504c5e1b2704d56c5b78a1 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 1 Feb 2017 12:59:56 +0100 Subject: remove experimental_app_bin config conditional --- include/nav.php | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) (limited to 'include') diff --git a/include/nav.php b/include/nav.php index 25f2a1df4..1adc352a7 100644 --- a/include/nav.php +++ b/include/nav.php @@ -244,29 +244,27 @@ EOT; //app bin - $navapps = ''; - if(get_config('system','experimental_app_bin')) { - if(local_channel()) { - //Zlib\Apps::import_system_apps(); - $syslist = array(); - $list = Zlib\Apps::app_list(local_channel(), false, 'nav_featured_app'); - if($list) { - foreach($list as $li) { - $syslist[] = Zlib\Apps::app_encode($li); - } + if(local_channel()) { + //Zlib\Apps::import_system_apps(); + $syslist = array(); + $list = Zlib\Apps::app_list(local_channel(), false, 'nav_featured_app'); + if($list) { + foreach($list as $li) { + $syslist[] = Zlib\Apps::app_encode($li); } - Zlib\Apps::translate_system_apps($syslist); - } - else { - $syslist = Zlib\Apps::get_system_apps(true); } - - $navapps = replace_macros(get_markup_template('navapps.tpl'), array( - '$apps' => $syslist, - '$localuser' => local_channel(), - )); + Zlib\Apps::translate_system_apps($syslist); + } + else { + $syslist = Zlib\Apps::get_system_apps(true); } + $navapps = replace_macros(get_markup_template('navapps.tpl'), array( + '$apps' => $syslist, + '$localuser' => local_channel(), + )); + + $tpl = get_markup_template('nav.tpl'); App::$page['nav'] .= replace_macros($tpl, array( -- cgit v1.2.3 From 8220a6584ca78e8db01d1bd1ea8720cec6952d12 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 2 Feb 2017 11:19:06 +0100 Subject: remove apps from usermenu --- include/nav.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/nav.php b/include/nav.php index 894b30b45..98b6ebe3f 100644 --- a/include/nav.php +++ b/include/nav.php @@ -85,30 +85,30 @@ EOT; $nav['logout'] = Array('logout',t('Logout'), "", t('End this session'),'logout_nav_btn'); // user menu - $nav['usermenu'][] = Array('channel/' . $channel['channel_address'], t('Home'), "", t('Your posts and conversations'),'channel_nav_btn'); + //$nav['usermenu'][] = Array('channel/' . $channel['channel_address'], t('Home'), "", t('Your posts and conversations'),'channel_nav_btn'); $nav['usermenu'][] = Array('profile/' . $channel['channel_address'], t('View Profile'), "", t('Your profile page'),'profile_nav_btn'); if(feature_enabled(local_channel(),'multi_profiles') && (! $basic)) $nav['usermenu'][] = Array('profiles', t('Edit Profiles'),"", t('Manage/Edit profiles'),'profiles_nav_btn'); else $nav['usermenu'][] = Array('profiles/' . $prof[0]['id'], t('Edit Profile'),"", t('Edit your profile'),'profiles_nav_btn'); - $nav['usermenu'][] = Array('photos/' . $channel['channel_address'], t('Photos'), "", t('Your photos'),'photos_nav_btn'); - $nav['usermenu'][] = Array('cloud/' . $channel['channel_address'],t('Files'),"",t('Your files'),'cloud_nav_btn'); + //$nav['usermenu'][] = Array('photos/' . $channel['channel_address'], t('Photos'), "", t('Your photos'),'photos_nav_btn'); + //$nav['usermenu'][] = Array('cloud/' . $channel['channel_address'],t('Files'),"",t('Your files'),'cloud_nav_btn'); - if((! $basic) && feature_enabled(local_channel(),'ajaxchat')) - $nav['usermenu'][] = Array('chat/' . $channel['channel_address'], t('Chat'),"",t('Your chatrooms'),'chat_nav_btn'); + //if((! $basic) && feature_enabled(local_channel(),'ajaxchat')) + // $nav['usermenu'][] = Array('chat/' . $channel['channel_address'], t('Chat'),"",t('Your chatrooms'),'chat_nav_btn'); - require_once('include/menu.php'); - $has_bookmarks = menu_list_count(local_channel(),'',MENU_BOOKMARK) + menu_list_count(local_channel(),'',MENU_SYSTEM|MENU_BOOKMARK); - if(($has_bookmarks) && (! $basic)) { - $nav['usermenu'][] = Array('bookmarks', t('Bookmarks'), "", t('Your bookmarks'),'bookmarks_nav_btn'); - } + //require_once('include/menu.php'); + //$has_bookmarks = menu_list_count(local_channel(),'',MENU_BOOKMARK) + menu_list_count(local_channel(),'',MENU_SYSTEM|MENU_BOOKMARK); + //if(($has_bookmarks) && (! $basic)) { + // $nav['usermenu'][] = Array('bookmarks', t('Bookmarks'), "", t('Your bookmarks'),'bookmarks_nav_btn'); + //} - if(feature_enabled($channel['channel_id'],'webpages') && (! $basic)) - $nav['usermenu'][] = Array('webpages/' . $channel['channel_address'],t('Webpages'),"",t('Your webpages'),'webpages_nav_btn'); - if(feature_enabled($channel['channel_id'],'wiki') && (! $basic)) - $nav['usermenu'][] = Array('wiki/' . $channel['channel_address'],t('Wikis'),"",t('Your wikis'),'wiki_nav_btn'); + //if(feature_enabled($channel['channel_id'],'webpages') && (! $basic)) + // $nav['usermenu'][] = Array('webpages/' . $channel['channel_address'],t('Webpages'),"",t('Your webpages'),'webpages_nav_btn'); + //if(feature_enabled($channel['channel_id'],'wiki') && (! $basic)) + // $nav['usermenu'][] = Array('wiki/' . $channel['channel_address'],t('Wikis'),"",t('Your wikis'),'wiki_nav_btn'); } else { if(! get_account_id()) { -- cgit v1.2.3 From dce9a70ff59658249abeb58af46144eea16c721b Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 3 Feb 2017 12:12:05 +0100 Subject: check for app-icons in app_list() instead of app_render() --- include/nav.php | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/nav.php b/include/nav.php index 98b6ebe3f..356c0643b 100644 --- a/include/nav.php +++ b/include/nav.php @@ -264,7 +264,6 @@ EOT; '$localuser' => local_channel(), )); - $tpl = get_markup_template('nav.tpl'); App::$page['nav'] .= replace_macros($tpl, array( -- cgit v1.2.3 From 8059260c185aa267d15f2a7d9d0df0c21140ad69 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 6 Feb 2017 13:45:46 +0100 Subject: import system apps on initial load --- include/nav.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/nav.php b/include/nav.php index 3c97d42da..70e9bfc59 100644 --- a/include/nav.php +++ b/include/nav.php @@ -255,7 +255,11 @@ EOT; //app bin if(local_channel()) { - //Zlib\Apps::import_system_apps(); + if(get_pconfig(local_channel(), 'system','initial_import_system_apps') === false) { + Zlib\Apps::import_system_apps(); + set_pconfig(local_channel(), 'system','initial_import_system_apps', 1); + } + $syslist = array(); $list = Zlib\Apps::app_list(local_channel(), false, 'nav_featured_app'); if($list) { -- cgit v1.2.3 From 70edcabca1e9341b857c469760c88e5c9d318c53 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 6 Feb 2017 20:10:10 +0100 Subject: move icon stuff back to app_render() and send navapps through app_render() --- include/nav.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/nav.php b/include/nav.php index 70e9bfc59..a6e59a91f 100644 --- a/include/nav.php +++ b/include/nav.php @@ -273,10 +273,9 @@ EOT; $syslist = Zlib\Apps::get_system_apps(true); } - $navapps = replace_macros(get_markup_template('navapps.tpl'), array( - '$apps' => $syslist, - '$localuser' => local_channel(), - )); + foreach($syslist as $app) { + $navapps[] = Zlib\Apps::app_render($app,'nav'); + } $tpl = get_markup_template('nav.tpl'); -- cgit v1.2.3