From b94cb8d234d70bc534ad1cef767b9f62d10eef26 Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 4 Nov 2010 23:50:32 -0700 Subject: add micro profile photo --- include/Photo.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'include/Photo.php') diff --git a/include/Photo.php b/include/Photo.php index ca9ae0703..98b11ab39 100644 --- a/include/Photo.php +++ b/include/Photo.php @@ -235,8 +235,18 @@ function import_profile_photo($photo,$uid,$cid) { if($r === false) $photo_failure = true; + $img->scaleImage(48); + + $r = $img->store($uid, $cid, $hash, $filename, t('Contact Photos'), 6 ); + + if($r === false) + $photo_failure = true; + + + $photo = $a->get_baseurl() . '/photo/' . $hash . '-4.jpg'; $thumb = $a->get_baseurl() . '/photo/' . $hash . '-5.jpg'; + $micro = $a->get_baseurl() . '/photo/' . $hash . '-6.jpg'; } else $photo_failure = true; @@ -244,8 +254,9 @@ function import_profile_photo($photo,$uid,$cid) { if($photo_failure) { $photo = $a->get_baseurl() . '/images/default-profile.jpg'; $thumb = $a->get_baseurl() . '/images/default-profile-sm.jpg'; + $micro = $a->get_baseurl() . '/images/default-profile-mm.jpg'; } - return(array($photo,$thumb)); + return(array($photo,$thumb,$micro)); } -- cgit v1.2.3