瀏覽代碼

Adding styles for group messages in social network - partial CT#446

Cristian Fasanando 15 年之前
父節點
當前提交
5d464a56eb

+ 25 - 3
main/css/blue_lagoon/default.css

@@ -2767,6 +2767,20 @@ a.unread {
 	padding-right:20px;
 }
 
+#contentPostReply{
+	width:600px;
+	margin-left:60px;
+}
+
+.contentPostReplybg{
+	width:560px;
+	height:auto;
+	padding-left:20px;
+	padding-right:20px;
+	background-image:url(../../img/content-post-reply02.jpg);
+	background-repeat:repeat-y;
+}
+
 #div_content_table {
 	width:660px;
 	background-image:url(../../img/content-post-group2.jpg);
@@ -2779,7 +2793,7 @@ a.unread {
 	width:700px;
 	height:auto;
 	overflow:hidden;
-	margin-top:20px;
+	margin-bottom:20px;
 }
 
 .message-item {
@@ -3033,12 +3047,13 @@ a.unread {
 .invitation_profile_grid_item {
 	border:1px dotted #CCCCCC;
 	float:left;
-	height:90px;
+	height:110px;
 	margin:5px;
 	padding:5px;
 	width:100px;
 }
 .invitation_profile_grid_element_0 { width:100px; float:left; text-align:center; margin-bottom:5px;}
+.invitation_profile_grid_element_0 img {width:50px;height:50px;border:3px solid #E6E6E6;}
 .invitation_profile_grid_element_2 { width:100px; float:left; text-align:center;}
 .invitation_profile_grid_element_3 { width:100px; float:left; text-align:center;}
 
@@ -3064,8 +3079,9 @@ a.unread {
 
 /*LIST MEMBERS*/
 .list_members_grid_container { width:100%;}
-.list_members_grid_item { width:100px;  height: 125px;  border:1px dotted #ccc; float:left; padding:5px; margin:8px;}
+.list_members_grid_item { width:105px;  height: 150px;  border:1px dotted #ccc; float:left; padding:5px; margin:8px;}
 .list_members_grid_element_0 { width:100px; float:left; text-align:center; margin-bottom:5px;}
+.list_members_grid_element_0 img {width:50px;height:50px;border:3px solid #E6E6E6;}
 .list_members_grid_element_2 { width:100px; float:left; text-align:center; margin-bottom:5px;}
 .list_members_grid_element_3 { width:100px; float:left; text-align:center; margin-bottom:5px;}
 .list_members_grid_element_5 { width:100%;  text-align:center;}
@@ -3225,6 +3241,12 @@ a.unread {
 	overflow:hidden;
 	}
 
+#boxmyGroupMessages {
+	height:auto;
+	overflow:hidden;
+	width:700px;
+}
+
 #boxmyGroupsLeft{
 	width:350px;
 	float:left;

+ 1 - 1
main/inc/lib/group_portal_manager.lib.php

@@ -865,7 +865,7 @@ class GroupPortalManager
 		
 		$group_info 	= GroupPortalManager::get_group_data($group_id); 
 		$picture		= GroupPortalManager::get_picture_group($group_id, $group_info['picture_uri'],160,'medium_');
-		$big_image		= GroupPortalManager::get_picture_group($group_id, $group_info['picture_uri'],'','big_');		
+		$big_image		= GroupPortalManager::get_picture_group($group_id, $group_info['picture_uri'],'','big_');	
 		$tags			= GroupPortalManager::get_group_tags($group_id, true);
 		$members		= GroupPortalManager::get_users_by_group($group_id);
 		$groups_by_user	= GroupPortalManager::get_groups_by_user($user_id, 0);

+ 48 - 42
main/inc/lib/message.lib.php

@@ -168,12 +168,11 @@ class MessageManager
 				if ($_GET['f']=='social') {
 					$link = '&f=social';
 				}
-				
-				
+
 				$message[2] = '<a '.$class.' href="view_message.php?id='.$result[0].$link.'">'.GetFullUserName(($result[1])).'</a>';;
 				$message[3] = '<a '.$class.' href="view_message.php?id='.$result[0].$link.'">'.$result[2].'</a>';
-				$message[5] = '<a href="new_message.php?re_id='.$result[0].'">'.Display::return_icon('message_reply.png',get_lang('ReplyToMessage')).'</a>'.
-						  '&nbsp;&nbsp;<a delete_one_message('.$result[0].') href="inbox.php?action=deleteone&id='.$result[0].'">'.Display::return_icon('message_delete.png',get_lang('DeleteMessage')).'</a>';
+				$message[5] = '<a href="new_message.php?re_id='.$result[0].'&f='.Security::remove_XSS($_GET['f']).'">'.Display::return_icon('message_reply.png',get_lang('ReplyToMessage')).'</a>'.
+						  '&nbsp;&nbsp;<a delete_one_message('.$result[0].') href="inbox.php?action=deleteone&id='.$result[0].'&f='.Security::remove_XSS($_GET['f']).'">'.Display::return_icon('message_delete.png',get_lang('DeleteMessage')).'</a>';
 			}
 			$message[4] = ($result[3]); //date stays the same
 			foreach($message as $key => $value) {
@@ -614,7 +613,7 @@ class MessageManager
 				
 				$message[2] = '<a '.$class.' onclick="show_sent_message ('.$result[0].')" href="../messages/view_message.php?id_send='.$result[0].$link.'">'.GetFullUserName($result[4]).'</a>';
 				$message[3] = '<a '.$class.' onclick="show_sent_message ('.$result[0].')" href="../messages/view_message.php?id_send='.$result[0].$link.'">'.$result[2].'</a>';
-				$message[5] = '<a href="outbox.php?action=deleteone&id='.$result[0].'"  onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmDeleteMessage')))."'".')) return false;">'.Display::return_icon('message_delete.png',get_lang('DeleteMessage')).'</a>';
+				$message[5] = '<a href="outbox.php?action=deleteone&id='.$result[0].'&f='.Security::remove_XSS($_GET['f']).'"  onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmDeleteMessage')))."'".')) return false;">'.Display::return_icon('message_delete.png',get_lang('DeleteMessage')).'</a>';
 			}
 			$message[4] = $result[3]; //date stays the same
 			foreach($message as $key => $value) {
@@ -860,13 +859,14 @@ class MessageManager
 				$total_topics = count($topics);
 				$topics_per_page = 5;
 				$pager = self::get_pager_for_message_group($group_id,$page,$total_topics,$topics_per_page);			
-				$html .= '	<div class="pager">
-							<table width="100%">
-							<tr><td style="width:25%">&nbsp;</td><td style="text-align:center">'.$pager['details'].'</td><td style="text-align:right;width:25%">'.$pager['links'].'</td></tr></table></div>';
+				
 				
 				// topics and items
 				$parents = array_keys(self::get_messages_by_parent(0,$group_id,$page,$topics_per_page));
-				$html .= '<div id="accordion">';		
+				$html .= '<div id="boxmyGroupMessages">';
+				$html .= '	<div class="pager">
+							<table width="690px">
+							<tr><td style="width:25%">&nbsp;</td><td style="text-align:center">'.$pager['details'].'</td><td style="text-align:right;width:25%">'.$pager['links'].'</td></tr></table></div>';	
 				foreach ($topics as $index => $topic) {
 					
 					if (!in_array($index,$parents)) continue;	
@@ -876,40 +876,38 @@ class MessageManager
 					$user_sender_info = UserManager::get_user_info_by_id($topic['user_sender_id']);
 					$files_attachments = self::get_links_message_attachment_files($topic['id']);
 					$name = api_get_person_name($user_sender_info['firstname'], $user_sender_info['lastname']);
-					$html .= '<div class="message-topic" >';
-					$html .= '<a href="#" class="head" id="head_'.$topic['id'].'">
-								'.((isset($_GET['div_id']) && $_GET['div_id'] == 'content_'.$topic['id'])?Display::return_icon('div_hide.gif',get_lang('Hide'),array('style'=>'vertical-align: middle')):
-								Display::return_icon('div_show.gif',get_lang('Show'),array('style'=>'vertical-align: middle'))).'
-								<span class="message-group-title-topic">'.$topic['title'].'</span>';
-					//$html .= '<span class="message-group-date">('.get_lang('PostIn').' '.date_to_str_ago($topic['send_date']).($topic['send_date']!=$topic['update_date']?' - '.get_lang('LastUpdate').' '.date_to_str_ago($topic['send_date']):'').')</span>';
-					$html .= '</a>';
 					
-					if ($topic['send_date']!=$topic['update_date']) {
-						if (!empty($topic['update_date']) && $topic['update_date'] != '0000-00-00 00:00:00' ) {						
-							$html .= '<span class="message-group-date"> '.get_lang('LastUpdate').' '.date_to_str_ago($topic['update_date']).'</span>';
-						}	
-					} else {
-							$html .= '<span class="message-group-date"> '.get_lang('Created').' '.date_to_str_ago($topic['send_date']).'</span>';
-					}			
-				 		
-				 				
-						$html .= '<div id="content_'.$topic['id'].'">';
+					$html .= '<div class="groupPost" >';
+						$html .= '<div>'.Display::return_icon('content-post-group1.jpg').'</div>';
+						$html .= '<div class="contentPostGroup">';
+						$html .= '<a href="#" class="head" id="head_'.$topic['id'].'">																
+									<span class="message-group-title-topic">'.((isset($_GET['div_id']) && $_GET['div_id'] == 'content_'.$topic['id'])?Display::return_icon('div_hide.gif',get_lang('Hide'),array('style'=>'vertical-align: middle')):
+									Display::return_icon('div_show.gif',get_lang('Show'),array('style'=>'vertical-align: middle'))).'
+									'.$topic['title'].'</span>';						
+						$html .= '</a>';
+						
+						if ($topic['send_date']!=$topic['update_date']) {
+							if (!empty($topic['update_date']) && $topic['update_date'] != '0000-00-00 00:00:00' ) {						
+								$html .= '<span> ('.get_lang('LastUpdate').' '.date_to_str_ago($topic['update_date']).')</span>';
+							}	
+						} else {
+								$html .= '<span> ('.get_lang('Created').' '.date_to_str_ago($topic['send_date']).')</span>';
+						}			
+				 						 				
+						$html .= '<div id="content_'.$topic['id'].'" >';
 							$html .= '<a name="content_'.$topic['id'].'"></a>';
