aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/likes/languages/en.php4
-rw-r--r--mod/likes/views/default/likes/display.php14
2 files changed, 9 insertions, 9 deletions
diff --git a/mod/likes/languages/en.php b/mod/likes/languages/en.php
index 52e2d4160..aad2a7f24 100644
--- a/mod/likes/languages/en.php
+++ b/mod/likes/languages/en.php
@@ -14,8 +14,8 @@ $english = array(
'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:userlikedthis' => '%s like',
+ 'likes:userslikedthis' => '%s likes',
'likes:river:annotate' => 'likes',
'likes:email:body' => '%s liked %s',
'likes:email:subject' => 'A user liked one of your objects',
diff --git a/mod/likes/views/default/likes/display.php b/mod/likes/views/default/likes/display.php
index 97a0f89d7..cbfe46078 100644
--- a/mod/likes/views/default/likes/display.php
+++ b/mod/likes/views/default/likes/display.php
@@ -2,8 +2,6 @@
/**
* Elgg likes display
*
- * @package Elgg
- *
* @uses $vars['entity']
*/
@@ -42,17 +40,20 @@ if (elgg_is_logged_in() && $vars['entity']->canAnnotate(0, 'likes')) {
}
}
+echo $likes_button;
+
$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');
+ $likes_string = elgg_echo('likes:userlikedthis', array($num_of_likes));
} else {
- $likes_string = elgg_echo('likes:userslikedthis');
+ $likes_string = elgg_echo('likes:userslikedthis', array($num_of_likes));
}
$params = array(
- 'text' => "$num_of_likes $likes_string",
+ 'text' => $likes_string,
'title' => elgg_echo('likes:see'),
'rel' => 'popup',
'href' => "#likes-$guid"
@@ -61,6 +62,5 @@ if ($num_of_likes) {
$list .= "<div class='elgg-module elgg-module-popup elgg-likes-list hidden clearfix' id='likes-$guid'>";
$list .= elgg_list_annotations(array('guid' => $guid, 'annotation_name' => 'likes', 'limit' => 99));
$list .= "</div>";
+ echo $list;
}
-
-echo elgg_view_image_block($likes_button, $list); \ No newline at end of file