aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/start.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-19 00:59:12 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-19 00:59:12 +0000
commitfea009129f49f4f8d51654ceb569aae04387077b (patch)
treeb64246b0c56c43a02b39fc5f62d53d01043e4d0a /mod/profile/start.php
parent1bd7be96c93688cccfb994c4ff3f5bdc5a320a37 (diff)
downloadelgg-fea009129f49f4f8d51654ceb569aae04387077b.tar.gz
elgg-fea009129f49f4f8d51654ceb569aae04387077b.tar.bz2
more profile clean up
git-svn-id: http://code.elgg.org/elgg/trunk@7675 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/profile/start.php')
-rw-r--r--mod/profile/start.php42
1 files changed, 3 insertions, 39 deletions
diff --git a/mod/profile/start.php b/mod/profile/start.php
index bd5fb5fe3..d7dd0e3e0 100644
--- a/mod/profile/start.php
+++ b/mod/profile/start.php
@@ -30,10 +30,7 @@ function profile_init() {
// Register a page handler, so we can have nice URLs
register_page_handler('profile', 'profile_page_handler');
- register_page_handler('icon', 'profile_icon_handler');
- register_page_handler('iconjs', 'profile_iconjs_handler');
- // Add Javascript reference to the page header
elgg_extend_view('html_head/extend', 'profile/metatags');
elgg_extend_view('css/screen', 'profile/css');
elgg_extend_view('js/elgg', 'profile/javascript');
@@ -105,57 +102,24 @@ function profile_page_handler($page) {
* @return mixed FALSE or html for the profile.
*/
function profile_get_user_profile_html($user, $section = 'activity') {
- $body = elgg_view('profile/profile_navigation', array('section' => $section, 'entity' => $user));
+ $body = elgg_view('profile/tab_navigation', array('section' => $section, 'entity' => $user));
$view_options = array('entity' => $user);
- if ($section == 'commentwall') {
- $comments = $user->getAnnotations('commentwall', 200, 0, 'desc');
- $view_options['comments'] = $comments;
- }
-
- $content = elgg_view("profile/profile_contents/$section", $view_options);
+ $content = elgg_view("profile/tabs/$section", $view_options);
- $body .= elgg_view('profile/profile_content', array('content' => $content));
+ $body .= elgg_view('profile/content_wrapper', array('content' => $content));
$body .= elgg_view('profile/sidebar', array('section' => $section));
return $body;
}
/**
- * 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");
-}
-
-/**
- * Icon JS
- */
-function profile_iconjs_handler($page) {
- global $CONFIG;
- include($CONFIG->pluginspath . "profile/javascript.php");
-}
-
-/**
* Profile URL generator for $user->getUrl();
*
* @param ElggUser $user
* @return string User URL
*/
function profile_url($user) {
- global $CONFIG;
return elgg_get_site_url() . "pg/profile/" . $user->username;
}