aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/start.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-29 16:59:19 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-29 16:59:19 +0000
commite3112dc160a611462cc77b22644f7050480888db (patch)
treebbc7d4ec4013c7f5c338408d30219adce839ab24 /mod/profile/start.php
parent118051aadcf348d6b225a437a4df3b077f413cbe (diff)
downloadelgg-e3112dc160a611462cc77b22644f7050480888db.tar.gz
elgg-e3112dc160a611462cc77b22644f7050480888db.tar.bz2
Introducing profile icons.
git-svn-id: https://code.elgg.org/elgg/trunk@564 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile/start.php')
-rw-r--r--mod/profile/start.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/mod/profile/start.php b/mod/profile/start.php
index 03fe0eda1..86faded71 100644
--- a/mod/profile/start.php
+++ b/mod/profile/start.php
@@ -31,6 +31,7 @@
add_menu(elgg_echo('profile'), $CONFIG->wwwroot . "pg/profile/" . $_SESSION['user']->username,array(
menu_item(elgg_echo('profile:yours'),$CONFIG->wwwroot . "pg/profile/" . $_SESSION['user']->username),
menu_item(elgg_echo('profile:edit'),$CONFIG->wwwroot."mod/profile/edit.php"),
+ menu_item(elgg_echo('profile:editicon'),$CONFIG->wwwroot."mod/profile/editicon.php"),
));
}
@@ -53,6 +54,7 @@
// Register a page handler, so we can have nice URLs
register_page_handler('profile','profile_page_handler');
+ register_page_handler('icon','profile_icon_handler');
}
@@ -75,6 +77,27 @@
}
/**
+ * Profile icon page handler
+ *
+ * @param array $page Array of page elements, forwarded by the page handling mechanism
+ */
+ function profile_icon_handler($page) {
+
+ global $CONFIG;
+
+ // The username should be the file we're getting
+ if (isset($page[0])) {
+ set_input('username',$page[0]);
+ }
+ if (isset($page[1])) {
+ set_input('size',$page[1]);
+ }
+ // Include the standard profile index
+ include($CONFIG->pluginspath . "profile/icon.php");
+
+ }
+
+ /**
* Profile URL generator for $user->getUrl();
*
* @param ElggUser $user
@@ -91,6 +114,7 @@
// Register actions
global $CONFIG;
register_action("profile/edit",false,$CONFIG->pluginspath . "profile/actions/edit.php");
+ register_action("profile/iconupload",false,$CONFIG->pluginspath . "profile/actions/iconupload.php");
?> \ No newline at end of file