aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Newmember.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2018-03-09 11:12:18 +0100
committerMario <mario@mariovavti.com>2018-03-09 11:12:18 +0100
commit4baf5eab16d809977a44e7911ddcab0ff8383897 (patch)
tree393f618c4cfc20f53264ecd8a26a08de0823d35d /Zotlabs/Widget/Newmember.php
parent577da0eb9eb1f90a4cf7a70cfb3582cfb49007ac (diff)
parent7361af85b5488fc8bd1744389a3a332dc74276b0 (diff)
downloadvolse-hubzilla-4baf5eab16d809977a44e7911ddcab0ff8383897.tar.gz
volse-hubzilla-4baf5eab16d809977a44e7911ddcab0ff8383897.tar.bz2
volse-hubzilla-4baf5eab16d809977a44e7911ddcab0ff8383897.zip
Merge branch '3.2RC'3.2
Diffstat (limited to 'Zotlabs/Widget/Newmember.php')
-rw-r--r--Zotlabs/Widget/Newmember.php83
1 files changed, 83 insertions, 0 deletions
diff --git a/Zotlabs/Widget/Newmember.php b/Zotlabs/Widget/Newmember.php
new file mode 100644
index 000000000..cdb70e23d
--- /dev/null
+++ b/Zotlabs/Widget/Newmember.php
@@ -0,0 +1,83 @@
+<?php
+
+namespace Zotlabs\Widget;
+
+class Newmember {
+
+ function widget($arr) {
+
+ if(! local_channel())
+ return EMPTY_STR;
+
+ $c = \App::get_channel();
+ if(! $c)
+ return EMPTY_STR;
+
+
+ $a = \App::get_account();
+ if(! $a)
+ return EMPTY_STR;
+
+
+ if(datetime_convert('UTC','UTC',$a['account_created']) < datetime_convert('UTC','UTC', 'now - 60 days'))
+ 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 = [
+ t('Profile Creation'),
+ [
+ 'profile_photo' => t('Upload profile photo'),
+ 'cover_photo' => t('Upload cover photo'),
+ 'profiles' => t('Edit your profile'),
+ ],
+
+ t('Find and Connect with others'),
+ [
+ 'directory' => t('View the directory'),
+ 'directory?f=&suggest=1' => t('View friend suggestions'),
+ 'connections' => t('Manage your connections'),
+ ],
+
+ t('Communicate'),
+ [
+ 'channel/' . $channel['channel_address'] => t('View your channel homepage'),
+ 'network' => t('View your network stream'),
+ ],
+
+ t('Miscellaneous'),
+ [
+ 'settings' => t('Settings'),
+ 'help' => t('Documentation'),
+ ]
+ ];
+
+ $site_firehose = ((intval(get_config('system','site_firehose',0))) ? true : false);
+ $net_firehose = ((get_config('system','disable_discover_tab',1)) ? false : true);
+
+
+ // hack to put this in the correct spot of the array
+
+ if($site_firehose || $net_firehose) {
+ $options[5]['pubstream'] = t('View public stream');
+ }
+
+ $o = replace_macros(get_markup_template('new_member.tpl'), [
+ '$title' => t('New Member Links'),
+ '$options' => $options
+
+ ]);
+
+ return $o;
+
+ }
+
+}
+
+
+