From e1f88fd15d75f81af5017860b9f197771326c9b7 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 16 Oct 2014 02:02:11 -0700 Subject: jsonp support (thankxs fabrixxm) --- 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 92003328f..35605da22 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -154,7 +154,7 @@ function tagadelic($uid, $count = 0, $authors = '', $flags = 0, $restrict = 0, $ } function tags_sort($a,$b) { - if($a[0] == $b[0]) + if(strtolower($a[0]) == strtolower($b[0])) return 0; return((strtolower($a[0]) < strtolower($b[0])) ? -1 : 1); } -- cgit v1.2.3 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 From f28103d595c0e02dfd30d44b3115915994e9ecc0 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 15 Dec 2014 14:37:31 -0800 Subject: wall tags --- include/taxonomy.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include/taxonomy.php') diff --git a/include/taxonomy.php b/include/taxonomy.php index fab31c73d..be80008df 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -216,6 +216,26 @@ function tagblock($link,$uid,$count = 0,$authors = '',$flags = 0,$restrict = 0,$ return $o; } +function wtagblock($uid,$count = 0,$authors = '',$flags = 0,$restrict = 0,$type = TERM_HASHTAG) { + $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('Tags') . '

'; + foreach($r as $rr) { + $o .= '#'.$rr[0].' ' . "\r\n"; + } + $o .= '
'; + } + return $o; +} + + function catblock($uid,$count = 0,$authors = '',$flags = 0,$restrict = 0,$type = TERM_CATEGORY) { $o = ''; $tab = 0; -- cgit v1.2.3