diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-04-18 08:19:56 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-04-18 08:19:56 +0200 |
commit | 440ccf19d1b21d293f134e03233f0dd564cdc5ba (patch) | |
tree | 752bc8e1210197e2eff3ee8c1cad96bf74ac4a9c /Zotlabs | |
parent | c0794a83b490031590bc1488b3f15a0cb4f7a2e4 (diff) | |
parent | fc7d9c235cf845e687095d4f30d32eca4c12bc4a (diff) | |
download | volse-hubzilla-440ccf19d1b21d293f134e03233f0dd564cdc5ba.tar.gz volse-hubzilla-440ccf19d1b21d293f134e03233f0dd564cdc5ba.tar.bz2 volse-hubzilla-440ccf19d1b21d293f134e03233f0dd564cdc5ba.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Cover_photo.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/Pubstream.php | 8 | ||||
-rw-r--r-- | Zotlabs/Widget/Pubtagcloud.php | 41 |
3 files changed, 49 insertions, 1 deletions
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'), 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..826e3e6ae --- /dev/null +++ b/Zotlabs/Widget/Pubtagcloud.php @@ -0,0 +1,41 @@ +<?php + +namespace Zotlabs\Widget; + +class Pubtagcloud { + + function widget($arr) { + + $trending = ((array_key_exists('trending',$arr)) ? intval($arr['trending']) : 0); + if((observer_prohibited(true))) { + return EMPTY_STR; + } + + if(! intval(get_config('system','open_pubstream',1))) { + if(! get_observer_hash()) { + return EMPTY_STR; + } + } + + $site_firehose = ((intval(get_config('system','site_firehose',0))) ? true : false); + $net_firehose = ((get_config('system','disable_discover_tab',1)) ? false : true); + + if(! ($site_firehose || $net_firehose)) { + return EMPTY_STR; + } + + if($net_firehose) { + $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, $safemode); + + return ''; + } +} |