diff options
Diffstat (limited to 'mod/profile/views/default')
-rw-r--r-- | mod/profile/views/default/profile/editicon.php | 32 | ||||
-rw-r--r-- | mod/profile/views/default/profile/icon.php | 36 | ||||
-rw-r--r-- | mod/profile/views/default/user/user.php | 12 |
3 files changed, 76 insertions, 4 deletions
diff --git a/mod/profile/views/default/profile/editicon.php b/mod/profile/views/default/profile/editicon.php new file mode 100644 index 000000000..8e71f2f75 --- /dev/null +++ b/mod/profile/views/default/profile/editicon.php @@ -0,0 +1,32 @@ +<?php
+
+ /**
+ * Elgg profile icon edit form
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Ben Werdmuller <ben@curverider.co.uk>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity'] The user entity
+ * @uses $vars['profile'] Profile items from $CONFIG->profile, defined in profile/start.php for now
+ */
+
+?>
+
+ <form action="<?php echo $vars['url']; ?>action/profile/iconupload" method="post" enctype="multipart/form-data">
+ <p>
+ <?php echo elgg_echo("profile:editicon"); ?>:
+ </p>
+ <p>
+ <?php
+
+ echo elgg_view("input/file",array('internalname' => 'profileicon'));
+
+ ?>
+ </p>
+ <p>
+ <input type="submit" value="<?php echo elgg_echo("upload"); ?>" />
+ </p>
+ </form>
\ No newline at end of file diff --git a/mod/profile/views/default/profile/icon.php b/mod/profile/views/default/profile/icon.php new file mode 100644 index 000000000..577620b6f --- /dev/null +++ b/mod/profile/views/default/profile/icon.php @@ -0,0 +1,36 @@ +<?php
+
+ /**
+ * Elgg profile icon
+ *
+ * @package ElggProfile
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Ben Werdmuller <ben@curverider.co.uk>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity'] The user entity. If none specified, the current user is assumed.
+ * @uses $vars['size'] The size - small, medium or large. If none specified, medium is assumed.
+ */
+
+ // Get entity
+ if (empty($vars['entity']))
+ $vars['entity'] = $vars['user'];
+
+ $name = htmlentities($vars['entity']->name);
+ $username = $vars['entity']->username;
+
+ // Get size
+ if (!in_array($vars['size'],array('small','medium','large')))
+ $vars['size'] = "medium";
+
+ // Get any align and js
+ if (!empty($vars['align'])) {
+ $align = " align=\"{$vars['align']}\" ";
+ } else {
+ $align = "";
+ }
+
+?>
+
+ <a href="<?php echo $vars['entity']->getURL(); ?>"><img src="<?php echo $vars['url']; ?>pg/icon/<?php echo $username; ?>/<?php echo $vars['size']; ?>/icon.jpg" border="0" <?php echo $align; ?> title="<?php echo $name; ?>" <?php echo $vars['js']; ?> /></a>
\ No newline at end of file diff --git a/mod/profile/views/default/user/user.php b/mod/profile/views/default/user/user.php index d2411c3d9..e11c463ca 100644 --- a/mod/profile/views/default/user/user.php +++ b/mod/profile/views/default/user/user.php @@ -12,12 +12,16 @@ * @uses $vars['entity'] The user entity
*/
-?>
+ echo elgg_view(
+ "profile/icon", array(
+ 'entity' => $vars['entity'],
+ 'align' => "right",
+ 'size' => "large",
+ )
+ );
+?>
<h2><a href="<?php echo $vars['entity']->getUrl(); ?>"><?php echo $vars['entity']->name; ?></a></h2>
- <p>
- *** USER ICON TO COME ***
- </p>
<?php
if ($vars['full'] == true) {
|