From 9e0d8ea4aa08f6390c0f93f6466c2a101dffcbed Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Fri, 29 Oct 2010 11:28:00 +0000 Subject: tags now support avatars on riverdashboard (but no longer support versions of Elgg < 1.7) --- views/default/river/object/image/tag.php | 34 ++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 15 deletions(-) (limited to 'views/default') diff --git a/views/default/river/object/image/tag.php b/views/default/river/object/image/tag.php index 961761c99..a59066c67 100644 --- a/views/default/river/object/image/tag.php +++ b/views/default/river/object/image/tag.php @@ -1,22 +1,26 @@ subject_guid); -$person_tagged = get_entity($vars['item']->object_guid); -if ($image->title) { - $title = $image->title; -} else { - $title = "untitled"; -} - -// viewer may not have permission to view image -if (!$image) { - return; -} +$tagger = get_entity($vars['item']->subject_guid); +$tagged = get_entity($vars['item']->object_guid); +$annotation = get_annotation($vars['item']->annotation_id); +if ($annotation) { + $image = get_entity($annotation->entity_guid); + // viewer may not have permission to view image + if (!$image) { + return; + } -$image_url = "getURL()}\">{$title}"; -$person_url = "getURL()}\">{$person_tagged->name}"; + $image_title = $image->title; +} -$string = $person_url . ' ' . elgg_echo('image:river:tagged') . ' ' . $image_url; +$tagger_link = "getURL()}\">$tagger->name"; +$tagged_link = "getURL()}\">$tagged->name"; +if (!empty($image_title)) { + $image_link = "getURL()}\">$image_title"; + $string = sprintf(elgg_echo('image:river:tagged'), $tagger_link, $tagged_link, $image_link); +} else { + $string = sprintf(elgg_echo('image:river:tagged:unknown'), $tagger_link, $tagged_link); +} echo $string; -- cgit v1.2.3