-							$html.= '<div style="margin-left: '.$indent.'px;margin-bottom:10px">';
+							$html.= '<div style="margin-bottom:10px">';
 								$html.= '<div id="message-reply-link" style="margin-right:10px">
-										<a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?view_panel=1&height=390&width=610&&user_friend='.$current_user_id.'&group_id='.$group_id.'&message_id='.$topic['id'].'&action=reply_message_group&div_id=content_'.$topic['id'].'&page_nr='.Security::remove_XSS($_GET['page_nr']).'&page_item_nr='.Security::remove_XSS($_GET['page_item_nr']).'" class="thickbox" title="'.get_lang('Reply').'">'.Display :: return_icon('forumthread_new.gif', get_lang('Reply')).'</a>';
-								
+										<a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?view_panel=1&height=390&width=610&&user_friend='.$current_user_id.'&group_id='.$group_id.'&message_id='.$topic['id'].'&action=reply_message_group&div_id=content_'.$topic['id'].'&page_nr='.Security::remove_XSS($_GET['page_nr']).'&page_item_nr='.Security::remove_XSS($_GET['page_item_nr']).'" class="thickbox" title="'.get_lang('Reply').'">'.Display :: return_icon('forumthread_new.gif', get_lang('Reply')).'</a>';								
 								if ($topic['user_sender_id'] == $current_user_id) {
 									$html.= '&nbsp;&nbsp;<a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?view_panel=1&height=390&width=610&&user_friend='.$current_user_id.'&group_id='.$group_id.'&message_id='.$topic['id'].'&action=edit_message_group&div_id=content_'.$topic['id'].'&page_nr='.Security::remove_XSS($_GET['page_nr']).'&page_item_nr='.Security::remove_XSS($_GET['page_item_nr']).'" class="thickbox" title="'.get_lang('Edit').'">'.Display :: return_icon('edit.gif', get_lang('Edit')).'</a>';
-								}
-								
+								}								
 								$html.=	'</div>';
