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/object/image.php | 45 ++++++++++++++----------------------------
1 file changed, 15 insertions(+), 30 deletions(-)
(limited to 'views/default/object')
diff --git a/views/default/object/image.php b/views/default/object/image.php
index dd225f02f..3b7917223 100644
--- a/views/default/object/image.php
+++ b/views/default/object/image.php
@@ -8,27 +8,15 @@
include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/lib/exif.php";
$image = $vars['entity'];
- $file_guid = $image->getGUID();
+ $image_guid = $image->getGUID();
$tags = $image->tags;
$title = $image->title;
$desc = $image->description;
$owner = $image->getOwnerEntity();
$friendlytime = friendly_time($image->time_created);
-
$mime = $image->mimetype;
-/////////////////////////////////////////////////////
-// get photo tags from database
- $photo_tags_json = "\"\"";
-
- $tag_info = $image->getPhotoTags();
- if ($tag_info) {
- $photo_tags = $tag_info['raw'];
- $photo_tags_json = $tag_info['json'];
- $photo_tag_links = $tag_info['links'];
- }
-
/********************************************************************
*
* search view of an image
@@ -39,7 +27,7 @@
if (get_input('search_viewtype') == "gallery") {
?>
-
+
getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")";
$info .= "
";
- $icon = "
";
+ echo "
";
} else {
- echo "
";
+ echo "
";
}
?>
@@ -188,19 +176,16 @@
// image menu (start tagging, download, etc.)
echo '
';
- echo elgg_view('tidypics/image_menu', array('file_guid' => $file_guid,
+ echo elgg_view('tidypics/image_menu', array('image_guid' => $image_guid,
'viewer' => $viewer,
'owner' => $owner,
- 'anytags' => $photo_tags != '',
+ 'anytags' => $image->isPhotoTagged(),
'album' => $album, ) );
echo '
';
// tagging code
if (get_plugin_setting('tagging', 'tidypics') != "disabled") {
- echo elgg_view('tidypics/tagging', array( 'photo_tags' => $photo_tags,
- 'links' => $photo_tag_links,
- 'photo_tags_json' => $photo_tags_json,
- 'file_guid' => $file_guid,
+ echo elgg_view('tidypics/tagging', array( 'image' => $image,
'viewer' => $viewer,
'owner' => $owner, ) );
}
@@ -208,7 +193,7 @@
if (get_plugin_setting('exif', 'tidypics') == "enabled") {
?>
- $file_guid)); ?>
+ $image_guid)); ?>
--
cgit v1.2.3