From 14e14c6c92dadf4c95900978135a161f5da696d9 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 28 Feb 2018 19:49:33 -0800 Subject: provide new member widget which sits beneath the notifications for the first 60 days after an account creation. --- Zotlabs/Module/Go.php | 2 +- Zotlabs/Widget/Newmember.php | 77 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 Zotlabs/Widget/Newmember.php (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Go.php b/Zotlabs/Module/Go.php index d23e940c3..d33136d9e 100644 --- a/Zotlabs/Module/Go.php +++ b/Zotlabs/Module/Go.php @@ -36,7 +36,7 @@ class Go extends \Zotlabs\Web\Controller { 'cover_photo' => t('Upload a cover photo'), 'profiles' => t('Edit your default profile'), 'suggest' => t('View friend suggestions'), - 'directory' => t('View the directory to find other interesting channels'), + 'directory' => t('View the channel directory'), 'settings' => t('View/edit your channel settings'), 'help' => t('View the site or project documentation'), 'channel/' . $channel['channel_address'] => t('Visit your channel homepage'), diff --git a/Zotlabs/Widget/Newmember.php b/Zotlabs/Widget/Newmember.php new file mode 100644 index 000000000..a3f1126cc --- /dev/null +++ b/Zotlabs/Widget/Newmember.php @@ -0,0 +1,77 @@ + 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 channel directory'), + 'suggest' => 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. Warning: not moderated'); + } + + $o = replace_macros(get_markup_template('new_member.tpl'), [ + '$title' => t('New Member Links'), + '$options' => $options + + ]); + + return $o; + + } + +} + + + -- cgit v1.2.3