Adding style partial for social network - partial CT#446

skala
Cristian Fasanando 16 years ago
parent 0d2a47c3ec
commit 3768a5cb01
  1. 52
      main/css/blue_lagoon/default.css
  2. 4
      main/inc/ajax/social.ajax.php
  3. 2
      main/inc/lib/social.lib.php
  4. 33
      main/messages/inbox.php
  5. 31
      main/messages/new_message.php
  6. 45
      main/messages/outbox.php
  7. 32
      main/social/friends.php
  8. 25
      main/social/group_add.php
  9. 177
      main/social/search.php
  10. 45
      whoisonline.php

@ -2264,16 +2264,17 @@ div.image-social-content {
margin:2px;
padding: 8px 4px 4px 4px;
background: #ffffff;
height:125px;
height:105px;
width:82px;
z-index:5;
cursor:pointer;
position:relative;
overflow:hidden;
}
div.image-social-content span {
overflow:hidden;
display:block;
height:92px;
height:75px;
}
div.image-social-content img {
vertical-align:middle;
@ -2708,7 +2709,6 @@ a.unread {
}
#inbox-wrapper {width:100%;}
#inbox {width:80%;float:right;}
@ -2759,6 +2759,29 @@ a.unread {
}
.contentPostGroup{
width:660px;
background-image:url(../../img/content-post-group2.jpg);
background-repeat:repeat-y;
padding-left:20px;
padding-right:20px;
}
#div_content_table {
width:660px;
background-image:url(../../img/content-post-group2.jpg);
background-repeat:repeat-y;
padding-left:20px;
padding-right:20px;
}
.groupPost{
width:700px;
height:auto;
overflow:hidden;
margin-top:20px;
}
.message-item {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
@ -3049,17 +3072,38 @@ a.unread {
/*SEARCH USER*/
.search_user_grid_container { width:100%;}
.search_user_grid_item { width:100px; border:1px dotted #ccc; float:left; padding:5px; margin:5px;}
.search_user_grid_item { width:100px; height:100px; border:1px dotted #ccc; float:left; padding:5px; margin:5px; overflow:hidden;}
.search_user_grid_element_0 { width:100px; float:left; text-align:center; margin-bottom:5px;}
.search_user_grid_element_0 img {width:50px;height:50px;border:3px solid #E6E6E6;}
.search_user_grid_element_1 { width:100%; text-align:center;}
.search_user_grid_element_2 { width:100%; text-align:center;}
/*SEARCH GROUP*/
.search_group_grid_item {
float:left;
width:350px;
height:165px;
margin-top:20px;
}
.search_group_grid_element_1 {
width:330px;
height:165px;
padding-left:10px;
padding-right:10px;
background-image:url(../../img/boxmygroupscontent.jpg);
background-repeat:repeat-y;
overflow:hidden;
}
/*
.search_group_grid_container { width:100%;}
.search_group_grid_item { width:500px; height: 120px; border:1px dotted #ccc; float:left; padding:5px; margin:5px;}
.search_group_grid_element_0 { width:100px; height: 90px; float:left; text-align:center; margin-bottom:5px; padding-top:15px;}
.search_group_grid_element_1 { width:100%; text-align:left; padding-top:15px; padding-bottom:15px;}
.search_group_grid_element_2 { width:100%; text-align:left;}
*/
#menu {

@ -124,10 +124,10 @@ switch ($action) {
while ($j<$number_of_images) {
if (isset($friends[$j])) {
$friend = $friends[$j];
$user_name = api_xml_http_response_encode($friend['firstName'], $friend['lastName']);
$user_name = api_xml_http_response_encode($friend['firstName'].' '.$friend['lastName']);
$friends_profile = SocialManager::get_picture_user($friend['friend_user_id'], $friend['image'], 92);
$friend_html.='<div onMouseover="show_icon_delete(this)" onMouseout="hide_icon_delete(this)" class="image-social-content" id=div_'.$friends[$j]['friend_user_id'].'>';
$friend_html.='<span><a href="profile.php?u='.$friend['friend_user_id'].'"><center><img src="'.$friends_profile['file'].'" '.$friends_profile['style'].' id="imgfriend_'.$friend['friend_user_id'].'" title="'.$user_name.'" /></center></a></span>';
$friend_html.='<span><a href="profile.php?u='.$friend['friend_user_id'].'"><center><img src="'.$friends_profile['file'].'" style="width:60px;height:60px;border:3pt solid #eee" id="imgfriend_'.$friend['friend_user_id'].'" title="'.$user_name.'" /></center></a></span>';
$friend_html.='<img onclick="delete_friend (this)" id=img_'.$friend['friend_user_id'].' src="../img/blank.gif" alt="" title="" class="image-delete" /> <center class="friend">'.$user_name.'</center></div>';
}
$j++;

@ -741,7 +741,7 @@ class SocialManager extends UserManager {
}
$image_array = UserManager::get_user_picture_path_by_id($uid, 'system', false, true);
$friends_profile = SocialManager::get_picture_user($uid, $image_array['file'], 44, USER_IMAGE_SIZE_MEDIUM , ' width="44px" height="44px" ');
$friends_profile = SocialManager::get_picture_user($uid, $image_array['file'], 80, USER_IMAGE_SIZE_ORIGINAL );
// reduce image
$name = api_get_person_name($user_info['firstName'], $user_info['lastName']);

@ -171,39 +171,27 @@ if ($_GET['f']=='social') {
}
echo '<div id="inbox-wrapper">';
//LEFT CONTENT
$id_content_right = '';
//LEFT CONTENT
if (api_get_setting('allow_social_tool') != 'true') {
$id_content_right = 'inbox';
echo '<div id="inbox-menu" class="actions">';
echo '<ul>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png',get_lang('Inbox')).get_lang('Inbox').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.Display::return_icon('message_new.png',get_lang('ComposeMessage')).get_lang('ComposeMessage').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.Display::return_icon('outbox.png',get_lang('Outbox')).get_lang('Outbox').'</a>'.'</li>';
echo '</ul>';
echo '</div>';
echo '<div id="inbox">';
//MAIN CONTENT
if (!isset($_GET['del_msg'])) {
inbox_display();
} else {
$num_msg = intval($_POST['total']);
for ($i=0;$i<$num_msg;$i++) {
if($_POST[$i]) {
//the user_id was necesarry to delete a message??
MessageManager::delete_message_by_user_receiver(api_get_user_id(), $_POST['_'.$i]);
}
}
inbox_display();
}
echo '</div>';
echo '</div>';
} else {
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
$id_content_right = 'socialContentRigth';
echo '<div id="socialContentLeft">';
//this include the social menu div
SocialManager::show_social_menu('messages');
echo '</div>';
echo '<div id="socialContentRigth">';
echo '</div>';
}
echo '<div id="'.$id_content_right.'">';
//MAIN CONTENT
if (!isset($_GET['del_msg'])) {
inbox_display();
@ -217,8 +205,7 @@ echo '<div id="inbox-wrapper">';
}
inbox_display();
}
echo '</div>';
}
echo '</div>';
echo '</div>';

@ -275,9 +275,23 @@ if ($group_id != 0) {
echo '</div>';
} else {
if ($_GET['f']=='social') {
$user_online_list = WhoIsOnline(api_get_setting('time_limit_whosonline'));
$user_online_count = count($user_online_list);
echo '<div class="actions-title-groups">';
echo '<table width="100%"><tr><td width="150px" bgcolor="#32578b"><center><span class="menuTex1">'.strtoupper(get_lang('Menu')).'</span></center></td>
<td width="15px">&nbsp;</td><td bgcolor="#32578b">'.Display::return_icon('whoisonline.png','',array('hspace'=>'6')).'<a href="#" ><span class="menuTex1">'.get_lang('FriendsOnline').' '.$user_online_count.'</span></a></td>
</tr></table>';
/*
echo '<div class="menuTitle" align="center"><span class="menuTex1">'.get_lang('Menu').'</span></div>';
echo '<div class="TitleRigth">'.Display::return_icon('whoisonline.png','',array('hspace'=>'6')).'<a href="#" ><span class="menuTex1">'.$who_is_on_line.'</span></a></div>';
*/
echo '</div>';
/*
echo '<div class="actions-title">';
echo get_lang('Messages');
echo '</div>';
*/
} else {
echo '<div class=actions>';
if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') {
@ -294,8 +308,10 @@ if ($group_id != 0) {
}
echo '<div id="inbox-wrapper" >';
$id_content_right = '';
//LEFT COLUMN
if (api_get_setting('allow_social_tool') != 'true') {
if (api_get_setting('allow_social_tool') != 'true') {
$id_content_right = 'inbox';
echo '<div id="inbox-menu" class="actions">';
echo '<ul>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png',get_lang('Inbox')).get_lang('Inbox').'</a>'.'</li>';
@ -304,14 +320,17 @@ echo '<div id="inbox-wrapper" >';
echo '</ul>';
echo '</div>';
} else {
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
SocialManager::show_social_menu('messages');
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
echo '<div id="socialContentLeft">';
//this include the social menu div
SocialManager::show_social_menu('messages');
echo '</div>';
$id_content_right = 'socialContentRigth';
}
echo '<div id="inbox">';
echo '<div id="'.$id_content_right.'">';
//MAIN CONTENT
//MAIN CONTENT
if (!isset($_POST['compose'])) {
if(isset($_GET['re_id'])) {
show_compose_reply_to_message($_GET['re_id'], api_get_user_id());

@ -136,49 +136,27 @@ $table_message = Database::get_main_table(TABLE_MESSAGE);
$user_sender_id=api_get_user_id();
echo '<div id="inbox-wrapper">';
//LEFT COLUMN
$id_content_right = '';
//LEFT COLUMN
if (api_get_setting('allow_social_tool') != 'true') {
$id_content_right = 'outbox';
echo '<div id="inbox-menu" class="actions">';
echo '<ul>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png',get_lang('Inbox')).get_lang('Inbox').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'.Display::return_icon('message_new.png',get_lang('ComposeMessage')).get_lang('ComposeMessage').'</a>'.'</li>';
echo '<li><a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'.Display::return_icon('outbox.png',get_lang('Outbox')).get_lang('Outbox').'</a>'.'</li>';
echo '</ul>';
echo '</div>';
echo '<div id="inbox">';
//MAIN CONTENT
if ($_REQUEST['action']=='delete') {
$delete_list_id=array();
if (isset($_POST['out'])) {
$delete_list_id=$_POST['out'];
}
if (isset($_POST['id'])) {
$delete_list_id=$_POST['id'];
}
for ($i=0;$i<count($delete_list_id);$i++) {
MessageManager::delete_message_by_user_sender(api_get_user_id(), $delete_list_id[$i]);
}
$delete_list_id=array();
outbox_display();
} elseif ($_REQUEST['action']=='deleteone') {
$delete_list_id=array();
$id=Security::remove_XSS($_GET['id']);
MessageManager::delete_message_by_user_sender(api_get_user_id(),$id);
$delete_list_id=array();
outbox_display();
}else {
outbox_display();
}
echo '</div>';
echo '</div>';
} else {
require_once api_get_path(LIBRARY_PATH).'social.lib.php';
$id_content_right = 'socialContentRigth';
echo '<div id="socialContentLeft">';
//this include the social menu div
SocialManager::show_social_menu('messages');
echo '</div>';
echo '<div id="socialContentRigth">';
echo '</div>';
}
echo '<div id="'.$id_content_right.'">';
//MAIN CONTENT
if ($_REQUEST['action']=='delete') {
$delete_list_id=array();
@ -202,10 +180,7 @@ echo '<div id="inbox-wrapper">';
}else {
outbox_display();
}
echo '</div>';
}
echo '</div>';
echo '</div>';

@ -88,16 +88,29 @@ $interbreadcrumb[]= array ('url' =>'#','name' => get_lang('Friends'));
Display :: display_header($tool_name, 'Groups');
$user_online_list = WhoIsOnline(api_get_setting('time_limit_whosonline'));
$user_online_count = count($user_online_list);
echo '<div class="actions-title-groups">';
echo '<table width="100%"><tr><td width="150px" bgcolor="#32578b"><center><span class="menuTex1">'.strtoupper(get_lang('Menu')).'</span></center></td>
<td width="15px">&nbsp;</td><td bgcolor="#32578b">'.Display::return_icon('whoisonline.png','',array('hspace'=>'6')).'<a href="#" ><span class="menuTex1">'.get_lang('FriendsOnline').' '.$user_online_count.'</span></a></td>
</tr></table>';
/*
echo '<div class="menuTitle" align="center"><span class="menuTex1">'.get_lang('Menu').'</span></div>';
echo '<div class="TitleRigth">'.Display::return_icon('whoisonline.png','',array('hspace'=>'6')).'<a href="#" ><span class="menuTex1">'.$who_is_on_line.'</span></a></div>';
*/
echo '</div>';
/*
echo '<div class="actions-title">';
echo get_lang('MyFriends');
echo '</div>';
*/
echo '<div id="socialContent">';
echo '<div id="social_wrapper">';
//this include the social menu div
SocialManager::show_social_menu(array('messages'));
echo '<div id="social_main">';
echo '<div id="socialContentLeft">';
//this include the social menu div
SocialManager::show_social_menu('friends');
echo '</div>';
echo '<div id="socialContentRigth">';
$language_variable = api_xml_http_response_encode(get_lang('Contacts'));
$user_id = api_get_user_id();
@ -121,6 +134,8 @@ $user_id = api_get_user_id();
<tr>
<td height="153" valign="top">
<?php
echo '<div class="groupPost">';
echo '<div>'.Display::return_icon('content-post-group1.jpg').'</div>';
echo '<div id="div_content_table">';
$list_path_friends = array();
@ -151,10 +166,10 @@ $user_id = api_get_user_id();
while ($j<$number_of_images) {
if (isset($friends[$j])) {
$friend = $friends[$j];
$user_name = api_xml_http_response_encode($friend['firstName'], $friend['lastName']);
$user_name = api_xml_http_response_encode($friend['firstName'].' '.$friend['lastName']);
$friends_profile = SocialManager::get_picture_user($friend['friend_user_id'], $friend['image'], 92);
$friend_html.='<div onMouseover="show_icon_delete(this)" onMouseout="hide_icon_delete(this)" class="image-social-content" id=div_'.$friends[$j]['friend_user_id'].'>';
$friend_html.='<span><a href="profile.php?u='.$friend['friend_user_id'].'"><center><img src="'.$friends_profile['file'].'" '.$friends_profile['style'].' id="imgfriend_'.$friend['friend_user_id'].'" title="'.$user_name.'" /></center></a></span>';
$friend_html.='<span><a href="profile.php?u='.$friend['friend_user_id'].'"><center><img src="'.$friends_profile['file'].'" style="width:60px;height:60px;border:3pt solid #eee" id="imgfriend_'.$friend['friend_user_id'].'" title="'.$user_name.'" /></center></a></span>';
$friend_html.='<img onclick="delete_friend (this)" id=img_'.$friend['friend_user_id'].' src="../img/blank.gif" alt="" title="" class="image-delete" /> <center class="friend">'.$user_name.'</center></div>';
}
$j++;
@ -165,6 +180,7 @@ $user_id = api_get_user_id();
}
echo $friend_html;
echo '</div>';
echo '</div>';
?>
</td>
</tr>

@ -98,12 +98,31 @@ $this_section = SECTION_SOCIAL;
$interbreadcrumb[]= array ('url' =>'home.php','name' => get_lang('Social'));
Display :: display_header($tool_name, 'Groups');
//show the action menu
SocialManager::show_social_menu();
$user_online_list = WhoIsOnline(api_get_setting('time_limit_whosonline'));
$user_online_count = count($user_online_list);
echo '<div class="actions-title-groups">';
echo '<table width="100%"><tr><td width="150px" bgcolor="#32578b"><center><span class="menuTex1">'.strtoupper(get_lang('Menu')).'</span></center></td>
<td width="15px">&nbsp;</td><td bgcolor="#32578b">'.Display::return_icon('whoisonline.png','',array('hspace'=>'6')).'<a href="#" ><span class="menuTex1">'.get_lang('FriendsOnline').' '.$user_online_count.'</span></a></td>
</tr></table>';
/*
echo '<div class="menuTitle" align="center"><span class="menuTex1">'.get_lang('Menu').'</span></div>';
echo '<div class="TitleRigth">'.Display::return_icon('whoisonline.png','',array('hspace'=>'6')).'<a href="#" ><span class="menuTex1">'.$who_is_on_line.'</span></a></div>';
*/
echo '</div>';
/*
echo '<div class="actions-title">';
echo get_lang('Groups');
echo '</div>';
*/
echo '<div id="socialContent">';
echo '<div id="socialContentLeft">';
//show the action menu
SocialManager::show_social_menu('groups');
echo '</div>';
echo '<div id="socialContentRigth">';
$form->display();
echo '</div>';
echo '</div>';
$form->display();
Display :: display_footer();
?>

@ -21,71 +21,136 @@ $interbreadcrumb[]= array ('url' =>'profile.php','name' => get_lang('Social'));
Display :: display_header($tool_name);
$user_online_list = WhoIsOnline(api_get_setting('time_limit_whosonline'));
$user_online_count = count($user_online_list);
echo '<div class="actions-title-groups">';
echo '<table width="100%"><tr><td width="150px" bgcolor="#32578b"><center><span class="menuTex1">'.strtoupper(get_lang('Menu')).'</span></center></td>
<td width="15px">&nbsp;</td><td bgcolor="#32578b">'.Display::return_icon('whoisonline.png','',array('hspace'=>'6')).'<a href="#" ><span class="menuTex1">'.get_lang('FriendsOnline').' '.$user_online_count.'</span></a></td>
</tr></table>';
/*
echo '<div class="menuTitle" align="center"><span class="menuTex1">'.get_lang('Menu').'</span></div>';
echo '<div class="TitleRigth">'.Display::return_icon('whoisonline.png','',array('hspace'=>'6')).'<a href="#" ><span class="menuTex1">'.$who_is_on_line.'</span></a></div>';
*/
echo '</div>';
/*
echo '<div class="actions-title">';
echo get_lang('Search');
echo '</div>';
*/
echo '<div id="social_wrapper">';
//this include the social menu div
SocialManager::show_social_menu(array('messages'));
echo '<div id="social_main">';
$query = $_GET['q'];
echo UserManager::get_search_form($query);
//I'm searching something
if ($query != '') {
if (isset($query) && $query!='') {
//get users from tags
$users = UserManager::get_all_user_tags($query, 0, 0, 5);
$groups = GroupPortalManager::get_all_group_tags($query);
echo '<div id="socialContent">';
echo '<div id="socialContentLeft">';
//show the action menu
SocialManager::show_social_menu('search');
echo '</div>';
echo '<div id="socialContentRigth">';
if (empty($users) && empty($groups)) {
echo get_lang('SorryNoResults');
}
$query = $_GET['q'];
echo UserManager::get_search_form($query);
//I'm searching something
if ($query != '') {
if (isset($query) && $query!='') {
//get users from tags
$users = UserManager::get_all_user_tags($query, 0, 0, 5);
$groups = GroupPortalManager::get_all_group_tags($query);
if (empty($users) && empty($groups)) {
echo get_lang('SorryNoResults');
}
$results = array();
if (is_array($users) && count($users)> 0) {
echo '<h2>'.get_lang('Users').'</h2>';
foreach($users as $user) {
$picture = UserManager::get_picture_user($user['user_id'], $user['picture_uri'],80);
$url_open = '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php?u='.$user['user_id'].'">';
$url_close ='</a>';
$img = $url_open.'<img src="'.$picture['file'].'" />'.$url_close;
$user['firstname'] = $url_open.$user['firstname'].$url_close;
$user['lastname'] = $url_open.$user['lastname'].$url_close;
$results[] = array($img, $user['firstname'],$user['lastname'],$user['tag']);
}
echo '<div class="groupPost">';
echo '<div>'.Display::return_icon('content-post-group1.jpg').'</div>';
echo '<div id="div_content_table">';
Display::display_sortable_grid('search_user', array(), $results, array('hide_navigation'=>true, 'per_page' => 5), $query_vars, false ,true);
echo '</div>';
echo '</div>';
}
$results = array();
if (is_array($users) && count($users)> 0) {
echo '<h2>'.get_lang('Users').'</h2>';
foreach($users as $user) {
$picture = UserManager::get_picture_user($user['user_id'], $user['picture_uri'],80);
$url_open = '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php?u='.$user['user_id'].'">';
$url_close ='</a>';
$img = $url_open.'<img src="'.$picture['file'].'" />'.$url_close;
$user['firstname'] = $url_open.$user['firstname'].$url_close;
$user['lastname'] = $url_open.$user['lastname'].$url_close;
$results[] = array($img, $user['firstname'],$user['lastname'],$user['tag']);
}
}
Display::display_sortable_grid('search_user', array(), $results, array('hide_navigation'=>true, 'per_page' => 5), $query_vars, false ,true);
//get users from tags
$results = array();
if (is_array($groups) && count($groups)>0) {
echo '<h2>'.get_lang('Groups').'</h2>';
foreach($groups as $group) {
$picture = GroupPortalManager::get_picture_group($group['id'], $group['picture_uri'],80);
$img = '<img src="'.$picture['file'].'" />';
$tags = GroupPortalManager::get_group_tags($group['id']);
$group['name'] = '<a href="'.api_get_path(WEB_PATH).'main/social/groups.php?id='.$group['id'].'">'.$group['name'].'</a>';
$img = '<a href="'.api_get_path(WEB_PATH).'main/social/groups.php?id='.$group['id'].'">'.$img.'</a>';
$results[] = array($img, $group['name'],$group['description'],$tags);
//get users from tags
if (is_array($results) && count($results) > 0) {
foreach ($results as $result) {
$id = $result['id'];
$url_open = '<a href="groups.php?id='.$id.'">';
$url_close = '</a>';
$name = strtoupper(cut($result['name'],25,true));
if ($result['relation_type'] == GROUP_USER_PERMISSION_ADMIN) {
$name .= Display::return_icon('admin_star.png', get_lang('Admin'), array('style'=>'vertical-align:middle'));
} elseif ($result['relation_type'] == GROUP_USER_PERMISSION_MODERATOR) {
$name .= Display::return_icon('moderator_star.png', get_lang('Moderator'), array('style'=>'vertical-align:middle'));
}
$count_users_group = count(GroupPortalManager::get_all_users_by_group($id));
if ($count_users_group == 1 ) {
$count_users_group = $count_users_group.' '.get_lang('Member');
} else {
$count_users_group = $count_users_group.' '.get_lang('Members');
}
$picture = GroupPortalManager::get_picture_group($result['id'], $result['picture_uri'],80);
$result['picture_uri'] = '<img class="imageGroups" src="'.$picture['file'].'" hspace="4" height="50" border="2" align="left" width="50" />';
$grid_item_1 = Display::return_icon('boxmygroups.jpg');
$item_1 = '<div>'.$url_open.$result['picture_uri'].'<p class="groupTex1"><strong>'.$name.'<br />('.$count_users_group.')</strong></p>'.$url_close.Display::return_icon('linegroups.jpg').'</div>';
$item_2 = '<div class="box_description_group_title" ><span class="groupText2">'.strtoupper(get_lang('DescriptionGroup')).'</span></div>';
$item_3 = '<div class="box_description_group_content" >'.cut($result['description'],100,true).'</div>';
$item_4 = '<div class="box_description_group_actions" >'.$url_open.get_lang('SeeMore').$url_close.'</div>';
$grid_item_2 = $item_1.$item_2.$item_3.$item_4;
$grid_my_groups[]= array($grid_item_1,$grid_item_2);
}
}
$grid_groups = array();
if (is_array($groups) && count($groups)>0) {
echo '<h2>'.get_lang('Groups').'</h2>';
foreach($groups as $group) {
$id = $group['id'];
$url_open = '<a href="groups.php?id='.$id.'">';
$url_close = '</a>';
$name = strtoupper(cut($group['name'],25,true));
$count_users_group = count(GroupPortalManager::get_all_users_by_group($id));
if ($count_users_group == 1 ) {
$count_users_group = $count_users_group.' '.get_lang('Member');
} else {
$count_users_group = $count_users_group.' '.get_lang('Members');
}
$picture = GroupPortalManager::get_picture_group($group['id'], $group['picture_uri'],80);
$tags = GroupPortalManager::get_group_tags($group['id']);
$group['picture_uri'] = '<img class="imageGroups" src="'.$picture['file'].'" hspace="4" height="50" border="2" align="left" width="50" />';
$grid_item_1 = Display::return_icon('boxmygroups.jpg');
$item_1 = '<div>'.$url_open.$group['picture_uri'].'<p class="groupTex1"><strong>'.$name.'<br />('.$count_users_group.')</strong></p>'.$url_close.Display::return_icon('linegroups.jpg').'</div>';
$item_2 = '<div class="box_description_group_title" ><span class="groupText2">'.strtoupper(get_lang('DescriptionGroup')).'</span></div>';
$item_3 = '<div class="box_description_group_content" >'.cut($group['description'],100,true).'</div>';
$item_4 = '<div class="box_description_group_tags" >'.$tags.'</div>';
$item_5 = '<div class="box_description_group_actions" >'.$url_open.get_lang('SeeMore').$url_close.'</div>';
$grid_item_2 = $item_1.$item_2.$item_3.$item_4.$item_5;
$grid_groups[]= array($grid_item_1,$grid_item_2);
}
}
Display::display_sortable_grid('search_group', array(), $grid_groups, array('hide_navigation'=>true, 'per_page' => 5), $query_vars, false, array(true,true,true,true,true));
}
}
Display::display_sortable_grid('search_group', array(), $results, array('hide_navigation'=>true, 'per_page' => 5), $query_vars, false, array(true,true,true,true,true));
}
} else {
//we should show something
}
echo '</div>';
} else {
//we should show something
}
echo '</div>';
echo '</div>';
Display :: display_footer();

@ -127,13 +127,30 @@ if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) ||
if (!isset($_GET['id'])) {
Display::display_header(get_lang('UsersOnLineList'));
if (!api_is_anonymous())
echo SocialManager::show_social_menu();
$user_online_list = WhoIsOnline(api_get_setting('time_limit_whosonline'));
$user_online_count = count($user_online_list);
echo '<div class="actions-title-groups">';
echo '<table width="100%"><tr><td width="150px" bgcolor="#32578b"><center><span class="menuTex1">'.strtoupper(get_lang('Menu')).'</span></center></td>
<td width="15px">&nbsp;</td><td bgcolor="#32578b">'.Display::return_icon('whoisonline.png','',array('hspace'=>'6')).'<a href="#" ><span class="menuTex1">'.get_lang('FriendsOnline').' '.$user_online_count.'</span></a></td>
</tr></table>';
/*
echo '<div class="menuTitle" align="center"><span class="menuTex1">'.get_lang('Menu').'</span></div>';
echo '<div class="TitleRigth">'.Display::return_icon('whoisonline.png','',array('hspace'=>'6')).'<a href="#" ><span class="menuTex1">'.$who_is_on_line.'</span></a></div>';
*/
echo '</div>';
/*
echo '<div class="actions-title">';
echo get_lang('UsersOnLineList');
echo '</div>';
echo '<div class="actions-message">'.get_lang('TotalOnLine').' : '.$total.'</div>';
*/
echo '<div id="socialContentLeft">';
//this include the social menu div
if (!api_is_anonymous()) {
SocialManager::show_social_menu('whoisonline');
}
echo '</div>';
if ($_GET['id'] == '') {
echo '<p><a class="refresh" href="javascript:window.location.reload()">'.get_lang('Refresh').'</a></p>';
} else {
@ -146,20 +163,32 @@ if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) ||
if ($user_list) {
if (!isset($_GET['id'])) {
if (!api_is_anonymous())
echo UserManager::get_search_form($_GET['q']);
echo '<div id="socialContentRigth">';
//this include the social menu div
if (!api_is_anonymous()) {
echo UserManager::get_search_form($_GET['q']);
}
SocialManager::display_user_list($user_list);
echo '</div>';
/*
if (!api_is_anonymous()) {
echo UserManager::get_search_form($_GET['q']);
}
SocialManager::display_user_list($user_list);
*/
} else {
//individual user information - also displays header info
SocialManager::display_individual_user(Security::remove_XSS($_GET['id']));
}
} elseif (isset($_GET['id'])) {
Display::display_header(get_lang('UsersOnLineList'));
echo '<div class="actions-title">';
echo get_lang('UsersOnLineList');
echo '</div>';
echo '</div>';
}
} else {
Display::display_header(get_lang('UsersOnLineList'));
Display::display_error_message(get_lang('AccessNotAllowed'));

Loading…
Cancel
Save