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 From a23435540ef097eb6e718129004d259a5313ef6b Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 6 Nov 2014 01:32:47 -0800 Subject: make sure the "tagcloud" actually shows hashtags. So we don't confuse folks with categories. --- include/taxonomy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/taxonomy.php') diff --git a/include/taxonomy.php b/include/taxonomy.php index d683b24a6..fab31c73d 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -209,7 +209,7 @@ function tagblock($link,$uid,$count = 0,$authors = '',$flags = 0,$restrict = 0,$ if($r) { $o = '

' . t('Tags') . '

'; foreach($r as $rr) { - $o .= ''.$rr[0].' ' . "\r\n"; + $o .= '#'.$rr[0].' ' . "\r\n"; } $o .= '
'; } -- cgit v1.2.3