From 4057e82bb46e7f30e8bccfb076be85ac9f91f256 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 6 Nov 2014 01:24:04 -0800 Subject: category tagblock --- include/taxonomy.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'include/taxonomy.php') diff --git a/include/taxonomy.php b/include/taxonomy.php index 35605da22..d683b24a6 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -216,6 +216,28 @@ function tagblock($link,$uid,$count = 0,$authors = '',$flags = 0,$restrict = 0,$ return $o; } +function catblock($uid,$count = 0,$authors = '',$flags = 0,$restrict = 0,$type = TERM_CATEGORY) { + $o = ''; + $tab = 0; + + $r = tagadelic($uid,$count,$authors,$flags,$restrict,$type); + + if($r) { + $c = q("select channel_address from channel where channel_id = %d limit 1", + intval($uid) + ); + + $o = '

' . t('Categories') . '

'; + foreach($r as $rr) { + $o .= ''.$rr[0].' ' . "\r\n"; + } + $o .= '
'; + } + return $o; +} + + + function dir_tagblock($link,$r) { $o = ''; $tab = 0; -- cgit v1.2.3