\r
$access_id = $image->getAccessID();\r
$owner_id = get_loggedin_userid();\r
+ $tagger = get_loggedin_user();\r
\r
//Save annotation\r
if ($image->annotate('phototag', serialize($tag), $access_id, $owner_id)) {\r
\r
// also add this to the river - subject is image, object is the tagged user\r
if (function_exists('add_to_river'))\r
- add_to_river('river/object/image/tag', 'tag', $image_guid, $user_id, $access_id); \r
+ add_to_river('river/object/image/tag', 'tag', $image_guid, $user_id, $access_id);\r
+ \r
+ // notify user of tagging as long as not self\r
+ if ($owner_id != $user_id)\r
+ notify_user($user_id, $owner_id, elgg_echo('tidypics:tag:subject'), \r
+ sprintf(\r
+ elgg_echo('tidypics:tag:body'),\r
+ $image->title,\r
+ $tagger->name,\r
+ $image->getURL()\r
+ )\r
+ );\r
}\r
}\r
\r
'tidypics:phototagging:success' => 'Photo tag was successfully added',\r
'tidypics:phototagging:error' => 'Unexpected error occurred during tagging',\r
'tidypics:deletetag:success' => 'Selected tags were successfully deleted',\r
+ \r
+ 'tidypics:tag:subject' => "You have been tagged in a photo",\r
+ 'tidypics:tag:body' => "You have been tagged in the photo %s by %s. \r
+ \r
+The photo can be viewed here: %s",\r
\r
\r
//rss\r