[svn r20561] Improvements to the user picture (2 new size picture now available) FS#4108 by jhp1411

skala
Julio Montoya 17 years ago
parent 142b18f05c
commit cffc62ddca
  1. 53
      main/admin/user_add.php
  2. 53
      main/admin/user_edit.php
  3. 54
      main/auth/profile.php
  4. 32
      main/css/academica/default.css
  5. 31
      main/css/baby_orange/default.css
  6. 27
      main/css/blue_lagoon/default.css
  7. 27
      main/css/cool_blue/default.css
  8. 31
      main/css/corporate/default.css
  9. 31
      main/css/cosmic_campus/default.css
  10. 27
      main/css/delicious_bordeaux/default.css
  11. 27
      main/css/dokeos_blue/default.css
  12. 32
      main/css/dokeos_classic/default.css
  13. 31
      main/css/dokeos_classic_2D/default.css
  14. 27
      main/css/empire_green/default.css
  15. 27
      main/css/fruity_orange/default.css
  16. 31
      main/css/medical/default.css
  17. 31
      main/css/public_admin/default.css
  18. 27
      main/css/royal_purple/default.css
  19. 31
      main/css/silver_line/default.css
  20. 31
      main/css/sober_brown/default.css
  21. 27
      main/css/steel_grey/default.css
  22. 27
      main/css/tasty_olive/default.css
  23. 5
      main/forum/forumfunction.inc.php
  24. 63
      main/inc/lib/usermanager.lib.php
  25. 8
      main/social/group_contact.inc.php
  26. 31
      main/social/profile.php
  27. 23
      main/social/select_friend_response.php
  28. 15
      main/social/show_search_image.inc.php
  29. 21
      main/user/user.php
  30. 5
      whoisonline.php

