From bdb5d2b95792782ebc379e3348cad1812c1980b4 Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 9 Mar 2011 03:07:40 +0000 Subject: Fixes #3058 pulls likes out as a plugin git-svn-id: http://code.elgg.org/elgg/trunk@8639 36083f99-b078-4883-b0ff-0f9b5a30f544 --- actions/likes/add.php | 66 ------------- actions/likes/delete.php | 31 ------ engine/classes/ElggEntity.php | 18 ---- engine/lib/elgglib.php | 4 +- engine/lib/navigation.php | 38 -------- engine/lib/upgrades/2010121702.php | 10 -- engine/lib/views.php | 20 ---- languages/en.php | 20 ---- .../views/default/theme_preview/icons.php | 4 +- mod/likes/actions/likes/add.php | 64 +++++++++++++ mod/likes/actions/likes/delete.php | 29 ++++++ mod/likes/languages/en.php | 25 +++++ mod/likes/manifest.xml | 17 ++++ mod/likes/start.php | 104 +++++++++++++++++++++ mod/likes/views/default/annotation/likes.php | 48 ++++++++++ mod/likes/views/default/likes/css.php | 13 +++ mod/likes/views/default/likes/display.php | 67 +++++++++++++ .../default/river/annotation/likes/create.php | 26 ++++++ views/default/annotation/likes.php | 48 ---------- views/default/core/likes/display.php | 67 ------------- views/default/css/admin.php | 6 +- views/default/css/elements/components.php | 8 -- views/default/css/elements/icons.php | 6 +- views/default/css/ie.php | 4 - views/default/river/annotation/likes/create.php | 23 ----- 25 files changed, 402 insertions(+), 364 deletions(-) delete mode 100644 actions/likes/add.php delete mode 100644 actions/likes/delete.php delete mode 100644 engine/lib/upgrades/2010121702.php create mode 100644 mod/likes/actions/likes/add.php create mode 100644 mod/likes/actions/likes/delete.php create mode 100644 mod/likes/languages/en.php create mode 100644 mod/likes/manifest.xml create mode 100644 mod/likes/start.php create mode 100644 mod/likes/views/default/annotation/likes.php create mode 100644 mod/likes/views/default/likes/css.php create mode 100644 mod/likes/views/default/likes/display.php create mode 100644 mod/likes/views/default/river/annotation/likes/create.php delete mode 100644 views/default/annotation/likes.php delete mode 100644 views/default/core/likes/display.php delete mode 100644 views/default/river/annotation/likes/create.php diff --git a/actions/likes/add.php b/actions/likes/add.php deleted file mode 100644 index 12eed2427..000000000 --- a/actions/likes/add.php +++ /dev/null @@ -1,66 +0,0 @@ -canAnnotate(0, 'likes')) { - // plugins should register the error message to explain why liking isn't allowed - forward(REFERER); -} - -$user = elgg_get_logged_in_user_entity(); -$annotation = create_annotation($entity->guid, - 'likes', - "likes", - "", - $user->guid, - $entity->access_id); - -// tell user annotation didn't work if that is the case -if (!$annotation) { - register_error(elgg_echo("likes:failure")); - forward(REFERER); -} - -// notify if poster wasn't owner -if ($entity->owner_guid != $user->guid) { - - notify_user($entity->owner_guid, - $user->guid, - elgg_echo('likes:email:subject'), - elgg_echo('likes:email:body', array( - $user->name, - $entity->title, - //$comment_text, - $entity->getURL(), - $user->name, - $user->getURL() - )) - ); -} - -system_message(elgg_echo("likes:likes")); - -//add to river -add_to_river('annotation/annotatelike', 'likes', $user->guid, $entity->guid, "", 0, $annotation); - -// Forward back to the page where the user 'liked' the object -forward(REFERER); diff --git a/actions/likes/delete.php b/actions/likes/delete.php deleted file mode 100644 index 7d535052d..000000000 --- a/actions/likes/delete.php +++ /dev/null @@ -1,31 +0,0 @@ -entity_guid); - - if ($likes->canEdit()) { - $likes->delete(); - system_message(elgg_echo("likes:deleted")); - forward(REFERER); - } - -} else { - $url = ""; -} - -register_error(elgg_echo("likes:notdeleted")); -forward(REFERER); \ No newline at end of file diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php index 69401a7e5..bfb7ce063 100644 --- a/engine/classes/ElggEntity.php +++ b/engine/classes/ElggEntity.php @@ -843,24 +843,6 @@ abstract class ElggEntity extends ElggData implements } } - /** - * Count how many people have liked this entity. - * - * @return int Number of likes - * @since 1.8.0 - */ - function countLikes() { - $type = $this->getType(); - $params = array('entity' => $this); - $number = elgg_trigger_plugin_hook('likes:count', $type, $params, false); - - if ($number) { - return $number; - } else { - return $this->getAnnotationCalculation('likes', 'count'); - } - } - /** * Gets an array of entities with a relationship to this entity. * diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 3cc4ddb1d..c97fa433c 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -1795,7 +1795,7 @@ function elgg_walled_garden() { /** * Elgg's main init. * - * Handles core actions for comments and likes, the JS pagehandler, and the shutdown function. + * Handles core actions for comments, the JS pagehandler, and the shutdown function. * * @elgg_event_handler init system * @return void @@ -1805,8 +1805,6 @@ function elgg_init() { elgg_register_action('comments/add'); elgg_register_action('comments/delete'); - elgg_register_action('likes/add'); - elgg_register_action('likes/delete'); elgg_register_page_handler('js', 'js_page_handler'); elgg_register_page_handler('css', 'css_page_handler'); diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php index b79156986..8c71de03a 100644 --- a/engine/lib/navigation.php +++ b/engine/lib/navigation.php @@ -226,35 +226,6 @@ function elgg_river_menu_setup($hook, $type, $return, $params) { ); $return[] = ElggMenuItem::factory($options); } - - // like this - if ($object->canAnnotate(0, 'likes')) { - if (!elgg_annotation_exists($object->getGUID(), 'likes')) { - $url = "action/likes/add?guid={$object->getGUID()}"; - $options = array( - 'name' => 'like', - 'href' => $url, - 'text' => elgg_echo('likes:likethis'), - 'is_action' => true, - 'priority' => 100, - ); - } else { - $likes = elgg_get_annotations(array( - 'guid' => $guid, - 'annotation_name' => 'likes', - 'owner_guid' => elgg_get_logged_in_user_guid() - )); - $url = elgg_get_site_url() . "action/likes/delete?annotation_id={$likes[0]->id}"; - $options = array( - 'name' => 'like', - 'href' => $url, - 'text' => elgg_echo('likes:remove'), - 'is_action' => true, - 'priority' => 100, - ); - } - $return[] = ElggMenuItem::factory($options); - } } } @@ -303,15 +274,6 @@ function elgg_entity_menu_setup($hook, $type, $return, $params) { $return[] = ElggMenuItem::factory($options); } - // likes - $options = array( - 'name' => 'likes', - 'text' => elgg_view_likes($entity), - 'href' => false, - 'priority' => 1000, - ); - $return[] = ElggMenuItem::factory($options); - return $return; } diff --git a/engine/lib/upgrades/2010121702.php b/engine/lib/upgrades/2010121702.php deleted file mode 100644 index 1c4a931b1..000000000 --- a/engine/lib/upgrades/2010121702.php +++ /dev/null @@ -1,10 +0,0 @@ -dbprefix}river - SET view='river/annotation/likes/create', action_type='create' - WHERE view='annotation/annotatelike' AND action_type='likes'"; -update_data($query); - diff --git a/engine/lib/views.php b/engine/lib/views.php index 09325c2c0..905458a9a 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -1124,26 +1124,6 @@ function elgg_view_latest_comments($owner_guid, $type = 'object', $subtype = '', return elgg_view_module('aside', $title, $body); } -/** - * Returns the HTML for "likes" on entities. - * - * @param ElggEntity $entity The entity to like - * - * @return string|false The HTML for the likes, or false on failure - * - * @since 1.8.0 - * @see @elgg_view core/likes/display - */ -function elgg_view_likes($entity) { - if (!($entity instanceof ElggEntity)) { - return false; - } - - $params = array('entity' => $entity); - - return elgg_view('core/likes/display', $params); -} - /** * Wrapper function for the image block display pattern. * diff --git a/languages/en.php b/languages/en.php index f827c6d51..5393c356a 100644 --- a/languages/en.php +++ b/languages/en.php @@ -708,7 +708,6 @@ $english = array( 'river:select' => 'Show %s', 'river:comments:more' => '+%u more', 'river:generic_comment' => 'commented on %s %s', - 'river:likes' => 'likes %s %s', 'members:label:newest' => 'Newest', 'members:label:popular' => 'Popular', @@ -986,25 +985,6 @@ If you requested this click on the link below, otherwise ignore this email. */ 'xmlrpc:noinputdata' => "Input data missing", -/** - * Likes - **/ - 'likes:this' => 'liked this', - 'likes:deleted' => 'Your like has been removed', - 'likes:see' => 'See who liked this', - 'likes:remove' => 'Unlike this', - 'likes:notdeleted' => 'There was a problem removing your like', - 'likes:likes' => 'You now like this item', - 'likes:failure' => 'There was a problem liking this item', - 'likes:alreadyliked' => 'You have already liked this item', - 'likes:notfound' => 'The item you are trying to like cannot be found', - 'likes:likethis' => 'Like this', - 'likes:userlikedthis' => 'user liked this', - 'likes:userslikedthis' => 'users like this', - 'likes:river:annotate' => 'likes', - 'likes:email:body' => '%s liked %s', - 'likes:email:subject' => 'A user liked one of your objects', - /** * Comments */ diff --git a/mod/developers/views/default/theme_preview/icons.php b/mod/developers/views/default/theme_preview/icons.php index be444adb8..8178a9da7 100644 --- a/mod/developers/views/default/theme_preview/icons.php +++ b/mod/developers/views/default/theme_preview/icons.php @@ -15,8 +15,8 @@ 'friends' => 'Friends', 'help' => 'Help', 'delete' => 'Delete', - 'likes' => 'Likes', - 'liked' => 'Liked', + 'thumbs-up' => 'Thumbs Up', + 'thumbs-up-alt' => 'Thumbs Up Alternate', 'following' => 'Following', 'dragger' => 'Dragger', 'rss' => 'RSS', diff --git a/mod/likes/actions/likes/add.php b/mod/likes/actions/likes/add.php new file mode 100644 index 000000000..f56493864 --- /dev/null +++ b/mod/likes/actions/likes/add.php @@ -0,0 +1,64 @@ +canAnnotate(0, 'likes')) { + // plugins should register the error message to explain why liking isn't allowed + forward(REFERER); +} + +$user = elgg_get_logged_in_user_entity(); +$annotation = create_annotation($entity->guid, + 'likes', + "likes", + "", + $user->guid, + $entity->access_id); + +// tell user annotation didn't work if that is the case +if (!$annotation) { + register_error(elgg_echo("likes:failure")); + forward(REFERER); +} + +// notify if poster wasn't owner +if ($entity->owner_guid != $user->guid) { + + notify_user($entity->owner_guid, + $user->guid, + elgg_echo('likes:email:subject'), + elgg_echo('likes:email:body', array( + $user->name, + $entity->title, + //$comment_text, + $entity->getURL(), + $user->name, + $user->getURL() + )) + ); +} + +system_message(elgg_echo("likes:likes")); + +//add to river +add_to_river('annotation/annotatelike', 'likes', $user->guid, $entity->guid, "", 0, $annotation); + +// Forward back to the page where the user 'liked' the object +forward(REFERER); diff --git a/mod/likes/actions/likes/delete.php b/mod/likes/actions/likes/delete.php new file mode 100644 index 000000000..867d5dfef --- /dev/null +++ b/mod/likes/actions/likes/delete.php @@ -0,0 +1,29 @@ +entity_guid); + + if ($likes->canEdit()) { + $likes->delete(); + system_message(elgg_echo("likes:deleted")); + forward(REFERER); + } + +} else { + $url = ""; +} + +register_error(elgg_echo("likes:notdeleted")); +forward(REFERER); \ No newline at end of file diff --git a/mod/likes/languages/en.php b/mod/likes/languages/en.php new file mode 100644 index 000000000..52e2d4160 --- /dev/null +++ b/mod/likes/languages/en.php @@ -0,0 +1,25 @@ + 'liked this', + 'likes:deleted' => 'Your like has been removed', + 'likes:see' => 'See who liked this', + 'likes:remove' => 'Unlike this', + 'likes:notdeleted' => 'There was a problem removing your like', + 'likes:likes' => 'You now like this item', + 'likes:failure' => 'There was a problem liking this item', + 'likes:alreadyliked' => 'You have already liked this item', + 'likes:notfound' => 'The item you are trying to like cannot be found', + 'likes:likethis' => 'Like this', + 'likes:userlikedthis' => 'user liked this', + 'likes:userslikedthis' => 'users like this', + 'likes:river:annotate' => 'likes', + 'likes:email:body' => '%s liked %s', + 'likes:email:subject' => 'A user liked one of your objects', + 'river:likes' => 'likes %s %s', +); + +add_translation('en', $english); diff --git a/mod/likes/manifest.xml b/mod/likes/manifest.xml new file mode 100644 index 000000000..abd3f7c76 --- /dev/null +++ b/mod/likes/manifest.xml @@ -0,0 +1,17 @@ + + + Likes + Core developers + 1.8 + bundled + Enables users to like content on the site. + http://www.elgg.org/ + See COPYRIGHT.txt + GNU Public License version 2 + + elgg_version + 2010030101 + + true + advanced + \ No newline at end of file diff --git a/mod/likes/start.php b/mod/likes/start.php new file mode 100644 index 000000000..97823087a --- /dev/null +++ b/mod/likes/start.php @@ -0,0 +1,104 @@ + 'likes', + 'text' => elgg_view('likes/display', array('entity' => $entity)), + 'href' => false, + 'priority' => 1000, + ); + $return[] = ElggMenuItem::factory($options); + + return $return; +} + +/** + * Add a like button to river actions + */ +function likes_river_menu_setup($hook, $type, $return, $params) { + if (elgg_is_logged_in()) { + $item = $params['item']; + $object = $item->getObjectEntity(); + if (!elgg_in_context('widgets') && $item->annotation_id == 0) { + if ($object->canAnnotate(0, 'likes')) { + if (!elgg_annotation_exists($object->getGUID(), 'likes')) { + // user has not liked this yet + $url = "action/likes/add?guid={$object->getGUID()}"; + $options = array( + 'name' => 'like', + 'href' => $url, + 'text' => elgg_echo('likes:likethis'), + 'is_action' => true, + 'priority' => 100, + ); + } else { + // user has liked this + $likes = elgg_get_annotations(array( + 'guid' => $guid, + 'annotation_name' => 'likes', + 'owner_guid' => elgg_get_logged_in_user_guid() + )); + $url = elgg_get_site_url() . "action/likes/delete?annotation_id={$likes[0]->id}"; + $options = array( + 'name' => 'like', + 'href' => $url, + 'text' => elgg_echo('likes:remove'), + 'is_action' => true, + 'priority' => 100, + ); + } + $return[] = ElggMenuItem::factory($options); + } + } + } + + return $return; +} + +/** + * Count how many people have liked an entity. + * + * @param ElggEntity $entity + * + * @return int Number of likes + */ +function likes_count($entity) { + $type = $entity->getType(); + $params = array('entity' => $entity); + $number = elgg_trigger_plugin_hook('likes:count', $type, $params, false); + + if ($number) { + return $number; + } else { + return $entity->countAnnotations('likes'); + } +} diff --git a/mod/likes/views/default/annotation/likes.php b/mod/likes/views/default/annotation/likes.php new file mode 100644 index 000000000..e1ae20818 --- /dev/null +++ b/mod/likes/views/default/annotation/likes.php @@ -0,0 +1,48 @@ +getOwnerEntity(); +if (!$user) { + return true; +} + +$user_icon = elgg_view_entity_icon($user, 'tiny'); +$user_link = elgg_view('output/url', array( + 'href' => $user->getURL(), + 'text' => $user->name, +)); + +$likes_string = elgg_echo('likes:this'); + +$friendlytime = elgg_view_friendly_time($like->time_created); + +if ($like->canEdit()) { + $delete_button = elgg_view("output/confirmlink",array( + 'href' => "action/likes/delete?annotation_id={$like->id}", + 'text' => "", + 'confirm' => elgg_echo('deleteconfirm'), + 'text_encode' => false, + )); +} + +$body = << + $delete_button + $user_link $likes_string + + $friendlytime + +

