From d53280ff80b672255a8ae2469a668f3b8f63977f Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 23 Jun 2008 21:05:35 +0000 Subject: Image cropping works! git-svn-id: https://code.elgg.org/elgg/trunk@1082 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/profile/actions/iconupload.php | 3 ++- mod/profile/languages/en.php | 3 +++ mod/profile/start.php | 1 + mod/profile/views/default/profile/editicon.php | 19 +++++++++++-------- 4 files changed, 17 insertions(+), 9 deletions(-) (limited to 'mod') diff --git a/mod/profile/actions/iconupload.php b/mod/profile/actions/iconupload.php index 8dcfeea36..bb3b19528 100644 --- a/mod/profile/actions/iconupload.php +++ b/mod/profile/actions/iconupload.php @@ -23,7 +23,8 @@ if ($small !== false && $medium !== false - && $large !== false) { + && $large !== false + && $tiny !== false) { $filehandler = new ElggFile(); $filehandler->owner_guid = $_SESSION['user']->getGUID(); diff --git a/mod/profile/languages/en.php b/mod/profile/languages/en.php index 4074b2d53..40d5bb0ac 100644 --- a/mod/profile/languages/en.php +++ b/mod/profile/languages/en.php @@ -22,6 +22,9 @@ 'profile:edit' => "Edit profile", 'profile:editicon' => "Change your profile picture", + 'profile:icon' => "Profile icon", + 'profile:createicon' => "Create your avatar", + 'profile:createicon:instructions' => "Click and drag to crop your image", 'profile:aboutme' => "About me", 'profile:description' => "About me", diff --git a/mod/profile/start.php b/mod/profile/start.php index 63b579784..0cd8f2100 100644 --- a/mod/profile/start.php +++ b/mod/profile/start.php @@ -119,6 +119,7 @@ global $CONFIG; register_action("profile/edit",false,$CONFIG->pluginspath . "profile/actions/edit.php"); register_action("profile/iconupload",false,$CONFIG->pluginspath . "profile/actions/iconupload.php"); + register_action("profile/cropicon",false,$CONFIG->pluginspath . "profile/actions/cropicon.php"); // Define widgets for use in this context use_widgets('profile'); diff --git a/mod/profile/views/default/profile/editicon.php b/mod/profile/views/default/profile/editicon.php index f6a863ab7..7bc142a26 100644 --- a/mod/profile/views/default/profile/editicon.php +++ b/mod/profile/views/default/profile/editicon.php @@ -35,7 +35,7 @@ "; + echo elgg_echo("profile:createicon:instructions") . ":
"; //display the current user photo $user_master_image = $vars['url'] . "pg/icon/" . $_SESSION['user']->username . "/master/" . $_SESSION['user']->icontime . ".jpg"; @@ -106,9 +106,11 @@

-User profile photo" style="float: left; margin-right: 10px;" /> +

+

Selection coordinates:
@@ -126,10 +128,11 @@

-
- - - - - + + + + + + + " />
\ No newline at end of file -- cgit v1.2.3