From 31a654b61284e0f848645aeb436d0335bc765abf Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Tue, 25 Aug 2009 12:03:29 +0000 Subject: cleaned up tagging views to better integrate with image class --- views/default/tidypics/image_menu.php | 2 +- views/default/tidypics/tagging.php | 30 ++++++++++++++++++------------ 2 files changed, 19 insertions(+), 13 deletions(-) (limited to 'views/default/tidypics') diff --git a/views/default/tidypics/image_menu.php b/views/default/tidypics/image_menu.php index d6568360c..afbb34f21 100644 --- a/views/default/tidypics/image_menu.php +++ b/views/default/tidypics/image_menu.php @@ -10,7 +10,7 @@ * **************************************************************************/ - $image_guid = $vars['file_guid']; + $image_guid = $vars['image_guid']; $viewer = $vars['viewer']; $owner = $vars['owner']; $anytags = $vars['anytags']; diff --git a/views/default/tidypics/tagging.php b/views/default/tidypics/tagging.php index f911fe217..7062d942a 100644 --- a/views/default/tidypics/tagging.php +++ b/views/default/tidypics/tagging.php @@ -1,20 +1,26 @@ getPhotoTags(); + + // defining json text as "" makes sure the tagging javascript code doesn't throw errors if no tags + $photo_tags_json = "\"\""; + if ($tag_info) { + $photo_tags_json = $tag_info['json']; + } - if ($photo_tags) { + if ($tag_info) { ?>

@@ -41,7 +47,7 @@ ksort($friend_array); $content = "
"; - $content .= ""; + $content .= ""; $content .= ""; $content .= ""; $content .= ""; @@ -66,11 +72,11 @@

"; - foreach ($links as $id => $text) { + if ($tag_info) { + $content = ""; + foreach ($tag_info['links'] as $id => $link) { $name = "tags[{$id}]"; - $content .= elgg_view("input/checkboxes", array('options' => array($text[0] => $text[0]), 'internalname' => $name, 'value' => '' )); + $content .= elgg_view("input/checkboxes", array('options' => array($link['text'] => $link['text']), 'internalname' => $name, 'value' => '' )); } $content .= ""; -- cgit v1.2.3