+HTML; + +echo elgg_view_image_block($user_icon, $body); diff --git a/mod/likes/views/default/likes/css.php b/mod/likes/views/default/likes/css.php new file mode 100644 index 000000000..cb0334b7c --- /dev/null +++ b/mod/likes/views/default/likes/css.php @@ -0,0 +1,13 @@ + + +/* *************************************** + Likes +*************************************** */ +.elgg-likes-list { + width: 345px; + position: absolute; +} diff --git a/mod/likes/views/default/likes/display.php b/mod/likes/views/default/likes/display.php new file mode 100644 index 000000000..00f6c5a34 --- /dev/null +++ b/mod/likes/views/default/likes/display.php @@ -0,0 +1,67 @@ +getGUID(); + +// check to see if the user has already liked this +if (elgg_is_logged_in() && $vars['entity']->canAnnotate(0, 'likes')) { + if (!elgg_annotation_exists($guid, 'likes')) { + $url = elgg_get_site_url() . "action/likes/add?guid={$guid}"; + $params = array( + 'href' => $url, + 'text' => elgg_view_icon('thumbs-up'), + 'title' => elgg_echo('likes:likethis'), + 'is_action' => true, + ); + $likes_button = elgg_view('output/url', $params); + } else { + $options = array( + 'guid' => $guid, + 'annotation_name' => 'likes', + 'owner_guid' => elgg_get_logged_in_user_guid() + ); + $likes = elgg_get_annotations($options); + $url = elgg_get_site_url() . "action/likes/delete?annotation_id={$likes[0]->id}"; + $params = array( + 'href' => $url, + 'text' => elgg_view_icon('thumbs-up-alt'), + 'title' => elgg_echo('likes:remove'), + 'is_action' => true, + ); + $likes_button = elgg_view('output/url', $params); + } +} + +$list = ''; +$num_of_likes = likes_count($vars['entity']); +if ($num_of_likes) { + // display the number of likes + if ($num_of_likes == 1) { + $likes_string = elgg_echo('likes:userlikedthis'); + } else { + $likes_string = elgg_echo('likes:userslikedthis'); + } + $params = array( + 'text' => "$num_of_likes $likes_string", + 'title' => elgg_echo('likes:see'), + 'class' => 'elgg-popup-rb-at-lt', + 'rel' => 'popup', + 'href' => "#$guid-likes" + ); + $list = elgg_view('output/url', $params); + $list .= ""; +} + +echo elgg_view_image_block($likes_button, $list); \ No newline at end of file diff --git a/mod/likes/views/default/river/annotation/likes/create.php b/mod/likes/views/default/river/annotation/likes/create.php new file mode 100644 index 000000000..463fe5049 --- /dev/null +++ b/mod/likes/views/default/river/annotation/likes/create.php @@ -0,0 +1,26 @@ +getObjectEntity(); +$comment = $vars['item']->getAnnotation(); + +$url = $object->getURL(); +$title = $object->title; +if (!$title) { + $title = elgg_echo('untitled'); +} +$params = array( + 'href' => $object->getURL(), + 'text' => $title, +); +$object_link = elgg_view('output/url', $params); + +$type = $object->getType(); +$subtype = $object->getSubtype(); + +$type_string = elgg_echo("river:commented:$type:$subtype"); +echo elgg_echo('river:likes', array($type_string, $object_link)); diff --git a/views/default/annotation/likes.php b/views/default/annotation/likes.php deleted file mode 100644 index e1ae20818..000000000 --- a/views/default/annotation/likes.php +++ /dev/null @@ -1,48 +0,0 @@ -getOwnerEntity(); -if (!$user) { - return true; -} - -$user_icon = elgg_view_entity_icon($user, 'tiny'); -$user_link = elgg_view('output/url', array( - 'href' => $user->getURL(), - 'text' => $user->name, -)); - -$likes_string = elgg_echo('likes:this'); - -$friendlytime = elgg_view_friendly_time($like->time_created); - -if ($like->canEdit()) { - $delete_button = elgg_view("output/confirmlink",array( - 'href' => "action/likes/delete?annotation_id={$like->id}", - 'text' => "", - 'confirm' => elgg_echo('deleteconfirm'), - 'text_encode' => false, - )); -} - -$body = << - $delete_button - $user_link $likes_string - - $friendlytime - -

