diff options
55 files changed, 147 insertions, 1 deletions
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 @@ +<?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; + + + $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 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; + + } + +} + + + diff --git a/view/pdl/mod_admin.pdl b/view/pdl/mod_admin.pdl index deee4551b..1cf49750d 100644 --- a/view/pdl/mod_admin.pdl +++ b/view/pdl/mod_admin.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_appman.pdl b/view/pdl/mod_appman.pdl index d2b1379a5..8bd407372 100644 --- a/view/pdl/mod_appman.pdl +++ b/view/pdl/mod_appman.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_apps.pdl b/view/pdl/mod_apps.pdl index d2b1379a5..8bd407372 100644 --- a/view/pdl/mod_apps.pdl +++ b/view/pdl/mod_apps.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_articles.pdl b/view/pdl/mod_articles.pdl index c7599a008..b823787f4 100644 --- a/view/pdl/mod_articles.pdl +++ b/view/pdl/mod_articles.pdl @@ -5,4 +5,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_blocks.pdl b/view/pdl/mod_blocks.pdl index 6ef7993b5..4a90a4f36 100644 --- a/view/pdl/mod_blocks.pdl +++ b/view/pdl/mod_blocks.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_cal.pdl b/view/pdl/mod_cal.pdl index c34898dd5..7e15fc869 100644 --- a/view/pdl/mod_cal.pdl +++ b/view/pdl/mod_cal.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_cards.pdl b/view/pdl/mod_cards.pdl index f5606dcb8..f0403e380 100644 --- a/view/pdl/mod_cards.pdl +++ b/view/pdl/mod_cards.pdl @@ -5,4 +5,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_cdav.pdl b/view/pdl/mod_cdav.pdl index d31308d90..c0f9a511f 100644 --- a/view/pdl/mod_cdav.pdl +++ b/view/pdl/mod_cdav.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_channel.pdl b/view/pdl/mod_channel.pdl index f7ac0b4ef..5857fca95 100644 --- a/view/pdl/mod_channel.pdl +++ b/view/pdl/mod_channel.pdl @@ -10,4 +10,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_chanview.pdl b/view/pdl/mod_chanview.pdl index 5c8ca77d5..a5461df50 100644 --- a/view/pdl/mod_chanview.pdl +++ b/view/pdl/mod_chanview.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_chat.pdl b/view/pdl/mod_chat.pdl index 2f1f5c8d1..808ba3d5a 100644 --- a/view/pdl/mod_chat.pdl +++ b/view/pdl/mod_chat.pdl @@ -7,4 +7,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_cloud.pdl b/view/pdl/mod_cloud.pdl index 5c8ca77d5..a5461df50 100644 --- a/view/pdl/mod_cloud.pdl +++ b/view/pdl/mod_cloud.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_common.pdl b/view/pdl/mod_common.pdl index c34898dd5..7e15fc869 100644 --- a/view/pdl/mod_common.pdl +++ b/view/pdl/mod_common.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_connect.pdl b/view/pdl/mod_connect.pdl index 23b8d9f71..d7e5d29f3 100644 --- a/view/pdl/mod_connect.pdl +++ b/view/pdl/mod_connect.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_connections.pdl b/view/pdl/mod_connections.pdl index 7cead4fe8..b777cada5 100644 --- a/view/pdl/mod_connections.pdl +++ b/view/pdl/mod_connections.pdl @@ -6,4 +6,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_connedit.pdl b/view/pdl/mod_connedit.pdl index 3f57ed87b..4bdadb5e8 100644 --- a/view/pdl/mod_connedit.pdl +++ b/view/pdl/mod_connedit.pdl @@ -6,4 +6,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_defperms.pdl b/view/pdl/mod_defperms.pdl index 53a3ac9e5..37c85c765 100644 --- a/view/pdl/mod_defperms.pdl +++ b/view/pdl/mod_defperms.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_directory.pdl b/view/pdl/mod_directory.pdl index 7b430738b..2e408c29f 100644 --- a/view/pdl/mod_directory.pdl +++ b/view/pdl/mod_directory.pdl @@ -6,4 +6,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_display.pdl b/view/pdl/mod_display.pdl index e657fa88b..95f069031 100644 --- a/view/pdl/mod_display.pdl +++ b/view/pdl/mod_display.pdl @@ -1,3 +1,4 @@ [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_editblock.pdl b/view/pdl/mod_editblock.pdl index 6ef7993b5..4a90a4f36 100644 --- a/view/pdl/mod_editblock.pdl +++ b/view/pdl/mod_editblock.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_editlayout.pdl b/view/pdl/mod_editlayout.pdl index 6ef7993b5..4a90a4f36 100644 --- a/view/pdl/mod_editlayout.pdl +++ b/view/pdl/mod_editlayout.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_editwebpage.pdl b/view/pdl/mod_editwebpage.pdl index 6ef7993b5..4a90a4f36 100644 --- a/view/pdl/mod_editwebpage.pdl +++ b/view/pdl/mod_editwebpage.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_events.pdl b/view/pdl/mod_events.pdl index b26f3b0d0..e9a91e219 100644 --- a/view/pdl/mod_events.pdl +++ b/view/pdl/mod_events.pdl @@ -4,4 +4,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_go.pdl b/view/pdl/mod_go.pdl index c34898dd5..7e15fc869 100644 --- a/view/pdl/mod_go.pdl +++ b/view/pdl/mod_go.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_group.pdl b/view/pdl/mod_group.pdl index 0a31e17d9..34eb7ddd1 100644 --- a/view/pdl/mod_group.pdl +++ b/view/pdl/mod_group.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_help.pdl b/view/pdl/mod_help.pdl index 2eab7aa63..4bb380cc9 100644 --- a/view/pdl/mod_help.pdl +++ b/view/pdl/mod_help.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_hq.pdl b/view/pdl/mod_hq.pdl index 450fcb9a7..1bcdb2c65 100644 --- a/view/pdl/mod_hq.pdl +++ b/view/pdl/mod_hq.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_id.pdl b/view/pdl/mod_id.pdl index c34898dd5..7e15fc869 100644 --- a/view/pdl/mod_id.pdl +++ b/view/pdl/mod_id.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_layouts.pdl b/view/pdl/mod_layouts.pdl index 6ef7993b5..4a90a4f36 100644 --- a/view/pdl/mod_layouts.pdl +++ b/view/pdl/mod_layouts.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_locs.pdl b/view/pdl/mod_locs.pdl index 53a3ac9e5..37c85c765 100644 --- a/view/pdl/mod_locs.pdl +++ b/view/pdl/mod_locs.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_mail.pdl b/view/pdl/mod_mail.pdl index 52f908919..d572b7244 100644 --- a/view/pdl/mod_mail.pdl +++ b/view/pdl/mod_mail.pdl @@ -4,4 +4,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_menu.pdl b/view/pdl/mod_menu.pdl index 6ef7993b5..4a90a4f36 100644 --- a/view/pdl/mod_menu.pdl +++ b/view/pdl/mod_menu.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_message.pdl b/view/pdl/mod_message.pdl index f9dd8f623..3f1dd594f 100644 --- a/view/pdl/mod_message.pdl +++ b/view/pdl/mod_message.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_mitem.pdl b/view/pdl/mod_mitem.pdl index 4db06cb49..0cca7fd85 100644 --- a/view/pdl/mod_mitem.pdl +++ b/view/pdl/mod_mitem.pdl @@ -4,4 +4,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_network.pdl b/view/pdl/mod_network.pdl index 44e29ffbd..09fdba573 100644 --- a/view/pdl/mod_network.pdl +++ b/view/pdl/mod_network.pdl @@ -14,4 +14,5 @@ $content [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_photos.pdl b/view/pdl/mod_photos.pdl index 4d1a5b2ea..6a3d30b1c 100644 --- a/view/pdl/mod_photos.pdl +++ b/view/pdl/mod_photos.pdl @@ -4,4 +4,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_profile.pdl b/view/pdl/mod_profile.pdl index c34898dd5..7e15fc869 100644 --- a/view/pdl/mod_profile.pdl +++ b/view/pdl/mod_profile.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_profile_photo.pdl b/view/pdl/mod_profile_photo.pdl index c34898dd5..7e15fc869 100644 --- a/view/pdl/mod_profile_photo.pdl +++ b/view/pdl/mod_profile_photo.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_profiles.pdl b/view/pdl/mod_profiles.pdl index c34898dd5..7e15fc869 100644 --- a/view/pdl/mod_profiles.pdl +++ b/view/pdl/mod_profiles.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_profperm.pdl b/view/pdl/mod_profperm.pdl index c34898dd5..7e15fc869 100644 --- a/view/pdl/mod_profperm.pdl +++ b/view/pdl/mod_profperm.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_pubstream.pdl b/view/pdl/mod_pubstream.pdl index e657fa88b..95f069031 100644 --- a/view/pdl/mod_pubstream.pdl +++ b/view/pdl/mod_pubstream.pdl @@ -1,3 +1,4 @@ [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_rate.pdl b/view/pdl/mod_rate.pdl index 5c8ca77d5..a5461df50 100644 --- a/view/pdl/mod_rate.pdl +++ b/view/pdl/mod_rate.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_ratings.pdl b/view/pdl/mod_ratings.pdl index cfa39e408..f6e87cb7c 100644 --- a/view/pdl/mod_ratings.pdl +++ b/view/pdl/mod_ratings.pdl @@ -7,4 +7,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_search.pdl b/view/pdl/mod_search.pdl index e69657dac..ed1f77c5a 100644 --- a/view/pdl/mod_search.pdl +++ b/view/pdl/mod_search.pdl @@ -2,4 +2,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_settings.pdl b/view/pdl/mod_settings.pdl index 53a3ac9e5..37c85c765 100644 --- a/view/pdl/mod_settings.pdl +++ b/view/pdl/mod_settings.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_sharedwithme.pdl b/view/pdl/mod_sharedwithme.pdl index e657fa88b..95f069031 100644 --- a/view/pdl/mod_sharedwithme.pdl +++ b/view/pdl/mod_sharedwithme.pdl @@ -1,3 +1,4 @@ [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_sources.pdl b/view/pdl/mod_sources.pdl index 53a3ac9e5..37c85c765 100644 --- a/view/pdl/mod_sources.pdl +++ b/view/pdl/mod_sources.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_suggest.pdl b/view/pdl/mod_suggest.pdl index 392a36dd6..b74391cba 100644 --- a/view/pdl/mod_suggest.pdl +++ b/view/pdl/mod_suggest.pdl @@ -4,4 +4,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_uexport.pdl b/view/pdl/mod_uexport.pdl index 53a3ac9e5..37c85c765 100644 --- a/view/pdl/mod_uexport.pdl +++ b/view/pdl/mod_uexport.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_viewconnections.pdl b/view/pdl/mod_viewconnections.pdl index c34898dd5..7e15fc869 100644 --- a/view/pdl/mod_viewconnections.pdl +++ b/view/pdl/mod_viewconnections.pdl @@ -3,4 +3,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_webpages.pdl b/view/pdl/mod_webpages.pdl index 4e60dc2a7..d13bf8862 100644 --- a/view/pdl/mod_webpages.pdl +++ b/view/pdl/mod_webpages.pdl @@ -4,4 +4,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/pdl/mod_wiki.pdl b/view/pdl/mod_wiki.pdl index 1b98b6379..be86be7e3 100644 --- a/view/pdl/mod_wiki.pdl +++ b/view/pdl/mod_wiki.pdl @@ -4,4 +4,5 @@ [/region] [region=right_aside] [widget=notifications][/widget] +[widget=newmember][/widget] [/region] diff --git a/view/tpl/new_member.tpl b/view/tpl/new_member.tpl new file mode 100644 index 000000000..60e347ab3 --- /dev/null +++ b/view/tpl/new_member.tpl @@ -0,0 +1,17 @@ +<div class="widget"> +<h3>{{$title}}</h3> +{{if $options}} +<ul class="nav nav-pills flex-column"> +{{foreach $options as $x}} + {{if is_array($x) }} + {{foreach $x as $y => $z}} + <li class="nav-item"><a href="{{$y}}" class="nav-link">{{$z}}</a></li> + {{/foreach}} + {{else}} + <div><strong>{{$x}}</strong></div> + {{/if}} +{{/foreach}} +</ul> +{{/if}} +</div> + |