From 0576046d024a4eefba2dd7e43706e1d78270fa40 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 17 Apr 2018 16:29:32 -0700 Subject: when changing cover photo, show existing --- Zotlabs/Module/Cover_photo.php | 1 + 1 file changed, 1 insertion(+) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Cover_photo.php b/Zotlabs/Module/Cover_photo.php index 56e35f912..d76c1b408 100644 --- a/Zotlabs/Module/Cover_photo.php +++ b/Zotlabs/Module/Cover_photo.php @@ -355,6 +355,7 @@ class Cover_photo extends \Zotlabs\Web\Controller { $o .= replace_macros($tpl,array( '$user' => \App::$channel['channel_address'], + '$existing' => get_cover_photo(local_channel(),'array',PHOTO_RES_COVER_850), '$lbl_upfile' => t('Upload File:'), '$lbl_profiles' => t('Select a profile:'), '$title' => t('Change Cover Photo'), -- 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/Module/Pubstream.php | 8 +++++++- Zotlabs/Widget/Pubtagcloud.php | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 Zotlabs/Widget/Pubtagcloud.php (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Pubstream.php b/Zotlabs/Module/Pubstream.php index 45487e3a4..e8a0146c4 100644 --- a/Zotlabs/Module/Pubstream.php +++ b/Zotlabs/Module/Pubstream.php @@ -34,6 +34,8 @@ class Pubstream extends \Zotlabs\Web\Controller { } $mid = ((x($_REQUEST,'mid')) ? $_REQUEST['mid'] : ''); + $hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : ''); + if(strpos($mid,'b64.') === 0) $decoded = @base64url_decode(substr($mid,4)); @@ -133,7 +135,7 @@ class Pubstream extends \Zotlabs\Web\Controller { '$order' => 'comment', '$file' => '', '$cats' => '', - '$tags' => '', + '$tags' => $hashtags, '$dend' => '', '$mid' => $mid, '$verb' => '', @@ -170,6 +172,10 @@ class Pubstream extends \Zotlabs\Web\Controller { $page_mode = 'client'; + if(x($hashtags)) { + $sql_extra .= protect_sprintf(term_query('item', $hashtags, TERM_HASHTAG, TERM_COMMUNITYTAG)); + } + $net_query = (($net) ? " left join xchan on xchan_hash = author_xchan " : ''); $net_query2 = (($net) ? " and xchan_network = '" . protect_sprintf(dbesc($net)) . "' " : ''); 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') 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') 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