From 001b35c518124a97679101e35f5f1df5c1be08b0 Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 23 May 2008 10:59:37 +0000 Subject: Introducing the 'tiny' profile icon size git-svn-id: https://code.elgg.org/elgg/trunk@692 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/profile/actions/iconupload.php | 5 +++++ mod/profile/icon.php | 2 +- mod/profile/views/default/profile/icon.php | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mod/profile/actions/iconupload.php b/mod/profile/actions/iconupload.php index c30ee084d..a1e29b255 100644 --- a/mod/profile/actions/iconupload.php +++ b/mod/profile/actions/iconupload.php @@ -15,6 +15,7 @@ isloggedin() ) { + $tiny = get_resized_image_from_uploaded_file('profileicon',25,25); $small = get_resized_image_from_uploaded_file('profileicon',50,50); $medium = get_resized_image_from_uploaded_file('profileicon',100,100); $large = get_resized_image_from_uploaded_file('profileicon',300,300); @@ -37,6 +38,10 @@ $filehandler->open("write"); $filehandler->write($small); $filehandler->close(); + $filehandler->setFilename("profile/" . $_SESSION['user']->username . "tiny.jpg"); + $filehandler->open("write"); + $filehandler->write($small); + $filehandler->close(); system_message(elgg_echo("profile:icon:uploaded")); diff --git a/mod/profile/icon.php b/mod/profile/icon.php index c201d7716..efabe1d6d 100644 --- a/mod/profile/icon.php +++ b/mod/profile/icon.php @@ -20,7 +20,7 @@ // Get the size $size = strtolower(get_input('size')); - if (!in_array($size,array('large','medium','small'))) + if (!in_array($size,array('large','medium','small','tiny'))) $size = "medium"; // Try and get the icon diff --git a/mod/profile/views/default/profile/icon.php b/mod/profile/views/default/profile/icon.php index 577620b6f..036786715 100644 --- a/mod/profile/views/default/profile/icon.php +++ b/mod/profile/views/default/profile/icon.php @@ -21,7 +21,7 @@ $username = $vars['entity']->username; // Get size - if (!in_array($vars['size'],array('small','medium','large'))) + if (!in_array($vars['size'],array('small','medium','large','tiny'))) $vars['size'] = "medium"; // Get any align and js -- cgit v1.2.3