|
|
|
@ -655,6 +655,10 @@ class SocialManager extends UserManager { |
|
|
|
|
*/ |
|
|
|
|
public static function show_social_menu($show = '', $group_id = 0, $user_id = 0, $show_full_profile = false) { |
|
|
|
|
|
|
|
|
|
if (empty($user_id)) { |
|
|
|
|
$user_id = api_get_user_id(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$img_array = UserManager::get_user_picture_path_by_id($user_id,'web',true,true); |
|
|
|
|
$big_image = UserManager::get_picture_user($user_id, $img_array['file'],'', USER_IMAGE_SIZE_BIG); |
|
|
|
|
|
|
|
|
@ -673,10 +677,7 @@ class SocialManager extends UserManager { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
echo '<div class="social-menu">'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//--- User image |
|
|
|
|
echo '<div class="social-content-image">'; |
|
|
|
|
echo '<div class="social-background-content" onmouseout="hide_icon_edit()" onmouseover="show_icon_edit()"><center>'; |
|
|
|
@ -713,24 +714,21 @@ class SocialManager extends UserManager { |
|
|
|
|
echo '</ul></li>'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// why this link was hide? |
|
|
|
|
//if ($show == 'invitations') { |
|
|
|
|
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('mail.png',get_lang('Invitations'),array('hspace'=>'6')).'<span class="'.($show=='invitations'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Invitations').'</span></a></li>'; |
|
|
|
|
//} |
|
|
|
|
|
|
|
|
|
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('shared_profile.png',get_lang('ViewMySharedProfile'),array('hspace'=>'6')).'<span class="'.($show=='shared_profile'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('ViewMySharedProfile').'</span></a></li> |
|
|
|
|
<li><a href="'.api_get_path(WEB_PATH).'main/social/friends.php">'.Display::return_icon('members.gif',get_lang('Friends'),array('hspace'=>'6')).'<span class="'.($show=='friends'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Friends').'</span></a></li> |
|
|
|
|
<li><a href="'.api_get_path(WEB_PATH).'main/social/groups.php">'.Display::return_icon('group.gif',get_lang('Groups'),array('hspace'=>'6')).'<span class="'.($show=='groups'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Groups').'</span></a></li>'; |
|
|
|
|
//Invitations |
|
|
|
|
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('mail.png',get_lang('Invitations'),array('hspace'=>'6')).'<span class="'.($show=='invitations'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Invitations').'</span></a></li>'; |
|
|
|
|
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('shared_profile.png',get_lang('ViewMySharedProfile'),array('hspace'=>'6')).'<span class="'.($show=='shared_profile'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('ViewMySharedProfile').'</span></a></li> |
|
|
|
|
<li><a href="'.api_get_path(WEB_PATH).'main/social/friends.php">'.Display::return_icon('members.gif',get_lang('Friends'),array('hspace'=>'6')).'<span class="'.($show=='friends'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Friends').'</span></a></li> |
|
|
|
|
<li><a href="'.api_get_path(WEB_PATH).'main/social/groups.php">'.Display::return_icon('group.gif',get_lang('Groups'),array('hspace'=>'6')).'<span class="'.($show=='groups'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Groups').'</span></a></li>'; |
|
|
|
|
|
|
|
|
|
if (in_array($show,$show_groups)) { |
|
|
|
|
echo '<li><ul>'; |
|
|
|
|
echo $create_group_item; |
|
|
|
|
echo '<li class="social-menu-sub-level" style="background:none;padding:0px"><a href="'.api_get_path(WEB_PATH).'main/social/groups.php?view=mygroups">'.Display::return_icon('group.gif',get_lang('MyGroups'),array('hspace'=>'6')).'<span class="'.($show=='mygroups'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('MyGroups').'</span></a></li>'; |
|
|
|
|
echo '</ul></li>'; |
|
|
|
|
} |
|
|
|
|
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/search.php">'.Display::return_icon('search.gif',get_lang('Search'),array('hspace'=>'6')).'<span class="'.($show=='search'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Search').'</span></a></li> |
|
|
|
|
</ul> |
|
|
|
|
</div>'; |
|
|
|
|
} |
|
|
|
|
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/search.php">'.Display::return_icon('search.gif',get_lang('Search'),array('hspace'=>'6')).'<span class="'.($show=='search'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Search').'</span></a></li> |
|
|
|
|
</ul> |
|
|
|
|
</div>'; |
|
|
|
|
|
|
|
|
|
if (in_array($show, $show_groups) && !empty($group_id)) { |
|
|
|
|
echo GroupPortalManager::show_group_column_information($group_id, api_get_user_id(), $show); |
|
|
|
@ -738,46 +736,44 @@ class SocialManager extends UserManager { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ($show == 'shared_profile') { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($user_id != intval(api_get_user_id())) { |
|
|
|
|
$user_info = api_get_user_info($user_id); |
|
|
|
|
echo '<div><center><strong>'.api_get_person_name($user_info['firstName'], $user_info['lastName']).'</strong></center></div><br />'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($show_full_profile && $user_id == intval(api_get_user_id())) { |
|
|
|
|
echo '<div align="center" class="social-menu-title" ><span class="social-menu-text1">'.get_lang('Menu').'</span></div>'; |
|
|
|
|
|
|
|
|
|
echo '<div align="center" class="social-menu-title" ><span class="social-menu-text1">'.get_lang('Menu').'</span></div>'; |
|
|
|
|
echo '<div> |
|
|
|
|
<ul> |
|
|
|
|
<ul>'; |
|
|
|
|
|
|
|
|
|
// My own profile |
|
|
|
|
if ($show_full_profile && $user_id == intval(api_get_user_id())) { |
|
|
|
|
echo ' |
|
|
|
|
<li><a href="'.api_get_path(WEB_PATH).'main/social/home.php">'.Display::return_icon('home.gif',get_lang('Home'),array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Home').'</span></a></li> |
|
|
|
|
<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php?f=social">'.Display::return_icon('inbox.png',get_lang('Messages'),array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Messages').'</span></a></li>'; |
|
|
|
|
echo ' <li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('mail.png',get_lang('Invitations'),array('hspace'=>'6')).'<span class="'.($show=='invitations'?'social-menu-text-active':'social-menu-text4').'" >'.get_lang('Invitations').'</span></a></li>'; |
|
|
|
|
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.Display::return_icon('shared_profile.png',get_lang('ViewMySharedProfile'),array('hspace'=>'6','style'=>'float:left')).'<span class="social-menu-text-active" >'.get_lang('ViewMySharedProfile').'</span></a></li> |
|
|
|
|
<li><a href="'.api_get_path(WEB_PATH).'main/social/friends.php">'.Display::return_icon('members.gif',get_lang('Friends'),array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Friends').'</span></a></li> |
|
|
|
|
<li><a href="'.api_get_path(WEB_PATH).'main/social/groups.php">'.Display::return_icon('group.gif',get_lang('Groups'),array('hspace'=>'6')).'<span class="social-menu-text4" >'.get_lang('Groups').'</span></a></li>'; |
|
|
|
|
echo '</ul></div>'; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// My friend profile |
|
|
|
|
$html_actions = ''; |
|
|
|
|
if ($user_id != api_get_user_id()) { |
|
|
|
|
$html_actions = ' <a href="'.api_get_path(WEB_PATH).'main/messages/send_message_to_userfriend.inc.php?height=300&width=610&user_friend='.$user_id.'&view=profile&view_panel=1" class="thickbox" title="'.get_lang('SendMessage').'">'; |
|
|
|
|
$html_actions .= Display::return_icon('message_new.png').' '.get_lang('SendMessage').'</a><br />'; |
|
|
|
|
|
|
|
|
|
if ($user_id != api_get_user_id()) { |
|
|
|
|
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/send_message_to_userfriend.inc.php?height=300&width=610&user_friend='.$user_id.'&view=profile&view_panel=1" class="thickbox" title="'.get_lang('SendMessage').'">'; |
|
|
|
|
echo Display::return_icon('message_new.png').' '.get_lang('SendMessage').'</a></li>'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//check if I already sent an invitation message |
|
|
|
|
$invitation_sent_list = SocialManager::get_list_invitation_sent_by_user_id(api_get_user_id()); |
|
|
|
|
|
|
|
|
|
if (is_array($invitation_sent_list) && is_array($invitation_sent_list[$user_id]) && count($invitation_sent_list[$user_id]) >0 ) { |
|
|
|
|
$html_actions .= '<a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.get_lang('YouAlreadySentAnInvitation').'</a>'; |
|
|
|
|
echo '<li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.get_lang('YouAlreadySentAnInvitation').'</a></li>'; |
|
|
|
|
} else { |
|
|
|
|
if (!$show_full_profile) { |
|
|
|
|
$html_actions .= ' <a href="'.api_get_path(WEB_PATH).'main/messages/send_message_to_userfriend.inc.php?view_panel=2&height=260&width=610&user_friend='.$user_id.'" class="thickbox" title="'.get_lang('SendInvitation').'">'.Display :: return_icon('add_multiple_users.gif', get_lang('SocialInvitationToFriends')).' '.get_lang('SendInvitation').'</a>'; |
|
|
|
|
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/send_message_to_userfriend.inc.php?view_panel=2&height=260&width=610&user_friend='.$user_id.'" class="thickbox" title="'.get_lang('SendInvitation').'">'.Display :: return_icon('add_multiple_users.gif', get_lang('SocialInvitationToFriends')).' '.get_lang('SendInvitation').'</a></li>'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
echo $html_actions; |
|
|
|
|
echo '</ul></div>'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
// ---- My Agenda Items |
|
|
|
|