info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- iionly@iionly
iionly - 1 like
- hady@hady
hady - 0 likes
- iionly@iionly
iionly - 0 likes
You must log in to post replies.Modify the elggx_userpoints_annotate_create() function to check if the $object->name == "likes". If that is the case retrieve the entity getting liked (get_entity($object->entity_guid)) and then check if the owner of this entity is a friend of the logged in user. If this is the case, proceed with adding userpoints, otherwise skip it.
I checked start.php and files in elggx_userpoints/views/default/elggx_userpoints but I cannot find the owner entity logged in user file
$logged_in_user = elgg_get_logged_in_user_entity();
will fetch the user entity of the user logged in to the current session and assign in to the $logged_in_user variable.
You might want to take a look at the Elgg docs at http://learn.elgg.org/en/stable/guides/index.html to get some basic knowledge about coding Elgg plugins.