aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-04-17 20:08:14 -0700
committerzotlabs <mike@macgirvin.com>2018-04-17 20:08:14 -0700
commit393cd46a82bd4c00c72e8734df2d1fa62928cc06 (patch)
tree1f96960fd0356810367ba569e05840389b2cdfcb /Zotlabs/Widget
parent0576046d024a4eefba2dd7e43706e1d78270fa40 (diff)
downloadvolse-hubzilla-393cd46a82bd4c00c72e8734df2d1fa62928cc06.tar.gz
volse-hubzilla-393cd46a82bd4c00c72e8734df2d1fa62928cc06.tar.bz2
volse-hubzilla-393cd46a82bd4c00c72e8734df2d1fa62928cc06.zip
public stream tag enhancements
Diffstat (limited to 'Zotlabs/Widget')
-rw-r--r--Zotlabs/Widget/Pubtagcloud.php40
1 files changed, 40 insertions, 0 deletions
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 @@
+<?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;
+ }
+
+
+
+
+ $limit = ((array_key_exists('limit', $arr)) ? intval($arr['limit']) : 50);
+
+ return pubtagblock($net_firehose,$site_firehose, $limit, $trending);
+
+ return '';
+ }
+}