-HTML; - -echo elgg_view_image_block($user_icon, $body); diff --git a/views/default/core/likes/display.php b/views/default/core/likes/display.php deleted file mode 100644 index b04630e95..000000000 --- a/views/default/core/likes/display.php +++ /dev/null @@ -1,67 +0,0 @@ -getGUID(); - -// check to see if the user has already liked this -if (elgg_is_logged_in() && $vars['entity']->canAnnotate(0, 'likes')) { - if (!elgg_annotation_exists($guid, 'likes')) { - $url = elgg_get_site_url() . "action/likes/add?guid={$guid}"; - $params = array( - 'href' => $url, - 'text' => elgg_view_icon('likes'), - 'title' => elgg_echo('likes:likethis'), - 'is_action' => true, - ); - $likes_button = elgg_view('output/url', $params); - } else { - $options = array( - 'guid' => $guid, - 'annotation_name' => 'likes', - 'owner_guid' => elgg_get_logged_in_user_guid() - ); - $likes = elgg_get_annotations($options); - $url = elgg_get_site_url() . "action/likes/delete?annotation_id={$likes[0]->id}"; - $params = array( - 'href' => $url, - 'text' => elgg_view_icon('liked'), - 'title' => elgg_echo('likes:remove'), - 'is_action' => true, - ); - $likes_button = elgg_view('output/url', $params); - } -} - -$list = ''; -$num_of_likes = $vars['entity']->countLikes(); -if ($num_of_likes) { - // display the number of likes - if ($num_of_likes == 1) { - $likes_string = elgg_echo('likes:userlikedthis'); - } else { - $likes_string = elgg_echo('likes:userslikedthis'); - } - $params = array( - 'text' => "$num_of_likes $likes_string", - 'title' => elgg_echo('likes:see'), - 'class' => 'elgg-popup-rb-at-lt', - 'rel' => 'popup', - 'href' => "#$guid-likes" - ); - $list = elgg_view('output/url', $params); - $list .= ""; -} - -echo elgg_view_image_block($likes_button, $list); \ No newline at end of file diff --git a/views/default/css/admin.php b/views/default/css/admin.php index 0da86967b..5d921021a 100644 --- a/views/default/css/admin.php +++ b/views/default/css/admin.php @@ -1169,15 +1169,15 @@ ul.admin_plugins { .elgg-icon-delete:hover { background-position: -199px -15px; } -.elgg-icon-likes { +.elgg-icon-thumbs-up { background-position: 0px -101px; width: 20px; height: 20px; } -.elgg-icon-likes:hover { +.elgg-icon-thumbs-up:hover { background-position: 0px -131px; } -.elgg-icon-liked { +.elgg-icon-thumbs-up-alt { background-position: 0px -131px; width: 20px; height: 20px; diff --git a/views/default/css/elements/components.php b/views/default/css/elements/components.php index 5818c4bf9..f44d1ce7d 100644 --- a/views/default/css/elements/components.php +++ b/views/default/css/elements/components.php @@ -251,14 +251,6 @@ margin: 0 0 0 10px; } -/* *************************************** - Likes -*************************************** */ -.elgg-likes-list { - width: 345px; - position: absolute; -} - /* *************************************** Tags *************************************** */ diff --git a/views/default/css/elements/icons.php b/views/default/css/elements/icons.php index 68a38ed9a..64a1d78ca 100644 --- a/views/default/css/elements/icons.php +++ b/views/default/css/elements/icons.php @@ -38,15 +38,15 @@ .elgg-icon-delete:hover { background-position: -199px -15px; } -.elgg-icon-likes { +.elgg-icon-thumbs-up { background-position: 0px -101px; width: 20px; height: 20px; } -.elgg-icon-likes:hover { +.elgg-icon-thumbs-up:hover { background-position: 0px -131px; } -.elgg-icon-liked { +.elgg-icon-thumbs-up-alt { background-position: 0px -131px; width: 20px; height: 20px; diff --git a/views/default/css/ie.php b/views/default/css/ie.php index 32e7a77aa..6760d3886 100644 --- a/views/default/css/ie.php +++ b/views/default/css/ie.php @@ -24,10 +24,6 @@ text-align: right; } -.likes-list {display:none;} -.likes-list-holder .likes-list {top:20px !important;} /* position likes list below link in IE to prevent clipping */ -.elgg-likes-user .entity-metadata .elgg-button-delete {float:none;} - /* profile */ .elgg-tabs.profile .profile_name {margin-left: -260px;} #profile_content .river_comment_form.hidden .input-text { width:510px; } diff --git a/views/default/river/annotation/likes/create.php b/views/default/river/annotation/likes/create.php deleted file mode 100644 index 374f4a381..000000000 --- a/views/default/river/annotation/likes/create.php +++ /dev/null @@ -1,23 +0,0 @@ -getObjectEntity(); -$comment = $vars['item']->getAnnotation(); - -$url = $object->getURL(); -$title = $object->title; -if (!$title) { - $title = elgg_echo('untitled'); -} -$params = array( - 'href' => $object->getURL(), - 'text' => $title, -); -$object_link = elgg_view('output/url', $params); - -$type = $object->getType(); -$subtype = $object->getSubtype(); - -$type_string = elgg_echo("river:commented:$type:$subtype"); -echo elgg_echo('river:likes', array($type_string, $object_link)); -- cgit v1.2.3