-								//$html.= '<div class="message-group-title-topic">'.$topic['title'].'&nbsp;</div>';												
+								$html.= '<br />';											
 								$html.= '<div class="message-group-author">'.get_lang('From').'&nbsp;<a href="'.api_get_path(WEB_PATH).'main/social/profile.php?u='.$topic['user_sender_id'].'">'.$name.'&nbsp;</a></div>';		
-								$html.= '<div class="message-group-content">'.$topic['content'].'</div>';
-								//$html.= '<div class="message-group-date">'.get_lang('PostIn').' '.date_to_str_ago($topic['send_date']).'</div>';						
+								$html.= '<div class="message-group-content">'.$topic['content'].'</div>';													
 								$html.= '<div class="message-attach">'.(!empty($files_attachments)?implode('&nbsp;|&nbsp;',$files_attachments):'').'</div>';						
-							$html.= '</div>';
+						$html.= '</div>';
 							
 					// items												
 					if (is_array($topic['items'])) {
@@ -932,7 +930,12 @@ class MessageManager
 							$user_sender_info = UserManager::get_user_info_by_id($item['user_sender_id']);
 							$files_attachments = self::get_links_message_attachment_files($item['id']);
 							$name = api_get_person_name($user_sender_info['firstname'], $user_sender_info['lastname']);
-							$html.= '<div class="message-item" style="margin-left: '.$indent.'px;">';
+							
+							
+							//$html.= '<div class="message-item" style="margin-left: '.$indent.'px;">';
+							$html.= '<div id="contentPostReply" >';	
+								$html .= '<div>'.Display::return_icon('content-post-reply01.jpg').'</div>';
+								$html .= '<div class="contentPostReplybg">';
 								$html.= '<div id="message-reply-link">
 										<a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?view_panel=1&height=390&width=610&&user_friend='.api_get_user_id().'&group_id='.$group_id.'&message_id='.$item['id'].'&action=reply_message_group&div_id=content_'.$topic['id'].'&page_nr='.Security::remove_XSS($_GET['page_nr']).'&page_item_nr='.Security::remove_XSS($_GET['page_item_nr']).'" class="thickbox" title="'.get_lang('Reply').'">'.Display :: return_icon('forumthread_new.gif', get_lang('Reply')).'</a>';
 								if ($item['user_sender_id'] == $current_user_id) {
@@ -950,28 +953,31 @@ class MessageManager
 								} else {
 									$html .= '<span class="message-group-date"> '.get_lang('Created').' '.date_to_str_ago($item['send_date']).'</span>';
 								}	
-					
-								//$html.= '<div class="message-group-date">'.get_lang('PostIn').' '.date_to_str_ago($item['send_date']).($item['send_date']!=$item['update_date']?' - '.get_lang('UpdatedIn').' '.date_to_str_ago($item['send_date']):'').'</div>';
-														
-								$html.= '<div class="message-attach">'.(!empty($files_attachments)?implode('&nbsp;|&nbsp;',$files_attachments):'').'</div>';						
-							$html.= '</div>';										
+								$html.= '<div class="message-attach">'.(!empty($files_attachments)?implode('&nbsp;|&nbsp;',$files_attachments):'').'</div>';
+								$html.= '</div>';						
+							$html.= '</div>';																
 						}	
 						
