diff options
Diffstat (limited to 'views/default/forms/likes/link.php')
-rw-r--r-- | views/default/forms/likes/link.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/views/default/forms/likes/link.php b/views/default/forms/likes/link.php new file mode 100644 index 000000000..decb4aa7f --- /dev/null +++ b/views/default/forms/likes/link.php @@ -0,0 +1,17 @@ +<?php +/** + * Elgg likes link form - used on riverdashboard where we want the likes link separate from the list of users that liked the object + * + * @package Elgg + * + * @uses $vars['entity'] + */ + +if (isset($vars['entity']) && isloggedin()) { + $guid = $vars['entity']->getGuid(); + $url = elgg_add_action_tokens_to_url(elgg_get_site_url() . "action/likes/add?guid={$guid}"); + //check to see if the user has already liked + if (!elgg_annotation_exists($guid, 'likes') ) { + echo "<span class='river_link_divider'> | </span><a class='river_user-like_button link' href=\"{$url}\">" . elgg_echo('likes:likethis') . "</a>"; + } +}
\ No newline at end of file |