From 80faac618234400e019a570f4376567b1073d661 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 9 Jul 2008 17:55:47 +0000 Subject: Added profile submenu git-svn-id: https://code.elgg.org/elgg/trunk@1375 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/profile/languages/en.php | 3 +++ mod/profile/start.php | 20 +++++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/mod/profile/languages/en.php b/mod/profile/languages/en.php index 4da311ab1..be70f4243 100644 --- a/mod/profile/languages/en.php +++ b/mod/profile/languages/en.php @@ -30,6 +30,9 @@ 'profile:profilepicturecroppingtool' => "Profile picture cropping tool", 'profile:createicon:instructions' => "Click and drag a square below to match how you want your picture cropped. A preview of your cropped picture will appear in the box on the right. When you are happy with the preview, click 'Create your avatar'. This cropped image will be used throughout the site as your avatar. ", + 'profile:editdetails' => "Edit details", + 'profile:editicon' => "Edit profile icon", + 'profile:aboutme' => "About me", 'profile:description' => "About me", 'profile:location' => "Location", diff --git a/mod/profile/start.php b/mod/profile/start.php index 80901659f..aa42374fc 100644 --- a/mod/profile/start.php +++ b/mod/profile/start.php @@ -27,13 +27,13 @@ register_entity_url_handler('profile_url','user','all'); // Set up menu for logged in users - if (isloggedin()) { - 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"), - ),'profile'); - } + // if (isloggedin()) { + // 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"), + // ),'profile'); + // } // For now, we'll hard code the profile items as follows: // TODO make this user configurable @@ -62,6 +62,12 @@ if (get_context() == "profile") extend_view('canvas_header/submenu','profile/submenu'); + //add submenu options + if (get_context() == "profile") { + add_submenu_item("Edit Details", $CONFIG->wwwroot . "mod/profile/edit.php"); + add_submenu_item("Edit profile picture", $CONFIG->wwwroot . "mod/profile/editicon.php"); + } + // Extend context menu with admin links if (isadminloggedin()) { -- cgit v1.2.3