From 93a11ade045bb6767952f5bfdb278b3e9d463d2c Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 1 Mar 2018 16:11:30 -0800 Subject: sigh - missed two strings --- Zotlabs/Widget/Newmember.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Newmember.php b/Zotlabs/Widget/Newmember.php index 898942ccc..0279f339f 100644 --- a/Zotlabs/Widget/Newmember.php +++ b/Zotlabs/Widget/Newmember.php @@ -39,7 +39,7 @@ class Newmember { t('Find and Connect with others'), [ - 'directory' => t('View the channel directory'), + 'directory' => t('View the directory'), 'suggest' => t('View friend suggestions'), 'connections' => t('Manage your connections'), ], @@ -64,7 +64,7 @@ class Newmember { // 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'); + $options[5]['pubstream'] = t('View public stream'); } $o = replace_macros(get_markup_template('new_member.tpl'), [ -- cgit v1.2.3 From 471c3c4d068d1c6d4e149098d400d792fb3550a6 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sat, 3 Mar 2018 15:52:57 -0800 Subject: add dummy f= arg to suggestion urls, use directory version of suggest for newmember link instead of the suggest module as the UI is prettier. --- Zotlabs/Widget/Newmember.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Newmember.php b/Zotlabs/Widget/Newmember.php index 0279f339f..cdb70e23d 100644 --- a/Zotlabs/Widget/Newmember.php +++ b/Zotlabs/Widget/Newmember.php @@ -39,9 +39,9 @@ class Newmember { t('Find and Connect with others'), [ - 'directory' => t('View the directory'), - 'suggest' => t('View friend suggestions'), - 'connections' => t('Manage your connections'), + 'directory' => t('View the directory'), + 'directory?f=&suggest=1' => t('View friend suggestions'), + 'connections' => t('Manage your connections'), ], t('Communicate'), -- cgit v1.2.3 From 09a841f3be2953fa8e346be9259b43cf68920741 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 13 Mar 2018 15:20:32 +0100 Subject: add ability to disable newmember widget ahead of time --- Zotlabs/Widget/Newmember.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Newmember.php b/Zotlabs/Widget/Newmember.php index cdb70e23d..acc151944 100644 --- a/Zotlabs/Widget/Newmember.php +++ b/Zotlabs/Widget/Newmember.php @@ -9,16 +9,17 @@ class Newmember { if(! local_channel()) return EMPTY_STR; + if(get_pconfig(local_channel(), 'system', 'disable_newmemberwidget')) + 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; -- cgit v1.2.3 From f70413a031bac53563751c749419d64bc2b04d9b Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 14 Mar 2018 10:47:36 +0100 Subject: fix channel_address --- Zotlabs/Widget/Newmember.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Newmember.php b/Zotlabs/Widget/Newmember.php index acc151944..afa808e6f 100644 --- a/Zotlabs/Widget/Newmember.php +++ b/Zotlabs/Widget/Newmember.php @@ -47,7 +47,7 @@ class Newmember { t('Communicate'), [ - 'channel/' . $channel['channel_address'] => t('View your channel homepage'), + 'channel/' . $c['channel_address'] => t('View your channel homepage'), 'network' => t('View your network stream'), ], -- cgit v1.2.3 From 9a155cf5a576e01960c8d8b6128bfc27077211af Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 23 Mar 2018 19:03:30 -0700 Subject: turn newmember widget into a feature --- Zotlabs/Widget/Newmember.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Newmember.php b/Zotlabs/Widget/Newmember.php index afa808e6f..1a4b575b9 100644 --- a/Zotlabs/Widget/Newmember.php +++ b/Zotlabs/Widget/Newmember.php @@ -9,9 +9,6 @@ class Newmember { if(! local_channel()) return EMPTY_STR; - if(get_pconfig(local_channel(), 'system', 'disable_newmemberwidget')) - return EMPTY_STR; - $c = \App::get_channel(); if(! $c) return EMPTY_STR; @@ -20,16 +17,9 @@ class Newmember { 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')) + if(! feature_enabled(local_channel(),'start_menu')) return EMPTY_STR; - $options = [ t('Profile Creation'), [ -- cgit v1.2.3 From 4a45c35c4e0e27b737d80a6f151b0b50aaef3d1e Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 5 Apr 2018 21:01:36 -0700 Subject: oauth2 client settings page --- Zotlabs/Widget/Settings_menu.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Settings_menu.php b/Zotlabs/Widget/Settings_menu.php index 455fdcb9b..9574becc3 100644 --- a/Zotlabs/Widget/Settings_menu.php +++ b/Zotlabs/Widget/Settings_menu.php @@ -81,12 +81,20 @@ class Settings_menu { if(feature_enabled(local_channel(),'oauth_clients')) { $tabs[] = array( - 'label' => t('Connected apps'), + 'label' => t('OAuth1 apps'), 'url' => z_root() . '/settings/oauth', 'selected' => ((argv(1) === 'oauth') ? 'active' : ''), ); } + if(feature_enabled(local_channel(),'oauth2_clients')) { + $tabs[] = array( + 'label' => t('OAuth2 apps'), + 'url' => z_root() . '/settings/oauth2', + 'selected' => ((argv(1) === 'oauth2') ? 'active' : ''), + ); + } + if(feature_enabled(local_channel(),'access_tokens')) { $tabs[] = array( 'label' => t('Guest Access Tokens'), -- cgit v1.2.3 From 530a378aa1212b390120a66c08b4ea1f993d3b23 Mon Sep 17 00:00:00 2001 From: Julian Schweinsberg Date: Mon, 9 Apr 2018 19:18:53 +0200 Subject: Modified notifications widget to add the public stream when the current user is allowed to see it only --- Zotlabs/Widget/Notifications.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Notifications.php b/Zotlabs/Widget/Notifications.php index f2619c5cf..fc78a2a39 100644 --- a/Zotlabs/Widget/Notifications.php +++ b/Zotlabs/Widget/Notifications.php @@ -123,7 +123,7 @@ class Notifications { ]; } - if(get_config('system', 'disable_discover_tab') != 1) { + if(can_view_public_stream()) { $notifications[] = [ 'type' => 'pubs', 'icon' => 'globe', -- cgit v1.2.3 From 6bf2c64aa2a5a25edbb84b747ab81a47d9e08abd Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 9 Apr 2018 21:44:04 -0700 Subject: Create catcloud widget and provide a type option which can include 'cards' or 'articles' --- Zotlabs/Widget/Catcloud.php | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Zotlabs/Widget/Catcloud.php (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Catcloud.php b/Zotlabs/Widget/Catcloud.php new file mode 100644 index 000000000..c53f9bbf6 --- /dev/null +++ b/Zotlabs/Widget/Catcloud.php @@ -0,0 +1,46 @@ + Date: Mon, 9 Apr 2018 23:39:47 -0700 Subject: add commented_days parameter to item_expire(), default 7. Both expire_days and commented_days have to be exceeded to expire. --- Zotlabs/Widget/Tagcloud.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Tagcloud.php b/Zotlabs/Widget/Tagcloud.php index cf7a4932e..f79bd59ad 100644 --- a/Zotlabs/Widget/Tagcloud.php +++ b/Zotlabs/Widget/Tagcloud.php @@ -2,9 +2,6 @@ namespace Zotlabs\Widget; -// @FIXME The problem with this widget is that we don't have a search function for webpages -// that we can send the links to. Then we should also provide an option to search webpages -// and conversations. class Tagcloud { @@ -14,15 +11,15 @@ class Tagcloud { $uid = \App::$profile_uid; $count = ((x($args,'count')) ? intval($args['count']) : 24); $flags = 0; - $type = TERM_CATEGORY; + $type = TERM_HASHTAG; // @FIXME there exists no $authors variable - $r = tagadelic($uid, $count, $authors, $owner, $flags, ITEM_TYPE_WEBPAGE, $type); + $r = tagadelic($uid, $count, $authors, $owner, $flags, 0, $type); // @FIXME this should use a template if($r) { - $o = '

' . t('Categories') . '

'; + $o = '

' . t('Tags') . '

'; foreach($r as $rv) { $o .= '' . $rv[0] .' ' . "\r\n"; } -- cgit v1.2.3 From 393cd46a82bd4c00c72e8734df2d1fa62928cc06 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 17 Apr 2018 20:08:14 -0700 Subject: public stream tag enhancements --- Zotlabs/Widget/Pubtagcloud.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Zotlabs/Widget/Pubtagcloud.php (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Pubtagcloud.php b/Zotlabs/Widget/Pubtagcloud.php new file mode 100644 index 000000000..af288cf9a --- /dev/null +++ b/Zotlabs/Widget/Pubtagcloud.php @@ -0,0 +1,40 @@ + Date: Tue, 17 Apr 2018 20:27:36 -0700 Subject: fine tuning the public stream tag results --- Zotlabs/Widget/Pubtagcloud.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Pubtagcloud.php b/Zotlabs/Widget/Pubtagcloud.php index af288cf9a..b21586db0 100644 --- a/Zotlabs/Widget/Pubtagcloud.php +++ b/Zotlabs/Widget/Pubtagcloud.php @@ -31,7 +31,7 @@ class Pubtagcloud { - $limit = ((array_key_exists('limit', $arr)) ? intval($arr['limit']) : 50); + $limit = ((array_key_exists('limit', $arr)) ? intval($arr['limit']) : 75); return pubtagblock($net_firehose,$site_firehose, $limit, $trending); -- cgit v1.2.3 From 6903dbcc0dd01e86f853fdd0cba680ece05aa937 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 17 Apr 2018 21:48:43 -0700 Subject: re-use directory safemode setting for public stream tag filtering since a handful of well-known tags skews the results wildly. Added 'bot' to the list just because it's noisy. A site can customise or nullify this feature if they desire. --- Zotlabs/Widget/Pubtagcloud.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Pubtagcloud.php b/Zotlabs/Widget/Pubtagcloud.php index b21586db0..826e3e6ae 100644 --- a/Zotlabs/Widget/Pubtagcloud.php +++ b/Zotlabs/Widget/Pubtagcloud.php @@ -28,12 +28,13 @@ class Pubtagcloud { $site_firehose = false; } + $safemode = get_xconfig(get_observer_hash(),'directory','safemode',1); $limit = ((array_key_exists('limit', $arr)) ? intval($arr['limit']) : 75); - return pubtagblock($net_firehose,$site_firehose, $limit, $trending); + return pubtagblock($net_firehose,$site_firehose, $limit, $trending, $safemode); return ''; } -- cgit v1.2.3 From 1ef31d27c7b37b933f7fd0f7977d23ee186204d5 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 18 Apr 2018 17:26:05 -0700 Subject: relax restrictions to the design tools menu to allow those with write_pages permission; this doesn't fix the underlying modules though as there are some potential security issues at the moment. --- Zotlabs/Widget/Design_tools.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Design_tools.php b/Zotlabs/Widget/Design_tools.php index 8ab6a235d..a15c0c98d 100644 --- a/Zotlabs/Widget/Design_tools.php +++ b/Zotlabs/Widget/Design_tools.php @@ -6,16 +6,9 @@ class Design_tools { function widget($arr) { - // mod menu doesn't load a profile. For any modules which load a profile, check it. - // otherwise local_channel() is sufficient for permissions. + if(perm_is_allowed(\App::$profile['profile_uid'],get_observer_hash(),'write_pages') || (\App::$is_sys && is_site_admin())) + return design_tools(); - if(\App::$profile['profile_uid']) - if((\App::$profile['profile_uid'] != local_channel()) && (! \App::$is_sys)) - return ''; - - if(! local_channel()) - return ''; - - return design_tools(); + return EMPTY_STR; } } \ No newline at end of file -- cgit v1.2.3 From 4bb93c4327a55a1700b5a8fd07cd587cc4ae8ad6 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 24 Apr 2018 17:09:51 +0200 Subject: fix regression with forum widget unseen count --- Zotlabs/Widget/Forums.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Forums.php b/Zotlabs/Widget/Forums.php index f65a639ff..7415c0f0a 100644 --- a/Zotlabs/Widget/Forums.php +++ b/Zotlabs/Widget/Forums.php @@ -66,8 +66,8 @@ class Forums { for($x = 0; $x < count($r1); $x ++) { $r = q("select sum(item_unseen) as unseen from item where uid = %d and owner_xchan = '%s' and item_unseen = 1 $perms_sql ", - dbesc($r1[$x]['xchan_hash']), - intval(local_channel()) + intval(local_channel()), + dbesc($r1[$x]['xchan_hash']) ); if($r) $r1[$x]['unseen'] = $r[0]['unseen']; -- cgit v1.2.3 From a48e795f8a6e49f5d7af7adf6d4250aad1812961 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 30 Apr 2018 09:13:26 +0200 Subject: missing class --- Zotlabs/Widget/Tasklist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Widget') diff --git a/Zotlabs/Widget/Tasklist.php b/Zotlabs/Widget/Tasklist.php index 3961eecce..56342bd17 100644 --- a/Zotlabs/Widget/Tasklist.php +++ b/Zotlabs/Widget/Tasklist.php @@ -21,7 +21,7 @@ class Tasklist { '; $o .= '
' . '

' . t('Tasks') . '

'; - $o .= '
'; + $o .= '
'; $o .= '
'; return $o; -- cgit v1.2.3