streams/Zotlabs/Widget/Pubtagcloud.php

37 lines
827 B
PHP
Raw Normal View History

2018-04-18 03:08:14 +00:00
<?php
namespace Zotlabs\Widget;
class Pubtagcloud {
function widget($arr) {
$trending = ((array_key_exists('trending',$arr)) ? intval($arr['trending']) : 0);
if ((observer_prohibited(true))) {
2018-04-18 03:08:14 +00:00
return EMPTY_STR;
}
if (! intval(get_config('system','open_pubstream',0))) {
if (! local_channel()) {
2018-04-18 03:08:14 +00:00
return EMPTY_STR;
}
}
$public_stream_mode = intval(get_config('system','public_stream_mode', PUBLIC_STREAM_NONE));
2018-04-18 03:08:14 +00:00
if (! $public_stream_mode) {
2018-04-18 03:08:14 +00:00
return EMPTY_STR;
}
$safemode = get_xconfig(get_observer_hash(),'directory','safemode',1);
2018-04-18 03:08:14 +00:00
$limit = ((array_key_exists('limit', $arr)) ? intval($arr['limit']) : 75);
2018-04-18 03:08:14 +00:00
return pubtagblock($public_stream_mode, $limit, $trending, $safemode);
2018-04-18 03:08:14 +00:00
return '';
}
}