+						/*
 						// pager items
 						$html .= '	<div class="pager">
 							<table width="100%">
 							<tr><td style="width:25%">&nbsp;</td><td>&nbsp;</td><td style="text-align:right;width:25%">'.$pager_items['links'].'</td></tr></table></div>';
+						*/
 																	
 					}
+							$html .= '</div>';
 						$html .= '</div>';	
 					$html .= '</div>';	
 				}
 				$html .= '</div>';
 				
+				/*
 				// pager
 				$html .= '	<div class="pager">
-							<table width="100%">
+							<table width="700px">
 							<tr><td style="width:25%">&nbsp;</td><td>&nbsp;</td><td style="text-align:right;width:25%">'.$pager['links'].'</td></tr></table></div>';
+				*/
 		}
 		return $html;
 	}

+ 3 - 17
main/inc/lib/social.lib.php

@@ -674,7 +674,7 @@ class SocialManager extends UserManager {
 		if ($show == 'messages') {
 				echo '<ul class="social_menu_messages">';
 					echo '<li class="socialMenuSubLevel"><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php?f=social">'.Display::return_icon('inbox.png', get_lang('Inbox'), array('hspace'=>'6')).'<span class="menuTex4" >'.get_lang('Inbox').'</span></a></li>';
-					echo '<li class="socialMenuSubLevel"><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php?f=social">'.Display::return_icon('message_new.png', get_lang('ComposeMessage'), array('hspace'=>'6')).'<span class="menuTex4" >'.get_lang('ComposeMessage').'</span></a></li>';
+					echo '<li class="socialMenuSubLevel"><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php?f=social">'.Display::return_icon('message_new.png', get_lang('ComposeMessage'), array('hspace'=>'6','style'=>'float:left')).'<span class="menuTex4" >'.get_lang('ComposeMessage').'</span></a></li>';
 					echo '<li class="socialMenuSubLevel"><a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php?f=social">'.Display::return_icon('outbox.png', get_lang('Outbox'), array('hspace'=>'6')).'<span class="menuTex4" >'.get_lang('Outbox').'</span></a></li>';
 				echo '</ul>';
 			}
@@ -695,23 +695,9 @@ class SocialManager extends UserManager {
                 </div>'; 
         
         if ($show == 'group_messages' && !empty($group_id)) {
-        	
         	echo GroupPortalManager::show_group_column_information($group_id, api_get_user_id());
-        	
-        }        		
-        /*
-              echo  '<div align="center" class="menuTitle"><span class="menuTex1">Nombre del Grupo en que me encuentro</span></div>
-				<ul>
-				<li><img src="images/newtopic.png"/> <a href="#"><span>New Topic</span></a></li>
-				<li><img src="images/messagelist.png"/> <a href="#"><span>Message list</span></a></li>
-				<li><img src="images/edit.png"/> <a href="#"><span>Edit Group</span></a></li>
-				<li><img src="images/friends.jpg"/> <a href="#"><span>Members list</span></a></li>
-				<li><img src="images/groups.jpg"/> <a href="#"><span>Invite Friends</span></a></li>
-				</ul>';		
-            */    		
-           echo '</div>';
-		
-		
+        }        		  		
+        echo '</div>';
 	}
 	
 		

