turn newmember widget into a feature
This commit is contained in:
parent
af8cbf000f
commit
9a155cf5a5
@ -9,9 +9,6 @@ class Newmember {
|
|||||||
if(! local_channel())
|
if(! local_channel())
|
||||||
return EMPTY_STR;
|
return EMPTY_STR;
|
||||||
|
|
||||||
if(get_pconfig(local_channel(), 'system', 'disable_newmemberwidget'))
|
|
||||||
return EMPTY_STR;
|
|
||||||
|
|
||||||
$c = \App::get_channel();
|
$c = \App::get_channel();
|
||||||
if(! $c)
|
if(! $c)
|
||||||
return EMPTY_STR;
|
return EMPTY_STR;
|
||||||
@ -20,16 +17,9 @@ class Newmember {
|
|||||||
if(! $a)
|
if(! $a)
|
||||||
return EMPTY_STR;
|
return EMPTY_STR;
|
||||||
|
|
||||||
if(datetime_convert('UTC','UTC',$a['account_created']) < datetime_convert('UTC','UTC', 'now - 60 days'))
|
if(! feature_enabled(local_channel(),'start_menu'))
|
||||||
return EMPTY_STR;
|
return EMPTY_STR;
|
||||||
|
|
||||||
// This could be a new account that was used to clone a very old channel
|
|
||||||
|
|
||||||
$ob = \App::get_observer();
|
|
||||||
if($ob && array_key_exists('xchan_name_date',$ob) && $ob['xchan_name_date'] < datetime_convert('UTC','UTC','now - 60 days'))
|
|
||||||
return EMPTY_STR;
|
|
||||||
|
|
||||||
|
|
||||||
$options = [
|
$options = [
|
||||||
t('Profile Creation'),
|
t('Profile Creation'),
|
||||||
[
|
[
|
||||||
|
@ -45,6 +45,7 @@ function feature_level($feature,$def) {
|
|||||||
|
|
||||||
function get_features($filtered = true) {
|
function get_features($filtered = true) {
|
||||||
|
|
||||||
|
$account = \App::get_account();
|
||||||
|
|
||||||
$arr = [
|
$arr = [
|
||||||
|
|
||||||
@ -53,7 +54,14 @@ function get_features($filtered = true) {
|
|||||||
|
|
||||||
t('General Features'),
|
t('General Features'),
|
||||||
|
|
||||||
|
[
|
||||||
|
'start_menu',
|
||||||
|
t('New Member Links'),
|
||||||
|
t('Display new member quick links menu'),
|
||||||
|
true,
|
||||||
|
get_config('feature_lock','start_menu'),
|
||||||
|
feature_level('start_menu',1),
|
||||||
|
],
|
||||||
|
|
||||||
[
|
[
|
||||||
'advanced_profiles',
|
'advanced_profiles',
|
||||||
|
Reference in New Issue
Block a user