aboutsummaryrefslogtreecommitdiff
path: root/mod/likes
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
committerSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
commite53d410129701ea1c9d19529afa493f11b5f5b70 (patch)
treed9963b24bf8932654b4a47e36602c75975e50dba /mod/likes
parent377da25d2965c64941f83baae119fc970ec60982 (diff)
parent08a962c98e2923724f8013d6eaae89101243752a (diff)
downloadelgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.gz
elgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.bz2
Merge github.com:Elgg/Elgg
Conflicts: engine/lib/input.php
Diffstat (limited to 'mod/likes')
-rw-r--r--mod/likes/languages/en.php2
-rw-r--r--mod/likes/manifest.xml9
-rw-r--r--mod/likes/start.php6
-rw-r--r--mod/likes/views/default/annotation/likes.php5
-rw-r--r--mod/likes/views/default/likes/button.php2
-rw-r--r--mod/likes/views/default/likes/count.php9
-rw-r--r--mod/likes/views/default/likes/css.php2
-rw-r--r--mod/likes/views/default/likes/js.php2
8 files changed, 25 insertions, 12 deletions
diff --git a/mod/likes/languages/en.php b/mod/likes/languages/en.php
index 29b379506..4a98d7cfe 100644
--- a/mod/likes/languages/en.php
+++ b/mod/likes/languages/en.php
@@ -25,7 +25,7 @@ $english = array(
'likes:notifications:body' =>
'Hi %1$s,
-%2$s likes your post "%3$s" on %4$s!
+%2$s likes your post "%3$s" on %4$s
See your original post here:
diff --git a/mod/likes/manifest.xml b/mod/likes/manifest.xml
index f63c643a6..62835fcf5 100644
--- a/mod/likes/manifest.xml
+++ b/mod/likes/manifest.xml
@@ -8,11 +8,10 @@
<description>Enables users to like content on the site.</description>
<website>http://www.elgg.org/</website>
<copyright>See COPYRIGHT.txt</copyright>
- <license>GNU Public License version 2</license>
+ <license>GNU General Public License version 2</license>
<requires>
- <type>elgg_version</type>
- <version>2010030101</version>
+ <type>elgg_release</type>
+ <version>1.8</version>
</requires>
<activate_on_install>true</activate_on_install>
- <admin_interface>advanced</admin_interface>
-</plugin_manifest> \ No newline at end of file
+</plugin_manifest>
diff --git a/mod/likes/start.php b/mod/likes/start.php
index 76b48a369..690d7c052 100644
--- a/mod/likes/start.php
+++ b/mod/likes/start.php
@@ -60,6 +60,12 @@ function likes_entity_menu_setup($hook, $type, $return, $params) {
function likes_river_menu_setup($hook, $type, $return, $params) {
if (elgg_is_logged_in()) {
$item = $params['item'];
+
+ // only like group creation #3958
+ if ($item->type == "group" && $item->view != "river/group/create") {
+ return $return;
+ }
+
$object = $item->getObjectEntity();
if (!elgg_in_context('widgets') && $item->annotation_id == 0) {
if ($object->canAnnotate(0, 'likes')) {
diff --git a/mod/likes/views/default/annotation/likes.php b/mod/likes/views/default/annotation/likes.php
index e1ae20818..d41522fc4 100644
--- a/mod/likes/views/default/annotation/likes.php
+++ b/mod/likes/views/default/annotation/likes.php
@@ -20,6 +20,7 @@ $user_icon = elgg_view_entity_icon($user, 'tiny');
$user_link = elgg_view('output/url', array(
'href' => $user->getURL(),
'text' => $user->name,
+ 'is_trusted' => true,
));
$likes_string = elgg_echo('likes:this');
@@ -29,9 +30,9 @@ $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' => "<span class=\"elgg-icon elgg-icon-delete right\"></span>",
+ 'text' => "<span class=\"elgg-icon elgg-icon-delete float-alt\"></span>",
'confirm' => elgg_echo('deleteconfirm'),
- 'text_encode' => false,
+ 'encode_text' => false,
));
}
diff --git a/mod/likes/views/default/likes/button.php b/mod/likes/views/default/likes/button.php
index 383e1bb63..3f2f073cc 100644
--- a/mod/likes/views/default/likes/button.php
+++ b/mod/likes/views/default/likes/button.php
@@ -20,6 +20,7 @@ if (elgg_is_logged_in() && $vars['entity']->canAnnotate(0, 'likes')) {
'text' => elgg_view_icon('thumbs-up'),
'title' => elgg_echo('likes:likethis'),
'is_action' => true,
+ 'is_trusted' => true,
);
$likes_button = elgg_view('output/url', $params);
} else {
@@ -34,6 +35,7 @@ if (elgg_is_logged_in() && $vars['entity']->canAnnotate(0, 'likes')) {
'text' => elgg_view_icon('thumbs-up-alt'),
'title' => elgg_echo('likes:remove'),
'is_action' => true,
+ 'is_trusted' => true,
);
$likes_button = elgg_view('output/url', $params);
}
diff --git a/mod/likes/views/default/likes/count.php b/mod/likes/views/default/likes/count.php
index bdc50bcd1..071a069bd 100644
--- a/mod/likes/views/default/likes/count.php
+++ b/mod/likes/views/default/likes/count.php
@@ -24,8 +24,13 @@ if ($num_of_likes) {
'href' => "#likes-$guid"
);
$list = elgg_view('output/url', $params);
- $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 class='elgg-module elgg-module-popup elgg-likes hidden clearfix' id='likes-$guid'>";
+ $list .= elgg_list_annotations(array(
+ 'guid' => $guid,
+ 'annotation_name' => 'likes',
+ 'limit' => 99,
+ 'list_class' => 'elgg-list-likes'
+ ));
$list .= "</div>";
echo $list;
}
diff --git a/mod/likes/views/default/likes/css.php b/mod/likes/views/default/likes/css.php
index fabf54e46..1ec07b366 100644
--- a/mod/likes/views/default/likes/css.php
+++ b/mod/likes/views/default/likes/css.php
@@ -7,7 +7,7 @@
/* ***************************************
Likes
*************************************** */
-.elgg-likes-list {
+.elgg-likes {
width: 345px;
position: absolute;
}
diff --git a/mod/likes/views/default/likes/js.php b/mod/likes/views/default/likes/js.php
index b7e000539..f701ebedf 100644
--- a/mod/likes/views/default/likes/js.php
+++ b/mod/likes/views/default/likes/js.php
@@ -15,7 +15,7 @@
* @return {Object}
*/
elgg.ui.likesPopupHandler = function(hook, type, params, options) {
- if (params.target.hasClass('elgg-likes-list')) {
+ if (params.target.hasClass('elgg-likes')) {
options.my = 'right bottom';
options.at = 'left top';
return options;