+ 2 - 1
main/messages/new_message.php

@@ -157,8 +157,9 @@ function manage_form ($default, $select_from_user_list = null) {
 	
 	$group_id = intval($_REQUEST['group_id']);
 	$message_id = intval($_GET['message_id']);
+	$param_f = isset($_GET['f'])?Security::remove_XSS($_GET['f']):'';
 
-	$form = new FormValidator('compose_message',null,null,null,array('enctype'=>'multipart/form-data'));	
+	$form = new FormValidator('compose_message',null,api_get_self().'?f='.$param_f,null,array('enctype'=>'multipart/form-data'));	
 	if (empty($group_id)) {		
 		if (isset($select_from_user_list)) {
 			$form->add_textfield('id_text_name', get_lang('SendMessageTo'),true,array('size' => 40,'id'=>'id_text_name','onkeyup'=>'send_request_and_search()','autocomplete'=>'off','style'=>'padding:0px'));

+ 22 - 3
main/messages/view_message.php

@@ -31,10 +31,23 @@ if ($_REQUEST['f']=='social') {
 $interbreadcrumb[]= array ('url' => '#','name' => get_lang('View'));
 Display::display_header('');
 
-if ($_GET['f']=='social') {
+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>';
+	*/
 	$social_parameter = '?f=social';
 } else {
 	if (api_get_setting('extended_profile') == 'true') {
@@ -53,8 +66,10 @@ if ($_GET['f']=='social') {
 }
 
 echo '<div id="inbox-wrapper">';
+	$id_content_right = '';
 	//LEFT COLUMN
 	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>';
@@ -64,10 +79,14 @@ echo '<div id="inbox-wrapper">';
 		echo '</div>';
 	} else {
 		require_once api_get_path(LIBRARY_PATH).'social.lib.php';
-		SocialManager::show_social_menu('messages');		
+		$id_content_right = 'socialContentRigth';
+		echo '<div id="socialContentLeft">';	
+			//this include the social menu div
+			SocialManager::show_social_menu('messages');
+		echo '</div>';				
 	}
 
-	echo '<div id="inbox">';
+	echo '<div id="'.$id_content_right.'">';
 		//MAIN CONTENT
 		
 		if (empty($_GET['id'])) {

+ 8 - 2
main/social/group_invitation.php

@@ -488,9 +488,15 @@ unset($sessionUsersList);
 <?php
 
 //current group members		
-$members = GroupPortalManager::get_users_by_group($group_id, true, array(GROUP_USER_PERMISSION_PENDING_INVITATION));
+$members = GroupPortalManager::get_users_by_group($group_id, false, array(GROUP_USER_PERMISSION_PENDING_INVITATION));
 if (is_array($members) && count($members)>0) {
-	echo get_lang('UsersAlreadyInvited');
+	
+	foreach ($members as &$member) {
+		$image_path = UserManager::get_user_picture_path_by_id($member['user_id'], 'web', false, true);												
+		$picture = UserManager::get_picture_user($member['user_id'], $image_path['file'],80);										
+		$member['image'] = '<img src="'.$picture['file'].'"  width="50px" height="50px"  />';
+	}	
+	echo '<span class="groupTex1"><strong>'.get_lang('UsersAlreadyInvited').'</strong></span>';
 	Display::display_sortable_grid('invitation_profile', array(), $members, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, false, true,true));
 }
 

+ 6 - 1
main/social/group_members.php

@@ -102,7 +102,7 @@ if (! empty($show_message)){
 	Display :: display_normal_message($show_message);
 }
 
-$users	= GroupPortalManager::get_users_by_group($group_id, true, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_MODERATOR), 0 , 1000);
+$users	= GroupPortalManager::get_users_by_group($group_id, false, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_MODERATOR), 0 , 1000);
 $new_member_list = array();
 
 echo '<div id="socialContent">';
@@ -133,6 +133,11 @@ echo '<div id="socialContent">';
 						}
 					break;				
 				}
+				
+				$image_path = UserManager::get_user_picture_path_by_id($user['user_id'], 'web', false, true);												
+				$picture = UserManager::get_picture_user($user['user_id'], $image_path['file'],80);										
+				$user['image'] = '<img src="'.$picture['file'].'"  width="50px" height="50px"  />';
+				
 			$new_member_list[] = $user;
 		}		
 		if (count($new_member_list) > 0) {			

+ 50 - 22
main/social/groups.php

@@ -149,22 +149,19 @@ echo '</div>';
 
 echo '<div id="socialContent">';
 
-
 	echo '<div id="socialContentLeft">';	
 		//this include the social menu div
 		if ($group_id != 0 ) {
 			SocialManager::show_social_menu('group_messages',$group_id);	
 		} else {
 			SocialManager::show_social_menu('groups');
-		}
-		
+		}	
 	echo '</div>';
 
 	echo '<div id="socialContentRigth">';
 
