aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-23 10:59:37 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-23 10:59:37 +0000
commit001b35c518124a97679101e35f5f1df5c1be08b0 (patch)
tree08fad2a0ff557fc91ccc75119b5289330002e168 /mod
parentf5c0093da9c466df97e0049b4dc4251e12f04faf (diff)
downloadelgg-001b35c518124a97679101e35f5f1df5c1be08b0.tar.gz
elgg-001b35c518124a97679101e35f5f1df5c1be08b0.tar.bz2
Introducing the 'tiny' profile icon size
git-svn-id: https://code.elgg.org/elgg/trunk@692 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/profile/actions/iconupload.php5
-rw-r--r--mod/profile/icon.php2
-rw-r--r--mod/profile/views/default/profile/icon.php2
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