48 'href' =>
'friends/' .
$owner->username,
49 'contexts' => array(
'friends')
54 'name' =>
'friends:of',
56 'href' =>
'friendsof/' .
$owner->username,
57 'contexts' => array(
'friends')
66 'href' =>
"friends/{$viewer->username}",
85 $isFriend =
$user->isFriend();
89 'name' =>
'remove_friend',
92 'section' =>
'action',
93 'item_class' => $isFriend ?
'' :
'hidden',
97 'name' =>
'add_friend',
100 'section' =>
'action',
101 'item_class' => $isFriend ?
'hidden' :
'',
131 require_once(dirname(dirname(dirname(__FILE__))) .
"/pages/friends/index.php");
134 require_once(dirname(dirname(dirname(__FILE__))) .
"/pages/friends/of.php");
153 if (isset($page_elements[0])) {
154 switch ($page_elements[0]) {
158 require_once
"{$base}pages/friends/collections/add.php";
166 require_once
"{$base}pages/friends/collections/view.php";
187 'name' =>
'friends:view:collections',
188 'text' =>
elgg_echo(
'friends:collections'),
189 'href' =>
"collections/owner/$user->username",
190 'contexts' => array(
'friends')
215 ), $user_two->language);
221 ), $user_two->language);
227 $events->registerHandler(
'init',
'system',
'_elgg_friends_init');
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
elgg_is_logged_in()
Returns whether or not the user is currently logged in.
elgg_add_action_tokens_to_url($url, $html_encode=false)
Adds action tokens to URL.
elgg_view_icon($name, $vars=array())
View one of the elgg sprite icons.
elgg_register_plugin_hook_handler($hook, $type, $callback, $priority=500)
elgg_set_page_owner_guid($guid)
Set the guid of the entity that owns this page.
_elgg_friends_page_setup()
Register some menu items for friends UI private.
get_user_by_username($username)
Get user by username.
_elgg_collections_page_handler($page_elements)
Page handler for friends collections.
_elgg_friends_init()
Init friends library.
_elgg_friends_page_handler($segments, $handler)
Page handler for friends-related pages.
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
elgg_set_context($context)
Sets the page context.
elgg_register_page_handler($identifier, $function)
Registers a page handler for a particular identifier.
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
elgg_register_menu_item($menu_name, $menu_item)
Register an item for an Elgg menu.
elgg_register_event_handler($event, $object_type, $callback, $priority=500)
_elgg_send_friend_notification($event, $type, $object)
Notify user that someone has friended them.
_elgg_friends_setup_user_hover_menu($hook, $type, $return, $params)
Adds friending to user hover menu.
notify_user($to, $from, $subject, $message, array $params=array(), $methods_override="")
Notify a user via their preferences.
elgg_get_logged_in_user_entity()
Return the current logged in user, or null if no user is logged in.
elgg_register_action($action, $filename="", $access= 'logged_in')
Registers an action.
_elgg_setup_collections_menu()
Adds collection sidebar menu items.
elgg_get_page_owner_guid($guid=0)
Gets the guid of the entity that owns the current page.
elgg_get_logged_in_user_guid()
Return the current logged in user by guid.
get_entity($guid)
Loads and returns an entity object from a guid.