10
* Smarty {list_tags} function plugin
14
* Date: June 22, 2006<br>
15
* Purpose: Render a list of tags
16
* @author Richard Mansfield <richard.mansfield@catalyst.net.nz>
17
* @author Penny Leach <penny@mjollnir.org>
21
* @return Internationalized string
23
function Dwoo_Plugin_list_tags(Dwoo $dwoo, $tags, $owner) {
25
if (!is_array($tags)) {
29
if ($owner != $USER->get('id')) {
30
return join(', ', array_map('hsc', $tags));
33
foreach ($tags as &$t) {
34
$t = '<a class="tag" href="' . get_config('wwwroot') . 'tags.php?tag=' . urlencode($t) . '">' . hsc(str_shorten_text($t, 50)) . '</a>';
36
return join(', ', $tags);