@ -1,4 +1,4 @@
<?php // $Id: user_add.php 20441 2009-05-10 07:39:15Z ivantcholakov $
<?php // $Id: user_add.php 20561 2009-05-12 19:35:39Z juliomontoya $
/*
==============================================================================
Dokeos - elearning and course management software
@ -367,7 +367,7 @@ if( $form->validate())
// picture path
$picture_path = api_get_path(SYS_CODE_PATH).'upload/users/'.$user_id.'/';
if (strlen($picture['name']) > 0 ) {
if (!is_dir($picture_path)) {
if (mkdir($picture_path)) {
@ -376,38 +376,33 @@ if( $form->validate())
chmod($picture_path,$perm);
}
}
$picture_location = $picture_path.$picture_uri;
$big_picture_location = $picture_path.'big_'.$picture_uri;
// get the picture and resize it 100x150
$temp = new image($_FILES['picture']['tmp_name']);
$picture_infos=getimagesize($_FILES['picture']['tmp_name']);
$thumbwidth = IMAGE_THUMBNAIL_WIDTH;
if (empty($thumbwidth) or $thumbwidth==0) {
$thumbwidth=150;
}
$divider = ($picture_infos[0] > 0)?$picture_infos[0]:1;
$new_height = round(($thumbwidth/$divider)*$picture_infos[1]);
$temp->resize($thumbwidth,$new_height,0);
$type=$picture_infos[2];
// original picture
$big_temp = new image($_FILES['picture']['tmp_name']);
$small_temp = UserManager::resize_picture($_FILES['picture']['tmp_name'], 22); //small picture
$medium_temp = UserManager::resize_picture($_FILES['picture']['tmp_name'], 85); //medium picture
$temp = UserManager::resize_picture($_FILES['picture']['tmp_name'], 200); // normal picture
$big_temp = new image($_FILES['picture']['tmp_name']); // original picture
switch (!empty($type)) {
case 2 : $temp->send_image('JPG',$picture_location);
$big_temp->send_image('JPG',$big_picture_location);
break;
case 3 : $temp->send_image('PNG',$picture_location);
$big_temp->send_image('JPG',$big_picture_location);
break;
case 1 : $temp->send_image('GIF',$picture_location);
$big_temp->send_image('JPG',$big_picture_location);
break;
case 2 :
$small_temp->send_image('JPG',$picture_path.'small_'.$picture_uri);
$medium_temp->send_image('JPG',$picture_path.'medium_'.$picture_uri);
$temp->send_image('JPG',$picture_path.$picture_uri);
$big_temp->send_image('JPG',$picture_path.'big_'.$picture_uri);
break;
case 3 :
$small_temp->send_image('PNG',$picture_path.'small_'.$picture_uri);
$medium_temp->send_image('PNG',$picture_path.'medium_'.$picture_uri);
$temp->send_image('PNG',$picture_path.$picture_uri);
$big_temp->send_image('PNG',$picture_path.'big_'.$picture_uri);
break;
case 1 :
$small_temp->send_image('GIF',$picture_path.'small_'.$picture_uri);
$medium_temp->send_image('GIF',$picture_path.'medium_'.$picture_uri);
$temp->send_image('GIF',$picture_path.$picture_uri);
$big_temp->send_image('GIF',$picture_path.'big_'.$picture_uri);
break;
}
}
$extras = array();

@ -1,4 +1,4 @@
<?php // $Id: user_edit.php 20035 2009-04-23 21:49:20Z cfasanando $
<?php // $Id: user_edit.php 20561 2009-05-12 19:35:39Z juliomontoya $
/*
==============================================================================
Dokeos - elearning and course management software
@ -335,37 +335,32 @@ if( $form->validate())
{
mkpath($picture_location);
}
$picture_location .= $picture_uri;
$big_picture_location .= 'big_'.$picture_uri;
// get the picture and resize it 100x150
$temp = new image($_FILES['picture']['tmp_name']);
$picture_infos=getimagesize($_FILES['picture']['tmp_name']);
$thumbwidth = IMAGE_THUMBNAIL_WIDTH;
if (empty($thumbwidth) or $thumbwidth==0) {
$thumbwidth=150;
}
$divizor = ($picture_infos[0] > 0)?$picture_infos[0]:1;
$new_height = round(($thumbwidth/$divizor)*$picture_infos[1]);
$temp->resize($thumbwidth,$new_height,0);
$picture_infos=getimagesize($_FILES['picture']['tmp_name']);
$type=$picture_infos[2];
// original picture
$big_temp = new image($_FILES['picture']['tmp_name']);
$small_temp = UserManager::resize_picture($_FILES['picture']['tmp_name'], 22); //small picture
$medium_temp = UserManager::resize_picture($_FILES['picture']['tmp_name'], 85); //medium picture
$temp = UserManager::resize_picture($_FILES['picture']['tmp_name'], 200); // normal picture
$big_temp = new image($_FILES['picture']['tmp_name']); // original picture
switch (!empty($type)) {
case 2 : $temp->send_image('JPG',$picture_location);
$big_temp->send_image('JPG',$big_picture_location);
break;
case 3 : $temp->send_image('PNG',$picture_location);
$big_temp->send_image('JPG',$big_picture_location);
break;
case 1 : $temp->send_image('GIF',$picture_location);
$big_temp->send_image('JPG',$big_picture_location);
break;
case 2 :
$small_temp->send_image('JPG',$picture_location.'small_'.$picture_uri);
$medium_temp->send_image('JPG',$picture_location.'medium_'.$picture_uri);
$temp->send_image('JPG',$picture_location.$picture_uri);
$big_temp->send_image('JPG',$picture_location.'big_'.$picture_uri);
break;
case 3 :
$small_temp->send_image('PNG',$picture_location.'small_'.$picture_uri);
$medium_temp->send_image('PNG',$picture_location.'medium_'.$picture_uri);
$temp->send_image('PNG',$picture_location.$picture_uri);
$big_temp->send_image('PNG',$picture_location.'big_'.$picture_uri);
break;
case 1 :
$small_temp->send_image('GIF',$picture_location.'small_'.$picture_uri);
$medium_temp->send_image('GIF',$picture_location.'medium_'.$picture_uri);
$temp->send_image('GIF',$picture_location.$picture_uri);
$big_temp->send_image('GIF',$picture_location.'big_'.$picture_uri);
break;
}
}

@ -1,4 +1,4 @@
<?php // $Id: profile.php 20174 2009-04-29 04:34:13Z ivantcholakov $
<?php // $Id: profile.php 20561 2009-05-12 19:35:39Z juliomontoya $
/* For licensing terms, see /dokeos_license.txt */
/**
==============================================================================
@ -474,36 +474,36 @@ function upload_user_image($user_id)
} else {
$picture_filename = (PREFIX_IMAGE_FILENAME_WITH_UID ? $user_id.'_' : '').uniqid('').'.'.$file_extension;
}
// get the picture and resize it 200x200 only if the picture is bigger than 200px (width)
$temp = new image($_FILES['picture']['tmp_name']);
$picture_infos=getimagesize($_FILES['picture']['tmp_name']);
$max_size_for_picture = 200; // in pixels
if ($picture_infos[0]>$max_size_for_picture) {
$thumbwidth = $max_size_for_picture;
if (empty($thumbwidth) or $thumbwidth==0) {
$thumbwidth=$max_size_for_picture;
}
$new_height = round(($thumbwidth/$picture_infos[0])*$picture_infos[1]);
$temp->resize($thumbwidth,$new_height,0);
}
// get the picture and resize only if the picture is bigger width
$picture_infos=getimagesize($_FILES['picture']['tmp_name']);
$type=$picture_infos[2];
$small_temp = UserManager::resize_picture($_FILES['picture']['tmp_name'], 22); //small picture
$medium_temp = UserManager::resize_picture($_FILES['picture']['tmp_name'], 85); //medium picture
$temp = UserManager::resize_picture($_FILES['picture']['tmp_name'], 200); // normal picture
$big_temp = new image($_FILES['picture']['tmp_name']); // original picture
// original picture
$big_temp = new image($_FILES['picture']['tmp_name']);
switch (!empty($type)) {
case 2 : $temp->send_image('JPG',$image_repository.$picture_filename);
$big_temp->send_image('JPG',$image_repository.'big_'.$picture_filename);
break;
case 3 : $temp->send_image('PNG',$image_repository.$picture_filename);
$big_temp->send_image('JPG',$image_repository.'big_'.$picture_filename);
break;
case 1 : $temp->send_image('GIF',$image_repository.$picture_filename);
$big_temp->send_image('JPG',$image_repository.'big_'.$picture_filename);
break;
case 2 :
$small_temp->send_image('JPG',$image_repository.'small_'.$picture_filename);
$medium_temp->send_image('JPG',$image_repository.'medium_'.$picture_filename);
$temp->send_image('JPG',$image_repository.$picture_filename);
$big_temp->send_image('JPG',$image_repository.'big_'.$picture_filename);
break;
case 3 :
$small_temp->send_image('PNG',$image_repository.'small_'.$picture_filename);
$medium_temp->send_image('PNG',$image_repository.'medium_'.$picture_filename);
$temp->send_image('PNG',$image_repository.$picture_filename);
$big_temp->send_image('PNG',$image_repository.'big_'.$picture_filename);
break;
case 1 :
$small_temp->send_image('GIF',$image_repository.'small_'.$picture_filename);
$medium_temp->send_image('GIF',$image_repository.'medium_'.$picture_filename);
$temp->send_image('GIF',$image_repository.$picture_filename);
$big_temp->send_image('GIF',$image_repository.'big_'.$picture_filename);
break;
}
return $picture_filename;
return $picture_filename;
}
/**

@ -1601,19 +1601,11 @@ span.radio {
}
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -1796,8 +1788,8 @@ float:left;
margin-right:10px;
}
.social-friend-container {
margin-left:10px;
margin-right:10px;
margin-left:4px;
margin-right:0px;
}
.social-content-competences {
margin-left:5px;
@ -1925,3 +1917,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:82px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -1606,19 +1606,10 @@ span.radio {
}
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -1806,8 +1797,8 @@ float:left;
margin-right:10px;
}
.social-friend-container {
margin-left:10px;
margin-right:10px;
margin-left:4px;
margin-right:0px;
}
.social-content-competences {
margin-left:5px;
@ -1935,3 +1926,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:82px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -2163,19 +2163,10 @@ div.comments {
padding: 0px;
}
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -2361,3 +2352,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:81px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -2163,19 +2163,10 @@ div.comments {
padding: 0px;
}
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -2363,3 +2354,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:81px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -1598,19 +1598,10 @@ span.radio {
}
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -1798,8 +1789,8 @@ float:left;
margin-right:10px;
}
.social-friend-container {
margin-left:10px;
margin-right:10px;
margin-left:4px;
margin-right:0px;
}
.social-content-competences {
margin-left:5px;
@ -1926,3 +1917,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:82px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -1623,19 +1623,10 @@ span.radio {
}
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -1823,8 +1814,8 @@ float:left;
margin-right:10px;
}
.social-friend-container {
margin-left:10px;
margin-right:10px;
margin-left:4px;
margin-right:0px;
}
.social-content-competences {
margin-left:5px;
@ -1951,3 +1942,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:82px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -2163,19 +2163,10 @@ div.comments {
padding: 0px;
}
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -2363,3 +2354,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:81px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -2163,19 +2163,10 @@ div.comments {
padding: 0px;
}
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -2361,3 +2352,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:81px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -2115,19 +2115,11 @@ span.radio {
}
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -2315,8 +2307,8 @@ float:left;
margin-right:10px;
}
.social-friend-container {
margin-left:10px;
margin-right:10px;
margin-left:4px;
margin-right:0px;
}
.social-content-competences {
margin-left:5px;
@ -2443,3 +2435,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:82px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -2729,19 +2729,10 @@ span.radio {
}
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -2929,8 +2920,8 @@ float:left;
margin-right:10px;
}
.social-friend-container {
margin-left:10px;
margin-right:10px;
margin-left:4px;
margin-right:0px;
}
.social-content-competences {
margin-left:5px;
@ -3057,3 +3048,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:82px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -2163,19 +2163,10 @@ div.comments {
padding: 0px;
}
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -2363,3 +2354,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:81px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -2163,19 +2163,10 @@ div.comments {
padding: 0px;
}
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -2364,3 +2355,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:81px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -2104,19 +2104,10 @@ span.radio {
}
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -2304,8 +2295,8 @@ float:left;
margin-right:10px;
}
.social-friend-container {
margin-left:10px;
margin-right:10px;
margin-left:4px;
margin-right:0px;
}
.social-content-competences {
margin-left:5px;
@ -2432,3 +2423,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:82px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -2175,19 +2175,10 @@ span.radio {
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -2374,8 +2365,8 @@ float:left;
margin-right:10px;
}
.social-friend-container {
margin-left:10px;
margin-right:10px;
margin-left:4px;
margin-right:0px;
}
.social-content-competences {
margin-left:5px;
@ -2538,3 +2529,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:82px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -2163,19 +2163,10 @@ div.comments {
padding: 0px;
}
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -2363,3 +2354,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:81px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -2214,19 +2214,10 @@ span.radio {
}
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -2414,8 +2405,8 @@ float:left;
margin-right:10px;
}
.social-friend-container {
margin-left:10px;
margin-right:10px;
margin-left:4px;
margin-right:0px;
}
.social-content-competences {
margin-left:5px;
@ -2542,3 +2533,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:81px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -2164,19 +2164,10 @@ span.radio {
}
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -2364,8 +2355,8 @@ float:left;
margin-right:10px;
}
.social-friend-container {
margin-left:10px;
margin-right:10px;
margin-left:4px;
margin-right:0px;
}
.social-content-competences {
margin-left:5px;
@ -2518,3 +2509,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:81px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -2163,19 +2163,10 @@ div.comments {
padding: 0px;
}
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -2364,3 +2355,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:81px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -2163,19 +2163,10 @@ div.comments {
padding: 0px;
}
/*SOCIAL TOOL*/
.image-social-content {
cursor:pointer;
text-align:left;
margin:1px auto;
background:#ffffff;
border:1px solid #B8C8DC;
padding:5px;
width:100px;
position:relative;
margin-right:3px;
margin-left:4px;
margin-bottom:2px;
}
div.image-social-content{float:left; border:1px solid #B8C8DC; margin:2px; padding: 8px 4px 4px 4px; background: #ffffff; height:125px; width:82px; z-index:5; cursor:pointer; position:relative;}
div.image-social-content span{overflow:hidden; display:block; height:92px;}
div.image-social-content img{vertical-align:middle;}
div.image-social-content center.friend{overflow:hidden; height:30px;}
.image-social-content .image-delete {
position: absolute;
top: 1px;
@ -2361,3 +2352,13 @@ button.back {
.question_menu {list-style:none; float:left; }
.question_menu li{float:left; margin:0px;}
#exercise_admin {margin: 0; padding: 0; border: 0; }
div#friend-header{float:left; width:100%; line-height: 2.1em;}
div#friend-header a{ padding-right:6px;}
div#friend-container{float:left; }
div.image_friend_network{float:left; border:1px solid #CCCCCC; margin:2px; padding:4px; background: #EFEFEF; height:125px; width:81px; z-index:5; }
div.image_friend_network span{overflow:hidden; display:block; height:92px; margin: 0px 0px;}
div.image_friend_network img{vertical-align:middle;}
div.image_friend_network center.friend{overflow:hidden; height:30px;}
.friend_invitations{float:left; margin: 0 0 4px 12px;}

@ -2547,13 +2547,12 @@ function display_user_link($user_id, $name, $origin='') {
function display_user_image($user_id,$name, $origin='') {
$link='<a href="../user/userInfo.php?uInfo='.$user_id.'" '. (!empty($origin)? 'target="_top"': '') .'>';
$attrb=array();
if ($user_id<>0) {
$image_path = UserManager::get_user_picture_path_by_id($user_id,'web',false, true);
$image_repository = $image_path['dir'];
$existing_image = $image_path['file'];
return $link.'<img style="width:120px; height:100px;" src="'.$image_repository.$existing_image.'" alt="'.$name.'" title="'.$name.'" /></a>';
$friends_profile = UserManager::get_picture_user($user_id, $image_path['file'], 0, 'medium_' , 'width="96" height="96" ');
return $link.'<img src="'.$friends_profile['file'].'" '.$friends_profile['style'].' alt="'.$name.'" title="'.$name.'" /></a>';
} else {
return $link.'<img src="'.api_get_path(WEB_CODE_PATH)."img/unknown.jpg".'" alt="'.$name.'" title="'.$name.'" /></a>';
}

@ -1,4 +1,4 @@
<?php // $Id: usermanager.lib.php 20488 2009-05-11 17:14:41Z cvargas1 $
<?php // $Id: usermanager.lib.php 20561 2009-05-12 19:35:39Z juliomontoya $
/*
==============================================================================
Dokeos - elearning and course management software
@ -1867,4 +1867,65 @@ class UserManager
}
return false;
}
/**
* Resize a picture
*
* @param string file picture
* @param int size in pixels
* @return obj image object
*/
function resize_picture($file, $max_size_for_picture)
{
$temp = new image($file);
$picture_infos=getimagesize($file);
if ($picture_infos[0]>$max_size_for_picture) {
$thumbwidth = $max_size_for_picture;
if (empty($thumbwidth) or $thumbwidth==0) {
$thumbwidth=$max_size_for_picture;
}
$new_height = round(($thumbwidth/$picture_infos[0])*$picture_infos[1]);
if($new_height > $max_size_for_picture)
$new_height = $thumbwidth;
$temp->resize($thumbwidth,$new_height,0);
}
return $temp;
}
/**
* Gets the current user image
* @param string user id
* @param string picture user name
* @param string height
* @param string picture size it can be small_, medium_ or big_
* @param string style css
* @return array with the file and the style of an image i.e $array['file'] $array['style']
*/
function get_picture_user($user_id, $picture_file, $height, $size_picture = 'medium_', $style = '') {
$patch_profile = 'upload/users/';
$picture = array();
$picture['style'] = $style;
if ($picture_file == 'unknown.jpg') {
$picture['file'] = api_get_path(WEB_CODE_PATH).'img/'.$picture_file;
return $picture;
}
$file = api_get_path(SYS_CODE_PATH).$patch_profile.$user_id.'/'.$size_picture.$picture_file;
if(file_exists($file)) {
$picture['file'] = api_get_path(WEB_CODE_PATH).$patch_profile.$user_id.'/'.$size_picture.$picture_file;
$picture['style']='';
if ($height > 0) {
$dimension = getimagesize($picture['file']);
$margin = (($height - $dimension[1])/2);
$picture['style'] = ' style="padding-top:'.$margin.'px;" ';
}
} else {
$file = api_get_path(SYS_CODE_PATH).$patch_profile.$user_id.'/'.$picture_file;
if (file_exists($file)) {
$picture['file'] = api_get_path(WEB_CODE_PATH).$patch_profile.$user_id.'/'.$picture_file;
} else {
$picture['file'] = api_get_path(WEB_CODE_PATH).'img/unknown.jpg';
}
}
return $picture;
}
}

@ -64,8 +64,12 @@ for ($p=0;$p<count($list_groups);$p++) {
} else {
$big='big_';
}
$friend_html.='&nbsp;<div class="image-social-content" id=div_'.$list_friends_id[$j].' style="float:left;height:150px;" ><a href="javascript:void(0)" onclick=load_thick("'.$list_friends_dir[$j].$big.$list_friends_file[$j].'","") title="" class="thickbox">' .
'<img src="'.$list_friends_dir[$j].$list_friends_file[$j].'" width="90" height="110" style="margin-left:3px ;margin-rigth:3px;margin-top:10px;margin-bottom:3px;" id="imgfriend_'.$list_friends_id[$j].'" title="'.$user_name.'" />'.$user_name.'</a></div>&nbsp;';
$friends_profile = UserFriend::get_picture_user($list_friends_id[$j], $list_friends_file[$j], 92);
$friend_html.='<div id="div_'.$list_friends_id[$j].'" class="image_friend_network">' .
'<a href="javascript:void(0)" onclick=load_thick("'.$list_friends_dir[$j].$big.$list_friends_file[$j].'","") title="" class="thickbox">' .
'<span><center><img src="'.$friends_profile['file'].'" '.$friends_profile['style'].' id="imgfriend_'.$list_friends_id[$j].'" title="'.$user_name.'" /></center></span>'.
'<center class="friend">'.$user_name.'</center>'.
'</a></div>';
}
$j++;
}

@ -484,7 +484,7 @@ echo '<div id="social-profile-wrapper">';
$friend_html.= '<div style="float:left;">'.$friends_count.' '.get_lang('Friends').'</div>';
if (api_get_user_id() == $user_id)
$friend_html.= '<div style="float:right;"><a href="index.php?#remote-tab-6">'.get_lang('SeeAll').'</a></div>';
$friend_html.= '</div><br/>'; // close div friend-header
$friend_html.= '</div>'; // close div friend-header
for ($k=0;$k<$loop_friends;$k++) {
if ($j==$number_of_images) {
@ -494,26 +494,25 @@ echo '<div id="social-profile-wrapper">';
if ($list_friends_file[$j]<>"") {
$my_user_info=api_get_user_info($list_friends_id[$j]);
$name_user=$my_user_info['firstName'].' '.$my_user_info['lastName'];
//class="image-social-content"
$friend_html.='&nbsp;<div id=div_'.$list_friends_id[$j].' style="float:left;" >';
$margin_top = 10;
if ($k==0) $margin_top = 0;
$friend_html.='<div id=div_'.$list_friends_id[$j].' class="image_friend_network" ><span><center>';
// the height = 92 must be the sqme in the image_friend_network span style in default.css
$friends_profile = UserFriend::get_picture_user($list_friends_id[$j], $list_friends_file[$j], 92, 'medium_', 'width="85" height="90" ');
$friend_html.='<a href="profile.php?u='.$list_friends_id[$j].'&amp;'.$link_shared.'">';
$friend_html.='<img src="'.$list_friends_dir[$j]."/".$list_friends_file[$j].'" width="90px" height="110px" style="margin-left:3px;margin-right:3px;margin-top:'.$margin_top.'px;margin-bottom:3px;" id="imgfriend_'.$list_friends_id[$j].'" title="'.$name_user.'" />';
$friend_html.= '<br /><div style="margin-left:10px">'.$my_user_info['firstName'].'<br />'.$my_user_info['lastName'].'</div>';
$friend_html.= '</a>';
$friend_html.= '</div>&nbsp;';
$friend_html.='<img src="'.$friends_profile['file'].'" '.$friends_profile['style'].' id="imgfriend_'.$list_friends_id[$j].'" title="'.$name_user.'" />';
$friend_html.= '</center></span>';
$friend_html.= '<center class="friend">'.$my_user_info['firstName'].' '.$my_user_info['lastName'].'</a></center>';
$friend_html.= '</div>';
}
$j++;
}
}
} else {
$friend_html .= '<div class="sectiontitle">'.get_lang('Friends').'</div>';
$friend_html.= '<div id="friend-container" class="social-friend-container">';
$friend_html.= '<div id="friend-header">';
$friend_html.= '<div style="float:left;">'.get_lang('Friends').'</div>';
$friend_html.= '<div style="float:right;">'.get_lang('SeeAll').'</div>';
$friend_html.= '</div><br/><br/>'; // close div friend-header
$friend_html .= '<div class="sectiontitle">'.get_lang('Friends').'</div>';
$friend_html.= '<div id="friend-container" class="social-friend-container">';
$friend_html.= '<div id="friend-header">';
$friend_html.= '<div style="float:left;">'.get_lang('Friends').'</div>';
$friend_html.= '<div style="float:right;">'.get_lang('SeeAll').'</div>';
$friend_html.= '</div><br/><br/>'; // close div friend-header
}
$friend_html.= '</div>';
echo $friend_html;
@ -533,7 +532,7 @@ echo '<div id="social-profile-wrapper">';
echo '</div>';
for ($i=0;$i<$count_pending_invitations;$i++) {
//var_dump($invitations);
echo '<div id="dpending_'.$pending_invitations[$i]['user_sender_id'].'">';
echo '<div id="dpending_'.$pending_invitations[$i]['user_sender_id'].'" class="friend_invitations">';
echo '<div style="float:left;width:60px;" >';
echo '<img style="margin-bottom:5px;" src="'.$list_get_path_web[$i]['dir'].'/'.$list_get_path_web[$i]['file'].'" width="60px">';
echo '</div>';

@ -32,7 +32,7 @@ for ($i=0;$i<$number_loop;$i++) {
<td width="600" height="20" valign="top"><table width="100%" border="0"
cellpadding="0" cellspacing="0" bgcolor="#9DACBF">
<tr>
<td width="600" height="20" valign="top"><div align="left"><?php echo api_convert_encoding(get_lang('RequestContact'),'UTF-8',$charset); ?></div></td>
<td width="600" height="20" valign="top" style="padding:4px;"><div align="left"><b><?php echo mb_convert_encoding(get_lang('RequestContact'),'UTF-8',$charset); ?></b></div></td>
</tr>
</table></td>
</tr>
@ -49,19 +49,18 @@ cellpadding="0" cellspacing="0">
<td width="100" height="110" valign="top"><table width="100%"
border="0" cellpadding="0" cellspacing="0" bgcolor="#C8D5E4">
<tr>
<td width="100" height="110" valign="top">
<img src="<?php echo $list_get_path_web[$i]['dir']."/".$list_get_path_web[$i]['file']; ?>" width="90" height="100" style="margin-left:5px ;margin-rigth:5px;margin-top:5px;margin-bottom:5px;" /></td>
</tr>
<td width="100" height="110" style="padding:4px;" >
<?php $friends_profile = UserFriend::get_picture_user($list_get_invitation[$i]['user_sender_id'], $list_get_path_web[$i]['file'], 92); ?>
<center><img src="<?php echo $friends_profile['file']; ?>" <?php echo $friends_profile['style']; ?> /></center></td>
</tr>
</table></td>
<td width="500" valign="top"><table width="100%" border="0"
cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="500" height="22" valign="top"><table
width="100%" border="0" cellpadding="0" cellspacing="0">
<td width="500" height="22" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="500" height="22" valign="top">
<td width="500" height="22" valign="top" style="padding:2px;">
<?php
$user_id=$list_get_invitation[$i]['user_sender_id'];
$user_info=api_get_user_info($user_id);
@ -83,7 +82,7 @@ border="0" cellpadding="0" cellspacing="0">
<td height="22" valign="top"><table width="100%"
border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="500" height="22" valign="top"><?php
<td width="500" height="22" valign="top" style="padding:2px;"><?php
$title=get_lang($list_get_invitation[$i]['title']);
$content=get_lang($list_get_invitation[$i]['content']);
echo api_convert_encoding($title,'UTF-8',$charset).' : '.api_convert_encoding($content,'UTF-8',$charset);
@ -92,7 +91,7 @@ border="0" cellpadding="0" cellspacing="0">
</table></td>
</tr>
<tr>
<td height="61" valign="top"><?php
<td height="61" valign="top" style="padding:2px;"><?php
$date=$list_get_invitation[$i]['send_date'];
echo get_lang('DateSend').' : '.$date;
?></td>
@ -105,7 +104,7 @@ border="0" cellpadding="0" cellspacing="0">
<td height="25" valign="top"><table width="100%" border="0"
cellpadding="0" cellspacing="0" bgcolor="#9DACBF">
<tr>
<td width="600" height="25" valign="top"><div align="right">
<td width="600" height="25" valign="top" style="padding:4px;"><div align="right">
<input type="submit" name="btn_accepted" id="<?php echo "btn_accepted_".$user_id ?>" value="<?php echo api_convert_encoding(get_lang('Accept'),'UTF-8',$charset); ?>" onclick="javascript:register_friend(this)" />
<input type="submit" name="btn_denied" id="<?php echo "btn_deniedst_".$user_id ?>" value="<?php echo api_convert_encoding(get_lang('Deny'),'UTF-8',$charset); ?>" onclick="javascript:denied_friend(this)" />
</div></td>

@ -64,12 +64,15 @@ if (count($list_path_friends)!=0) {
if ($list_friends_file[$j]<>"") {
$user_info=api_get_user_info($list_friends_id[$j]);
$user_name=api_convert_encoding($user_info['firstName'].' '.$user_info['lastName'],'UTF-8',$charset) ;
/*$friend_html.='&nbsp;<div onMouseover="show_icon_delete(this)" onMouseout="hide_icon_delete(this)" class="image-social-content" id=div_'.$list_friends_id[$j].' style="float:left" >
<img src="'.$list_friends_dir[$j]."/".$list_friends_file[$j].'" width="90" height="110" style="margin-left:3px ;margin-rigth:3px;margin-top:10px;margin-bottom:3px;" id="imgfriend_'.$list_friends_id[$j].'" title="'.$user_name.'" onclick="qualify_friend(this)"/>
<img onclick="delete_friend (this)" id=img_'.$list_friends_id[$j].' src="../img/blank.gif" alt="" title="" class="image-delete" /></div>&nbsp;'; */
$friend_html.='&nbsp;<div onMouseover="show_icon_delete(this)" onMouseout="hide_icon_delete(this)" class="image-social-content" id=div_'.$list_friends_id[$j].' style="height:150px;float:left" >
<img src="'.$list_friends_dir[$j].$list_friends_file[$j].'" width="90" height="110" style="margin-left:3px ;margin-rigth:3px;margin-top:10px;margin-bottom:3px;" id="imgfriend_'.$list_friends_id[$j].'" title="'.$user_name.'" onclick=load_thick(\'qualify_contact.inc.php?path_user="'.urlencode($list_friends_dir[$j].$list_friends_file[$j]).'&amp;id_user="'.$list_friends_id[$j].'"\',"") />
<img onclick="delete_friend (this)" id=img_'.$list_friends_id[$j].' src="../img/blank.gif" alt="" title="" class="image-delete" /> '.$user_name.'</div>&nbsp;';
$friends_profile = UserFriend::get_picture_user($list_friends_id[$j], $list_friends_file[$j], 92);
$friend_html.='<div onMouseover="show_icon_delete(this)" onMouseout="hide_icon_delete(this)" class="image-social-content" id=div_'.$list_friends_id[$j].' >
<span><center><img src="'.$friends_profile['file'].'" '.$friends_profile['style'].' id="imgfriend_'.$list_friends_id[$j].'" title="'.$user_name.'" onclick=load_thick(\'qualify_contact.inc.php?path_user="'.urlencode($list_friends_dir[$j].$list_friends_file[$j]).'&amp;id_user="'.$list_friends_id[$j].'"\',"") /></center></span>
<img onclick="delete_friend (this)" id=img_'.$list_friends_id[$j].' src="../img/blank.gif" alt="" title="" class="image-delete" /> <center class="friend">'.$user_name.'</center></div>';
/*
* $friend_html.='&nbsp;<div onMouseover="show_icon_delete(this)" onMouseout="hide_icon_delete(this)" class="image-social-content" id=div_'.$list_friends_id[$j].' style="float:left" >
* <img src="'.$list_friends_dir[$j]."/".$list_friends_file[$j].'" width="90" height="110" style="margin-left:3px ;margin-rigth:3px;margin-top:10px;margin-bottom:3px;" id="imgfriend_'.$list_friends_id[$j].'" title="'.$user_name.'" onclick="qualify_friend(this)"/>
* <img onclick="delete_friend (this)" id=img_'.$list_friends_id[$j].' src="../img/blank.gif" alt="" title="" class="image-delete" /></div>&nbsp;';
*/
}
$j++;
}

@ -1,4 +1,4 @@
<?php // $Id: user.php 20473 2009-05-11 10:13:09Z ivantcholakov $
<?php // $Id: user.php 20561 2009-05-12 19:35:39Z juliomontoya $
/*
==============================================================================
Dokeos - elearning and course management software
@ -424,6 +424,8 @@ function search_keyword($firstname,$lastname,$username,$official_code,$keyword)
* Get the users to display on the current page.
*/
function get_user_data($from, $number_of_items, $column, $direction) {
global $origin;
$a_users=array();
// limit
@ -451,21 +453,16 @@ function get_user_data($from, $number_of_items, $column, $direction) {
if (api_is_allowed_to_edit()) {
$temp=array();
$temp[] = $user_id;
$image_path = UserManager::get_user_picture_path_by_id($user_id,'web',false, true);
$image_repository = $image_path['dir'];
$existing_image = $image_path['file'];
$image_path = UserManager::get_user_picture_path_by_id($user_id,'web',false, true);
$user_profile = UserManager::get_picture_user($user_id, $image_path['file'], 22, 'small_', ' width="22" height="22" ');
if (!api_is_anonymous()) {
$photo= '<center><a href="userInfo.php?'.api_get_cidreq().'&origin='.$origin.'&amp;uInfo='.$user_id.'" title="'.get_lang('Info').'" ><img src="'.$image_repository.$existing_image.'" alt="'.$o_course_user['firstname'].' '.$o_course_user['lastname'].'" width="22" height="22" title="'.$o_course_user['firstname'].' '.$o_course_user['lastname'].'" /></a></center>';
$photo= '<center><a href="userInfo.php?'.api_get_cidreq().'&origin='.$origin.'&amp;uInfo='.$user_id.'" title="'.get_lang('Info').'" ><img src="'.$user_profile['file'].'" '.$user_profile['style'].' alt="'.$o_course_user['firstname'].' '.$o_course_user['lastname'].'" title="'.$o_course_user['firstname'].' '.$o_course_user['lastname'].'" /></a></center>';
} else {
$photo= '<center><img src="'.$user_profile['file'].'" '.$user_profile['style'].' alt="'.$o_course_user['firstname'].' '.$o_course_user['lastname'].'" title="'.$o_course_user['firstname'].' '.$o_course_user['lastname'].'" /></center>';
}
else
{
$photo= '<center><img src="'.$image_repository.$existing_image.'" alt="'.$o_course_user['firstname'].' '.$o_course_user['lastname'].'" width="22" height="22" title="'.$o_course_user['firstname'].' '.$o_course_user['lastname'].'" /></center>';
}
$temp[] = $photo;
$temp[] = $o_course_user['firstname'];
$temp[] = $o_course_user['lastname'];

@ -1,4 +1,4 @@
<?php // $Id: whoisonline.php 20256 2009-05-02 23:37:09Z iflorespaz $
<?php // $Id: whoisonline.php 20561 2009-05-12 19:35:39Z juliomontoya $
/*
==============================================================================
Dokeos - elearning and course management software
@ -147,8 +147,9 @@ function display_user_list($user_list, $_plugins)
$url = '?id='.$uid.$course_url;
$image_array=UserManager::get_user_picture_path_by_id($uid,'web',false,true);
$friends_profile = UserFriend::get_picture_user($uid, $image_array['file'], 92, 'medium_', ' width="90" height="90" ');
//reduce image
$table_row[] = '<a href="'.$url.'"><img src="'.$image_array['dir'].$image_array['file'].'" border="1" width="130"></a>';
$table_row[] = '<center><a href="'.$url.'"><img src="'.$friends_profile['file'].'" '.$friends_profile['style'].' border="1"></a></center>';
$table_row[] = '<a href="'.$url.'">'.$user_info['firstName'].' '.$user_info['lastName'].'</a>';
//$table_row[] = '<a href="'.$url.'">'.$user_info['lastName'].'</a>';

Loading…
Cancel
Save