aboutsummaryrefslogtreecommitdiff
path: root/mod/profile
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-09 09:05:07 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-09 09:05:07 +0000
commit6ca24436bdb144d68cc772ce6b5a75929d35b773 (patch)
treee7e00b146eb445a7da593306f17377e0b816b85d /mod/profile
parent9c922a7d49298417333deaceee320886dfc222e1 (diff)
downloadelgg-6ca24436bdb144d68cc772ce6b5a75929d35b773.tar.gz
elgg-6ca24436bdb144d68cc772ce6b5a75929d35b773.tar.bz2
new profile avatar page
git-svn-id: https://code.elgg.org/elgg/trunk@1342 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile')
-rw-r--r--mod/profile/editicon.php6
-rw-r--r--mod/profile/languages/en.php4
-rw-r--r--mod/profile/views/default/profile/editicon.php16
3 files changed, 24 insertions, 2 deletions
diff --git a/mod/profile/editicon.php b/mod/profile/editicon.php
index 145932795..3dc10cc21 100644
--- a/mod/profile/editicon.php
+++ b/mod/profile/editicon.php
@@ -15,9 +15,13 @@
// Make sure we're logged in
if (!isloggedin()) forward();
+
+ // set title
+ $area1 = elgg_view_title(elgg_echo('profile:createicon:header'));
+ $area1 .= elgg_view("profile/editicon");
// Get the form and correct canvas area
- $body = elgg_view_layout("one_column", elgg_view("profile/editicon"));
+ $body = elgg_view_layout("one_column", $area1);
// Draw the page
page_draw(elgg_echo("profile:editicon"),$body);
diff --git a/mod/profile/languages/en.php b/mod/profile/languages/en.php
index 33e210f88..e9d96e79d 100644
--- a/mod/profile/languages/en.php
+++ b/mod/profile/languages/en.php
@@ -24,7 +24,9 @@
'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:currentavatar' => "Your current avatar",
+ 'profile:createicon:header' => "Upload your profile picture",
+ 'profile:createicon:instructions' => "Click and drag to crop your main profile photo into a cool avatar",
'profile:aboutme' => "About me",
'profile:description' => "About me",
diff --git a/mod/profile/views/default/profile/editicon.php b/mod/profile/views/default/profile/editicon.php
index b580426b7..eca239872 100644
--- a/mod/profile/views/default/profile/editicon.php
+++ b/mod/profile/views/default/profile/editicon.php
@@ -17,6 +17,19 @@
<!-- grab the required js for icon cropping -->
<script type="text/javascript" src="<?php echo $vars['url']; ?>mod/profile/views/default/js/jquery.imgareaselect-0.4.2.js"></script>
+<div id="current_user_avatar" style="float:right;width:200px;">
+
+ <p><?php echo elgg_echo('profile:currentavatar'); ?>:</p>
+ <?php
+
+ $user_avatar = $vars['url'] . "pg/icon/" . $_SESSION['user']->username . "/medium/" . $_SESSION['user']->icontime . ".jpg";
+ echo "<img src=\"{$user_avatar}\" alt=\"avatar\" />";
+
+ ?>
+
+</div>
+
+<div id="profile_picture_form">
<form action="<?php echo $vars['url']; ?>action/profile/iconupload" method="post" enctype="multipart/form-data">
<p>
<?php echo elgg_echo("profile:editicon"); ?>:
@@ -32,9 +45,12 @@
<input type="submit" class="submit_button" value="<?php echo elgg_echo("upload"); ?>" />
</p>
</form>
+</div>
<?php
+ echo "<hr>";
+ echo "<h3>Create a new avatar:</h3>";
echo elgg_echo("profile:createicon:instructions") . ": <br />";
//display the current user photo
$user_master_image = $vars['url'] . "pg/icon/" . $_SESSION['user']->username . "/master/" . $_SESSION['user']->icontime . ".jpg";