From: cash Date: Sun, 19 Dec 2010 00:59:12 +0000 (+0000) Subject: more profile clean up X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=fea009129f49f4f8d51654ceb569aae04387077b;p=lorea%2Felgg.git more profile clean up git-svn-id: http://code.elgg.org/elgg/trunk@7675 36083f99-b078-4883-b0ff-0f9b5a30f544 --- diff --git a/mod/profile/javascript.php b/mod/profile/javascript.php deleted file mode 100644 index cb783f7da..000000000 --- a/mod/profile/javascript.php +++ /dev/null @@ -1,15 +0,0 @@ - $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(); * @@ -155,7 +120,6 @@ function profile_iconjs_handler($page) { * @return string User URL */ function profile_url($user) { - global $CONFIG; return elgg_get_site_url() . "pg/profile/" . $user->username; } diff --git a/mod/profile/views/default/profile/profile_content.php b/mod/profile/views/default/profile/content_wrapper.php similarity index 100% rename from mod/profile/views/default/profile/profile_content.php rename to mod/profile/views/default/profile/content_wrapper.php diff --git a/mod/profile/views/default/profile/metatags.php b/mod/profile/views/default/profile/metatags.php index a90b12494..1197a2e0a 100644 --- a/mod/profile/views/default/profile/metatags.php +++ b/mod/profile/views/default/profile/metatags.php @@ -1,11 +1,14 @@ +if (elgg_get_page_owner()) { +?> - \ No newline at end of file + $section)); + echo elgg_view('profile/ownerblock', array('section' => $section)); ?> \ No newline at end of file diff --git a/mod/profile/views/default/profile/profile_navigation.php b/mod/profile/views/default/profile/tab_navigation.php similarity index 100% rename from mod/profile/views/default/profile/profile_navigation.php rename to mod/profile/views/default/profile/tab_navigation.php diff --git a/mod/profile/views/default/profile/profile_contents/activity.php b/mod/profile/views/default/profile/tabs/activity.php similarity index 100% rename from mod/profile/views/default/profile/profile_contents/activity.php rename to mod/profile/views/default/profile/tabs/activity.php diff --git a/mod/profile/views/default/profile/profile_contents/commentwall.php b/mod/profile/views/default/profile/tabs/commentwall.php similarity index 60% rename from mod/profile/views/default/profile/profile_contents/commentwall.php rename to mod/profile/views/default/profile/tabs/commentwall.php index 7e8a1d97d..bf54bd7e7 100644 --- a/mod/profile/views/default/profile/profile_contents/commentwall.php +++ b/mod/profile/views/default/profile/tabs/commentwall.php @@ -3,8 +3,11 @@ * Elgg profile comment wall */ +$user = elgg_get_page_owner(); +$comments = $user->getAnnotations('commentwall', 200, 0, 'desc'); + if (isloggedin()) { echo elgg_view("profile/commentwall/commentwalladd"); } -echo elgg_view("profile/commentwall/commentwall", array('annotation' => $vars['comments'])); +echo elgg_view("profile/commentwall/commentwall", array('annotation' => $comments)); diff --git a/mod/profile/views/default/profile/profile_contents/details.php b/mod/profile/views/default/profile/tabs/details.php similarity index 100% rename from mod/profile/views/default/profile/profile_contents/details.php rename to mod/profile/views/default/profile/tabs/details.php diff --git a/mod/profile/views/default/profile/profile_contents/friends.php b/mod/profile/views/default/profile/tabs/friends.php similarity index 100% rename from mod/profile/views/default/profile/profile_contents/friends.php rename to mod/profile/views/default/profile/tabs/friends.php diff --git a/mod/profile/views/default/profile/profile_contents/groups.php b/mod/profile/views/default/profile/tabs/groups.php similarity index 100% rename from mod/profile/views/default/profile/profile_contents/groups.php rename to mod/profile/views/default/profile/tabs/groups.php diff --git a/mod/profile/views/default/profile/profile_contents/twitter.php b/mod/profile/views/default/profile/tabs/twitter.php similarity index 100% rename from mod/profile/views/default/profile/profile_contents/twitter.php rename to mod/profile/views/default/profile/tabs/twitter.php