diff --git a/main/css/base.css b/main/css/base.css
index 8180daa8ec..f88621f469 100644
--- a/main/css/base.css
+++ b/main/css/base.css
@@ -1224,6 +1224,27 @@ a.unread {
/*SOCIAL TOOL*/
+.clip-wrapper {
+ position:relative;
+ width:100px;
+ height:100px;
+ top:-1px;
+ left:-1px;
+}
+.clip_vertical {
+ position:absolute;
+ clip:rect(0px 218px 155px 0px);
+ top:-42px;
+ left:-32px;
+}
+
+.clip_horizontal {
+ position:absolute;
+ clip:rect(0px 218px 155px 0px);
+ top:-25px;
+ left:-48px;
+}
+
.social-plugin-item {
float:left;
width:50%;
@@ -1314,7 +1335,7 @@ div.image-social-content center.friend {
height:auto;
overflow:hidden;
float:left;
- width:700px;
+ width:700px;
}
.social-content-image {
@@ -1333,7 +1354,6 @@ div.image-social-content center.friend {
width:175px;
}
-
.social-content-description {
background:#ECE9D8;
}
@@ -1346,19 +1366,22 @@ div.image-social-content center.friend {
border-right:1px #9DACBF solid;
border-bottom:1px #9DACBF solid;
}
+.social-profile-info {
+ width:100%;
+}
.social-profile-info dt {
text-align:left;
clear:left;
float:left;
- width:80px;
+ width:120px;
}
.social-profile-info dd {
padding:1px 0px 3px 0px;
float:left;
margin:0;
display : block;
- padding-left:10px;
- width:200px;
+ padding-left:5px;
+ width:150px;
}
/* general layout of the profile page */
@@ -1617,13 +1640,13 @@ div.image-social-content center.friend {
}
.hidden_message {
- background-color:#5A5A5A;
+ background-color:#5A5A5A;
padding:2px;
margin:0px;
}
.hidden_message a {
- color:#fff;
+ color:#fff !important;
/* text-decoration: underline; */
}
@@ -2004,4 +2027,4 @@ div.admin_section h4 {
float: right;
margin: 2px auto;
padding: 0;
-}
+}
\ No newline at end of file
diff --git a/main/css/base_chamilo.css b/main/css/base_chamilo.css
index c80a696c21..03e488b749 100644
--- a/main/css/base_chamilo.css
+++ b/main/css/base_chamilo.css
@@ -2873,8 +2873,7 @@ span.form_required {
/* input values to crop the image: top, right, bottom, left */
.online_grid_element_0 img{
- width: 200px;
- margin: -10px 0 0 -50px;
+ /* width: 200px; */
/* height: 150px; */
}
diff --git a/main/inc/lib/social.lib.php b/main/inc/lib/social.lib.php
index 138f0c4bc2..3d4d736fef 100755
--- a/main/inc/lib/social.lib.php
+++ b/main/inc/lib/social.lib.php
@@ -13,6 +13,8 @@ define('SOCIAL_LEFT_PLUGIN', 1);
define('SOCIAL_CENTER_PLUGIN', 2);
define('SOCIAL_RIGHT_PLUGIN', 3);
+define('CUT_GROUP_NAME', 50);
+
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'message.lib.php';
@@ -814,7 +816,14 @@ class SocialManager extends UserManager {
$table_row[] = '';
} else {
$friends_profile = UserManager::get_picture_user($uid, $image_array['file'], 80, USER_IMAGE_SIZE_ORIGINAL );
- $table_row[] = '
';
+
+ $img = '
';
+
+ $clip = 'clip_vertical';
+ if ($friends_profile['original_height'] > $friends_profile['original_width']) {
+ $clip = 'clip_horizontal';
+ }
+ $table_row[] = Display::url(Display::div(Display::div($img, array('class'=>$clip)), array('class'=>'clip-wrapper')) , $url);
}
$table_row[] = ''.(cut($user_info['firstName'],16)).'
'.cut($user_info['lastName'],18).'';
diff --git a/main/inc/lib/usermanager.lib.php b/main/inc/lib/usermanager.lib.php
index 1bbbc7190f..6d53d312df 100755
--- a/main/inc/lib/usermanager.lib.php
+++ b/main/inc/lib/usermanager.lib.php
@@ -2351,7 +2351,9 @@ class UserManager
$dimension = api_getimagesize($picture['file']);
$margin = (($height - $dimension[1]) / 2);
//@ todo the padding-top should not be here
- $picture['style'] = ' style="padding-top:'.$margin.'px; width:'.$dimension[0].'px; height:'.$dimension[1].'px;" ';
+ $picture['style'] = ' style="padding-top:'.$margin.'px; width:'.$dimension[0].'px; height:'.$dimension[1].'px;" ';
+ $picture['original_height'] = $dimension[0];
+ $picture['original_width'] = $dimension[1];
}
} else {
//$file = api_get_path(SYS_CODE_PATH).$patch_profile.$user_id.'/'.$picture_file;
diff --git a/main/social/friends.php b/main/social/friends.php
index 47ee5875a4..906992ebc3 100755
--- a/main/social/friends.php
+++ b/main/social/friends.php
@@ -61,7 +61,7 @@ function show_icon_delete(element_html) {
elem_id=$(element_html).attr("id");
id_elem=elem_id.split("_");
ident="#img_"+id_elem[1];
- $(ident).attr("src","../img/delete.gif");
+ $(ident).attr("src","../img/delete.png");
$(ident).attr("alt","'.get_lang('Delete', '').'");
$(ident).attr("title","'.get_lang('Delete', '').'");
}
@@ -155,7 +155,7 @@ if (count($friends) == 0 ) {
$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.='
'.get_lang('Users').'
'; foreach($users as $user) { + $url = api_get_path(WEB_PATH).'main/social/profile.php?u='.$user['user_id']; if (empty($user['picture_uri'])) { - $picture['file'] = api_get_path(WEB_CODE_PATH).'img/unknown_180_100.jpg'; + $picture['file'] = api_get_path(WEB_CODE_PATH).'img/unknown_180_100.jpg'; + $img = Display::url('