aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-09-25 11:37:22 +0200
committerMario Vavti <mario@mariovavti.com>2018-09-25 11:37:22 +0200
commit39866b74637a58df5b1ffb8f2b6f164849d65315 (patch)
treeff24aec7e360028ceecefc3de310bfd208f20c5b
parent4c58a5cef278357c1bc31b76cfbd2719e3338398 (diff)
downloadvolse-hubzilla-39866b74637a58df5b1ffb8f2b6f164849d65315.tar.gz
volse-hubzilla-39866b74637a58df5b1ffb8f2b6f164849d65315.tar.bz2
volse-hubzilla-39866b74637a58df5b1ffb8f2b6f164849d65315.zip
move start_menu switch to settings/display for now
-rw-r--r--Zotlabs/Module/Settings/Display.php12
-rw-r--r--Zotlabs/Widget/Newmember.php9
-rw-r--r--include/features.php9
-rwxr-xr-xview/tpl/settings_display.tpl1
4 files changed, 20 insertions, 11 deletions
diff --git a/Zotlabs/Module/Settings/Display.php b/Zotlabs/Module/Settings/Display.php
index 340b3c0bb..dbc383135 100644
--- a/Zotlabs/Module/Settings/Display.php
+++ b/Zotlabs/Module/Settings/Display.php
@@ -30,6 +30,7 @@ class Display {
$channel_list_mode = ((x($_POST,'channel_list_mode')) ? intval($_POST['channel_list_mode']) : 0);
$network_list_mode = ((x($_POST,'network_list_mode')) ? intval($_POST['network_list_mode']) : 0);
$manual_update = ((array_key_exists('manual_update',$_POST)) ? intval($_POST['manual_update']) : 0);
+ $start_menu = ((x($_POST,'start_menu')) ? intval($_POST['start_menu']) : 0);
$channel_divmore_height = ((x($_POST,'channel_divmore_height')) ? intval($_POST['channel_divmore_height']) : 400);
if($channel_divmore_height < 50)
@@ -60,6 +61,7 @@ class Display {
set_pconfig(local_channel(),'system','network_divmore_height', $network_divmore_height);
set_pconfig(local_channel(),'system','manual_conversation_update', $manual_update);
set_pconfig(local_channel(),'system','channel_menu', $channel_menu);
+ set_pconfig(local_channel(),'system','start_menu', $start_menu);
$newschema = '';
if($theme){
@@ -150,6 +152,14 @@ class Display {
$theme_selected = explode(':', $theme_selected)[0];
}
+ $account = \App::get_account();
+
+ if($account['account_created'] > datetime_convert('','','now - 60 days')) {
+ $start_menu = get_pconfig(local_channel(), 'system', 'start_menu', 1);
+ }
+ else {
+ $start_menu = get_pconfig(local_channel(), 'system', 'start_menu', 0);
+ }
$preload_images = get_pconfig(local_channel(),'system','preload_images');
$preload_images = (($preload_images===false)? '0': $preload_images); // default if not set: 0
@@ -211,7 +221,7 @@ class Display {
'$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')),
'$network_divmore_height' => array('network_divmore_height', t('Grid page max height of content (in pixels)'), ((get_pconfig(local_channel(),'system','network_divmore_height')) ? get_pconfig(local_channel(),'system','network_divmore_height') : 400) , t('click to expand content exceeding this height')),
-
+ '$start_menu' => ['start_menu', t('New Member Links'), $start_menu, t('Display new member quick links menu'), $yes_no]
));
diff --git a/Zotlabs/Widget/Newmember.php b/Zotlabs/Widget/Newmember.php
index 1a4b575b9..e57cf5171 100644
--- a/Zotlabs/Widget/Newmember.php
+++ b/Zotlabs/Widget/Newmember.php
@@ -17,7 +17,14 @@ class Newmember {
if(! $a)
return EMPTY_STR;
- if(! feature_enabled(local_channel(),'start_menu'))
+ if($a['account_created'] > datetime_convert('','','now - 60 days')) {
+ $enabled = get_pconfig(local_channel(), 'system', 'start_menu', 1);
+ }
+ else {
+ $enabled = get_pconfig(local_channel(), 'system', 'start_menu', 0);
+ }
+
+ if(! $enabled)
return EMPTY_STR;
$options = [
diff --git a/include/features.php b/include/features.php
index 35c526c3e..f6ab7d142 100644
--- a/include/features.php
+++ b/include/features.php
@@ -76,15 +76,6 @@ function get_features($filtered = true, $level = (-1)) {
t('General Features'),
- [
- 'start_menu',
- t('New Member Links'),
- t('Display new member quick links menu'),
- (($account['account_created'] > datetime_convert('','','now - 60 days')) ? true : false),
- get_config('feature_lock','start_menu'),
- feature_level('start_menu',1),
- ],
-
[
'advanced_theming',
t('Advanced Theme and Layout Settings'),
diff --git a/view/tpl/settings_display.tpl b/view/tpl/settings_display.tpl
index 7600038ea..1500ea0d3 100755
--- a/view/tpl/settings_display.tpl
+++ b/view/tpl/settings_display.tpl
@@ -68,6 +68,7 @@
{{include file="field_checkbox.tpl" field=$user_scalable}}
{{include file="field_checkbox.tpl" field=$preload_images}}
{{include file="field_checkbox.tpl" field=$manual_update}}
+ {{include file="field_checkbox.tpl" field=$start_menu}}
{{if $expert}}
<div class="form-group">
<a class="btn btn-outline-secondary "href="pdledit">{{$layout_editor}}</a>