From d253222f742b74b8fd232fa39c81c6f39e9d6b9a Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 17 May 2009 19:20:18 +0000 Subject: moved tagging from image.php to a view - make sure to refresh view cache when updating to this version --- views/default/js/tagging.php | 250 +++++++++++++++++++++++++++++++++++++ views/default/js/tidypics.php | 250 ------------------------------------- views/default/object/image.php | 80 ++++-------- views/default/tidypics/tagging.php | 57 +++++++++ 4 files changed, 330 insertions(+), 307 deletions(-) create mode 100644 views/default/js/tagging.php delete mode 100644 views/default/js/tidypics.php create mode 100644 views/default/tidypics/tagging.php (limited to 'views') diff --git a/views/default/js/tagging.php b/views/default/js/tagging.php new file mode 100644 index 000000000..323c2bf57 --- /dev/null +++ b/views/default/js/tagging.php @@ -0,0 +1,250 @@ + + + + + \ No newline at end of file diff --git a/views/default/js/tidypics.php b/views/default/js/tidypics.php deleted file mode 100644 index 323c2bf57..000000000 --- a/views/default/js/tidypics.php +++ /dev/null @@ -1,250 +0,0 @@ - - - - - \ No newline at end of file diff --git a/views/default/object/image.php b/views/default/object/image.php index aceac958b..0da55f795 100644 --- a/views/default/object/image.php +++ b/views/default/object/image.php @@ -16,7 +16,8 @@ $mime = $file->mimetype; -// photo tags +///////////////////////////////////////////////////// +// get photo tags from database $photo_tag_links = array(); $photo_tags_json = "\"\""; $photo_tags = get_annotations($file_guid,'object','image','phototag'); @@ -49,7 +50,13 @@ if ($photo_tags) { $photo_tags_json .= ']'; } - if (get_context() == "search") { //if this is the search view + +///////////////////////////////////////////////////// +// +// search view of an image +// +///////////////////////////////////////////////////// + if (get_context() == "search") { if (get_input('search_viewtype') == "gallery") { ?> @@ -72,9 +79,12 @@ if ($photo_tags) { } } else { +//////////////////////////////////////////////// +// +// simple gallery view - when is this called? +// +//////////////////////////////////////////////// if (!$vars['full']) { - -//simple gallery view ?>
thumbnail @@ -108,8 +118,8 @@ if ($photo_tags) { if($view->owner_guid == $the_viewer && $the_viewer != 0) $my_views++; } + // Build back and next links - $back = ''; $next = ''; @@ -150,7 +160,7 @@ if ($photo_tags) {
- +
'; ?> @@ -167,18 +177,13 @@ if ($photo_tags) { ?>
- -
-

- -
-
@@ -198,47 +203,8 @@ if ($photo_tags) { echo elgg_view_comments($file); echo '
'; // content wrapper -?> -
-
-
-
- -
-getGUID(), false, 'user', '', 0); - - $content = ""; - $content .= ""; - $content .= ""; - $content .= ""; - - $content .= ""; - - $content .= "
"; - - echo elgg_view('input/form', array('internalid' => 'quicksearch', 'internalname' => 'form-phototagging', 'class' => 'quicksearch', 'action' => "{$vars['url']}action/tidypics/addtag", 'body' => $content)); - -?> -
- - $photo_tags_json,) ); - } // // end of individual image display + } // end of individual image display } diff --git a/views/default/tidypics/tagging.php b/views/default/tidypics/tagging.php new file mode 100644 index 000000000..a97285016 --- /dev/null +++ b/views/default/tidypics/tagging.php @@ -0,0 +1,57 @@ + +
+

+ +
+ +
+
+
+
+
+getGUID(), false, 'user', '', 0); + + $content = ""; + $content .= ""; + $content .= ""; + $content .= ""; + + $content .= ""; + + $content .= "
"; + + echo elgg_view('input/form', array('internalid' => 'quicksearch', 'internalname' => 'form-phototagging', 'class' => 'quicksearch', 'action' => "{$vars['url']}action/tidypics/addtag", 'body' => $content)); + +?> +
+ $photo_tags_json,) ); +?> \ No newline at end of file -- cgit v1.2.3