]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
tags go to river now
authorCash Costello <cash.costello@gmail.com>
Sun, 2 Aug 2009 23:44:40 +0000 (23:44 +0000)
committerCash Costello <cash.costello@gmail.com>
Sun, 2 Aug 2009 23:44:40 +0000 (23:44 +0000)
actions/addtag.php
graphics/icons/river_icon_tag.gif [new file with mode: 0644]
languages/en.php
views/default/river/object/image/tag.php [new file with mode: 0644]
views/default/tidypics/css.php

index fb299dee681fd74e3134469cebb3e88457c4401b..fa2b4b3c6f891b1c0468ef3ce431e8a8e772f3e8 100644 (file)
        if ($image->annotate('phototag', serialize($tag), $access_id, $owner_id)) {\r
                // if tag is a user id, add relationship for searching (find all images with user x)\r
                if ($relationships_type === 'user') {\r
-                       if (!check_entity_relationship($user_id, 'phototag', $image_guid))\r
+                       if (!check_entity_relationship($user_id, 'phototag', $image_guid)) {\r
                                add_entity_relationship($user_id, 'phototag', $image_guid);\r
+                               \r
+                               // also add this to the river\r
+                               if (function_exists('add_to_river'))\r
+                                       add_to_river('river/object/image/tag', 'tag', $image_guid, $user_id); // subject is image\r
+                       }\r
                }\r
        \r
                system_message(elgg_echo("tidypics:phototagging:success"));\r
diff --git a/graphics/icons/river_icon_tag.gif b/graphics/icons/river_icon_tag.gif
new file mode 100644 (file)
index 0000000..5106961
Binary files /dev/null and b/graphics/icons/river_icon_tag.gif differ
index 6890ddfd8f8d17e1e1bd3c964de4be7c6a7cfebc..de8a22db2226c3eefa64d3cd2e8b35857f7af23a 100644 (file)
                //  river\r
 \r
                        //images\r
-                       'image:river:created' => "%s added the image %s to album %s",\r
-                       'image:river:item' => "an image",\r
-                       'image:river:annotate' => "a comment on the image",\r
+                       'image:river:created' => "%s added the photo %s to album %s",\r
+                       'image:river:item' => "an photo",\r
+                       'image:river:annotate' => "a comment on the photo",\r
+                       'image:river:tagged' => "was tagged in the photo",\r
 \r
                        //albums\r
                        'album:river:created' => "%s created a new photo album",\r
diff --git a/views/default/river/object/image/tag.php b/views/default/river/object/image/tag.php
new file mode 100644 (file)
index 0000000..cfe01e4
--- /dev/null
@@ -0,0 +1,20 @@
+<?php\r
+\r
+       $image = get_entity($vars['item']->subject_guid);\r
+       $person_tagged = get_entity($vars['item']->object_guid);\r
+       if($image->title) {\r
+               $title = $image->title;\r
+       } else {\r
+               $title = "untitled";\r
+       }\r
+       \r
+       \r
+       \r
+       $image_url = "<a href=\"{$image->getURL()}\">{$title}</a>";\r
+       $person_url = "<a href=\"{$person_tagged->getURL()}\">{$person_tagged->name}</a>";\r
+       \r
+       $string = $person_url . ' ' . elgg_echo('image:river:tagged') . ' ' . $image_url;\r
+       \r
+       echo $string;\r
+\r
+?>
\ No newline at end of file
index a68ff22f01dfd0802200ed142413519528cb2ce8..66d42c22a4302df20581a6ebffe05117ed3528cd 100644 (file)
@@ -175,6 +175,10 @@ padding:0 0 5px;
        background: url(<?php echo $vars['url']; ?>_graphics/river_icons/river_icon_comment.gif) no-repeat left -1px;
 }
 
+.river_user_tag {
+       background: url(<?php echo $vars['url']; ?>mod/tidypics/graphics/icons/river_icon_tag.gif) no-repeat left -1px;
+}}
+
 /* ----------- tagging ---------------- */
 #tidypics_tag_instructions {
 background:#BBDAF7;