make suggest channels a feature

This commit is contained in:
marijus 2013-12-11 12:01:28 +01:00
parent 48610a85dc
commit 1d8c15f2df
2 changed files with 5 additions and 1 deletions

View File

@ -49,6 +49,7 @@ function get_features() {
array('personal_tab', t('Network Personal Tab'), t('Enable tab to display only Network posts that you\'ve interacted on')), array('personal_tab', t('Network Personal Tab'), t('Enable tab to display only Network posts that you\'ve interacted on')),
array('new_tab', t('Network New Tab'), t('Enable tab to display all new Network activity')), array('new_tab', t('Network New Tab'), t('Enable tab to display all new Network activity')),
array('affinity', t('Affinity Tool'), t('Filter stream activity by depth of relationships')), array('affinity', t('Affinity Tool'), t('Filter stream activity by depth of relationships')),
array('suggest', t('Suggest Channels'), t('Show channel suggestions')),
), ),
// Item tools // Item tools

View File

@ -57,6 +57,9 @@ function widget_collections($args) {
function widget_suggestions($arr) { function widget_suggestions($arr) {
if((! local_user()) || (! feature_enabled(local_user(),'suggest')))
return '';
require_once('include/socgraph.php'); require_once('include/socgraph.php');
$r = suggestion_query(local_user(),get_observer_hash(),0,20); $r = suggestion_query(local_user(),get_observer_hash(),0,20);
@ -330,4 +333,4 @@ function widget_tagcloud_wall($arr) {
if(feature_enabled($a->profile['profile_uid'],'tagadelic')) if(feature_enabled($a->profile['profile_uid'],'tagadelic'))
return tagblock('search',$a->profile['profile_uid'],$limit,$a->profile['channel_hash'],ITEM_WALL); return tagblock('search',$a->profile['profile_uid'],$limit,$a->profile['channel_hash'],ITEM_WALL);
return ''; return '';
} }