-	
-	
-if ($group_id != 0 ) {
+if ($group_id != 0 ) {	
+	$group_info = GroupPortalManager::get_group_data($group_id);
 	//Loading group information
 	if (isset($_GET['status']) && $_GET['status']=='sent') {
 		Display::display_confirmation_message(get_lang('MessageHasBeenSent'), false);
@@ -182,8 +179,7 @@ if ($group_id != 0 ) {
 	if (isset($_GET['action']) && $_GET['action']=='join') {
 		// we add a user only if is a open group
 		$user_join = intval($_GET['u']);	
-		if (api_get_user_id() == $user_join && !empty($group_id)) {
-			$group_info = GroupPortalManager::get_group_data($group_id);
+		if (api_get_user_id() == $user_join && !empty($group_id)) {			
 			if ($group_info['visibility'] == GROUP_PERMISSION_OPEN) {
 				GroupPortalManager::add_user_to_group($user_join, $group_id);				
 			} else {
@@ -195,22 +191,55 @@ if ($group_id != 0 ) {
 	//-- Shows left column
 	//echo GroupPortalManager::show_group_column_information($group_id, api_get_user_id());
 	//---
-		
-	//-- Show message groups	
-	echo '<div id="layout_right" style="margin-left: 290px;">';	
-		echo '<div class="messages">';
-			if (GroupPortalManager::is_group_member($group_id)) {
-				$content = MessageManager::display_messages_for_group($group_id);				
-				if (!empty($content)) {
-					echo $content;				
+			
+	// details about the current group
+	echo '<div class="head_group" >';
+		echo '<div id="group_image" style="float:left;height:110px">';
+				$picture	= GroupPortalManager::get_picture_group($group_id, $group_info['picture_uri'],160,'medium_');
+				$big_image	= GroupPortalManager::get_picture_group($group_id, $group_info['picture_uri'],'','big_');	
+				if (basename($picture['file']) != 'unknown_group.png') {
+					echo '<a class="thickbox" href="'.$big_image['file'].'"><img src='.$big_image['file'].' width="85" height="85" style="border:4px solid #eee;"/> </a><br /><br />';
 				} else {
-					echo get_lang('YouShouldCreateATopic');	
+					echo '<img src='.$picture['file'].' width="85" height="85" style="border:4px solid #eee;" /><br /><br />';
+				}		
+		echo '</div>';
+		echo '<div id="group_details" style="margin-left:105px">';
+				//Group's title
+				echo '<h3><a href="groups.php?id='.$group_id.'">'.$group_info['name'].'</a></h3>';
+				//Group's description 
+				echo '<div id="group_description">'.$group_info['description'].'</div>';
+				echo '<div id="group-url"><a target="_blank" href="'.$group_info['url'].'">'.$group_info['url'].'</a></div>';
+				//Privacy
+				echo '<div id="group_privacy">';
+				echo get_lang('Privacy').' : ';
+				if ($group_info['visibility']== GROUP_PERMISSION_OPEN) {
+				echo get_lang('ThisIsAnOpenGroup');
+				} elseif ($group_info['visibility']== GROUP_PERMISSION_CLOSED) {
+				echo get_lang('ThisIsACloseGroup');
 				}
+				echo '</div>';
+				//Group's tags
+				if (!empty($tags)) {
+					echo '<div id="group_tags">'.get_lang('Tags').' : '.$tags.'</div>';
+				}				
+		echo '</div>';
+	echo '</div>';
+	echo '<div class="clear"></div>';
+	
+	//-- Show message groups
+	echo '<div class="messages">';
+	echo '<h2>'.get_lang('Topics').'</h2>';
+		if (GroupPortalManager::is_group_member($group_id)) {
+			$content = MessageManager::display_messages_for_group($group_id);				
+			if (!empty($content)) {
+				echo $content;				
 			} else {
-				echo get_lang('YouShouldJoinTheGroup');
+				echo get_lang('YouShouldCreateATopic');	
 			}
-		echo '</div>'; // end layout messages
-	echo '</div>'; // end layout right
+		} else {
+			echo get_lang('YouShouldJoinTheGroup');
+		}
+	echo '</div>'; // end layout messages
 	
 } else {		
 
@@ -329,8 +358,7 @@ if ($group_id != 0 ) {
 		   		echo '<div class="groupText3">'.strtoupper(get_lang('MyGroups')).'</div>';                  
 		        if (count($grid_my_groups) > 0) {
 		        	Display::display_sortable_grid('mygroups', array(), $grid_my_groups, array('hide_navigation'=>true, 'per_page' => 2), $query_vars, false, array(true, true, true,false));
-		        }
-		        	        	                 		
+		        }		        	        	                 		
 				if (count($grid_newest_groups) > 0) {
 					echo '<div class="groupText3">'.strtoupper(get_lang('Newest')).'</div>';				
 					Display::display_sortable_grid('newest', array(), $grid_newest_groups, array('hide_navigation'=>true, 'per_page' => 100), $query_vars, false, array(true, true, true,false));