getGuid(); $url = elgg_add_action_tokens_to_url(elgg_get_site_url() . "action/likes/add?guid={$guid}"); echo ""; //check to see if the user has already liked if (!elgg_annotation_exists($guid, 'likes') ) { echo "" . elgg_echo('likes:likethis') . ""; $likes_classname = "not-liked"; $likes_titletag = ""; } else { $likes_titletag = "title='".elgg_echo('likes:remove')."'"; } //display the number of likes $numoflikes = elgg_count_likes($vars['entity']); if ($numoflikes != 0) { if ($numoflikes == 1) { $user_string = elgg_echo('likes:userlikedthis'); } else { $user_string = elgg_echo('likes:userslikedthis'); } echo "" . elgg_count_likes($vars['entity']) . " " . $user_string . ""; //show the users who liked the object echo ""; } echo ""; }