diff --git a/include/taxonomy.php b/include/taxonomy.php index dfc98f493..010475c4d 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -323,12 +323,14 @@ function pubtagblock($net,$site,$limit,$recent = 0,$safemode = 1, $type = TERM_H $link = z_root() . '/pubstream'; - if($r) { - $o = '

' . (($recent) ? t('Trending') : t('Tags')) . '

'; - foreach($r as $rr) { - $o .= '#'.$rr[0].' ' . "\r\n"; - } - $o .= '
'; + if($r) { + $url = $link . '?tag='; + $tpl = get_markup_template('tagcloud.tpl'); + $o .= replace_macros($tpl, [ + '$title' => t('Trending'), + '$baseurl' => $url, + '$tags' => $r, + ]); } return $o; @@ -508,11 +510,13 @@ function catblock($uid,$count = 0,$authors = '',$owner = '', $flags = 0,$restric intval($uid) ); - $o = '

' . t('Categories') . '

'; - foreach($r as $rr) { - $o .= ''.$rr[0].' ' . "\r\n"; - } - $o .= '
'; + $url = z_root() . '/channel/' . $c[0]['channel_address'].'/?f=&cat='; + $tpl = get_markup_template('tagcloud.tpl'); + $o .= replace_macros($tpl, [ + '$title' => t('Categories'), + '$baseurl' => $url, + '$tags' => $r, + ]); } return $o;