making user points for liking only friends content

making user points for liking only friends content

  • 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.

Performance and Scalability

Performance and Scalability

If you've got a need for speed, this group is for you.