Adding Likes to Profile pages

What is the requirement to make likes button on profiles so other users can Like profile pages?

I tried adding button on profile, it showed button at first but than it gives white screen. I did manage to add the button to "entity menu" ( for example in members list) and worked except notification does not go out.

Anyone knows why does not work on profile page? Anyone tried before?


  • I'm starting to think it's because likes looks for the entity that got liked, isn't user an entity?

    I changed the function a bit:

    if (!$user instanceof ElggUser) { return false; } if (!$liker instanceof ElggUser) { return false; } if (!$entity instanceof ElggUser) { return false; } $title_str = $entity->name; $site = get_config('site'); $subject = elgg_echo('likes:notifications:subject', array( $liker->name, $title_str )); $body = elgg_echo('likes:notifications:body', array( $user->name, $liker->name, $title_str, $site->name, $entity->getURL(), $liker->getURL() )); notify_user($user->guid, $liker->guid, $subject, $body );

    Anyone see anything wrong with it?


  • likes/start.php ?

            // don't like users #4116
            if ($item->type == "user") {
                  return $return;

  • Thanks DDS but that is only for river menu. Tried removing that but it just adds likes on river menu for profiles.

    It actually works if I add the button to owner block menu but not if I try to add it to actions menu. Not sure why that makes difference.

    Just to confirm, User is an entity right?

  • read up likes_entity_menu_setup for the code to handle entity 'likes'.

  • Hi This Scrip Lover,

    Did you succeed to add likes on profiles?

    If yes, Can you share the detailed steps with us?

    Also, do you know a way to add likes on Group members? and users members?