diff options
-rw-r--r-- | Zotlabs/Module/Directory.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Settings.php | 4 | ||||
-rw-r--r-- | include/contact_widgets.php | 2 | ||||
-rw-r--r-- | include/features.php | 46 | ||||
-rw-r--r-- | view/theme/redbasic/php/config.php | 4 |
5 files changed, 41 insertions, 17 deletions
diff --git a/Zotlabs/Module/Directory.php b/Zotlabs/Module/Directory.php index 84d40a166..691e48520 100644 --- a/Zotlabs/Module/Directory.php +++ b/Zotlabs/Module/Directory.php @@ -84,7 +84,7 @@ class Directory extends \Zotlabs\Web\Controller { $search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : ''); - if(strpos($search,'=') && local_channel() && get_pconfig(local_channel(),'feature','expert')) + if(strpos($search,'=') && local_channel() && feature_enabled(local_channel(),'feature','advanced_dirsearch')) $advanced = $search; diff --git a/Zotlabs/Module/Settings.php b/Zotlabs/Module/Settings.php index cf6f96e87..7612b4892 100644 --- a/Zotlabs/Module/Settings.php +++ b/Zotlabs/Module/Settings.php @@ -1071,7 +1071,7 @@ class Settings extends \Zotlabs\Web\Controller { '$title_tosource' => array('title_tosource', t("Link post titles to source"), $title_tosource, '', $yes_no), '$layout_editor' => t('System Page Layout Editor - (advanced)'), '$theme_config' => $theme_config, - '$expert' => feature_enabled(local_channel(),'expert'), + '$expert' => feature_enabled(local_channel(),'advanced_theming'), '$channel_list_mode' => array('channel_list_mode', t('Use blog/list mode on channel page'), get_pconfig(local_channel(),'system','channel_list_mode'), t('(comments displayed separately)'), $yes_no), '$network_list_mode' => array('network_list_mode', t('Use blog/list mode on grid page'), get_pconfig(local_channel(),'system','network_list_mode'), t('(comments displayed separately)'), $yes_no), '$channel_divmore_height' => array('channel_divmore_height', t('Channel page max height of content (in pixels)'), ((get_pconfig(local_channel(),'system','channel_divmore_height')) ? get_pconfig(local_channel(),'system','channel_divmore_height') : 400), t('click to expand content exceeding this height')), @@ -1337,8 +1337,6 @@ class Settings extends \Zotlabs\Web\Controller { '$h_advn' => t('Advanced Account/Page Type Settings'), '$h_descadvn' => t('Change the behaviour of this account for special situations'), '$pagetype' => $pagetype, - '$expert' => feature_enabled(local_channel(),'expert'), - '$hint' => t('Please enable expert mode (in <a href="settings/features">Settings > Additional features</a>) to adjust!'), '$lbl_misc' => t('Miscellaneous Settings'), '$photo_path' => array('photo_path', t('Default photo upload folder'), get_pconfig(local_channel(),'system','photo_path'), t('%Y - current year, %m - current month')), '$attach_path' => array('attach_path', t('Default file upload folder'), get_pconfig(local_channel(),'system','attach_path'), t('%Y - current year, %m - current month')), diff --git a/include/contact_widgets.php b/include/contact_widgets.php index 85c46b0d1..8f76bb4bc 100644 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -13,7 +13,7 @@ function findpeople_widget() { } } - $advanced_search = ((local_channel() && get_pconfig(local_channel(),'feature','expert')) ? t('Advanced') : false); + $advanced_search = ((local_channel() && feature_enabled(local_channel(),'advanced_dirsearch')) ? t('Advanced') : false); return replace_macros(get_markup_template('peoplefind.tpl'),array( '$findpeople' => t('Find Channels'), diff --git a/include/features.php b/include/features.php index 6c5ce147c..b59ab0c3e 100644 --- a/include/features.php +++ b/include/features.php @@ -61,7 +61,6 @@ function get_features($filtered = true) { array('photo_location', t('Photo Location'), t('If location data is available on uploaded photos, link this to a map.'),false,get_config('feature_lock','photo_location')), array('ajaxchat', t('Access Controlled Chatrooms'), t('Provide chatrooms and chat services with access control.'),true,get_config('feature_lock','ajaxchat')), array('smart_birthdays', t('Smart Birthdays'), t('Make birthday events timezone aware in case your friends are scattered across the planet.'),true,get_config('feature_lock','smart_birthdays')), - array('expert', t('Expert Mode'), t('Enable Expert Mode to provide advanced configuration options'),false,get_config('feature_lock','expert')), ), // Post composition @@ -86,8 +85,7 @@ function get_features($filtered = true) { array('personal_tab', t('Network Personal Tab'), t('Enable tab to display only Network posts that you\'ve interacted on'),false,get_config('feature_lock','personal_tab')), array('new_tab', t('Network New Tab'), t('Enable tab to display all new Network activity'),false,get_config('feature_lock','new_tab')), array('affinity', t('Affinity Tool'), t('Filter stream activity by depth of relationships'),false,get_config('feature_lock','affinity')), - array('connfilter', t('Connection Filtering'), t('Filter incoming posts from connections based on keywords/content'),false,get_config('feature_lock','connfilter')), - array('suggest', t('Suggest Channels'), t('Show channel suggestions'),false,get_config('feature_lock','suggest')), + array('suggest', t('Suggest Channels'), t('Show friend and connection suggestions'),false,get_config('feature_lock','suggest')), ), // Item tools @@ -103,18 +101,46 @@ function get_features($filtered = true) { ), ); + $techlevel = get_account_techlevel(); - - if($server_role === 'pro' && get_account_techlevel() > 3) { - $arr['general'][] = [ - 'premium_channel', - t('Premium Channel'), - t('Allows you to set restrictions and terms on those that connect with your channel'), + if($techlevel > 2) { + $arr['net_module'][] = [ + 'connfilter', + t('Connection Filtering'), + t('Filter incoming posts from connections based on keywords/content'), false, - get_config('feature_lock','premium_channel') + get_config('feature_lock','connfilter') + ]; + } + + if($techlevel > 3) { + if($server_role === 'pro') { + $arr['general'][] = [ + 'premium_channel', + t('Premium Channel'), + t('Allows you to set restrictions and terms on those that connect with your channel'), + false, + get_config('feature_lock','premium_channel') + ]; + } + $arr['general'][] = [ + 'advanced_dirsearch', + t('Advanced Directory Search'), + t('Allows creation of complex directory search queries'), + false, + get_config('feature_lock','advanced_dirsearch') + ]; + $arr['general'][] = [ + 'advanced_theming', + t('Advanced Theme and Layout Settings'), + t('Allows fine tuning of themes and page layouts'), + false, + get_config('feature_lock','advanced_theming') ]; } + + // removed any locked features and remove the entire category if this makes it empty if($filtered) { diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php index 8f256bde4..04c78c7ad 100644 --- a/view/theme/redbasic/php/config.php +++ b/view/theme/redbasic/php/config.php @@ -98,8 +98,8 @@ function theme_post(&$a) { function redbasic_form(&$a, $arr) { -if(feature_enabled(local_channel(),'expert')) - $expert = 1; + if(feature_enabled(local_channel(),'advanced_theming')) + $expert = 1; $t = get_markup_template('theme_settings.tpl'); $o .= replace_macros($t, array( |