]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
more profile clean up
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 19 Dec 2010 00:59:12 +0000 (00:59 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 19 Dec 2010 00:59:12 +0000 (00:59 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7675 36083f99-b078-4883-b0ff-0f9b5a30f544

13 files changed:
mod/profile/javascript.php [deleted file]
mod/profile/start.php
mod/profile/views/default/profile/content_wrapper.php [moved from mod/profile/views/default/profile/profile_content.php with 100% similarity]
mod/profile/views/default/profile/metatags.php
mod/profile/views/default/profile/ownerblock.php [moved from mod/profile/views/default/profile/profile_ownerblock.php with 100% similarity]
mod/profile/views/default/profile/sidebar.php
mod/profile/views/default/profile/tab_navigation.php [moved from mod/profile/views/default/profile/profile_navigation.php with 100% similarity]
mod/profile/views/default/profile/tabs/activity.php [moved from mod/profile/views/default/profile/profile_contents/activity.php with 100% similarity]
mod/profile/views/default/profile/tabs/commentwall.php [moved from mod/profile/views/default/profile/profile_contents/commentwall.php with 60% similarity]
mod/profile/views/default/profile/tabs/details.php [moved from mod/profile/views/default/profile/profile_contents/details.php with 100% similarity]
mod/profile/views/default/profile/tabs/friends.php [moved from mod/profile/views/default/profile/profile_contents/friends.php with 100% similarity]
mod/profile/views/default/profile/tabs/groups.php [moved from mod/profile/views/default/profile/profile_contents/groups.php with 100% similarity]
mod/profile/views/default/profile/tabs/twitter.php [moved from mod/profile/views/default/profile/profile_contents/twitter.php with 100% similarity]

diff --git a/mod/profile/javascript.php b/mod/profile/javascript.php
deleted file mode 100644 (file)
index cb783f7..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-/**
- * Elgg profile JS
- * 
- * @package ElggProfile
- */
-
-// Get engine
-require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
-header("Content-type: text/javascript");
-header('Expires: ' . date('r',time() + 864000));
-header("Pragma: public");
-header("Cache-Control: public");
-echo elgg_view('profile/javascript');
\ No newline at end of file
index bd5fb5fe3954504c9fcfab05602727a0b2da9757..d7dd0e3e0ace460fcc63c4b0aa1b4eda6874cb51 100644 (file)
@@ -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,49 +102,17 @@ 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();
  *
@@ -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;
 }
 
index a90b124946734192d9df9d568818bac83f527e86..1197a2e0a815b655f57c24ab454fab752057ca0a 100644 (file)
@@ -1,11 +1,14 @@
 <?php
 /**
- * Adds metatags to load Javascript required for the profile
+ * FOAF
  * 
  * @package ElggProfile
  * 
  */
 
-if ($owner = elgg_get_page_owner()) { ?>
+if (elgg_get_page_owner()) {
+?>
        <link rel="meta" type="application/rdf+xml" title="FOAF" href="<?php echo full_url(); ?>?view=foaf" />
-<?php } ?>
\ No newline at end of file
+<?php
+
+}
\ No newline at end of file
index 96b4a1955164c2563c0565b67ec55d64a39a7967..525a2da815a7f246f3e49b52659c372ed44d7744 100644 (file)
@@ -8,6 +8,6 @@
 <div id="profile_sidebar">
 <?php
        $section = $vars['section'];
-       echo elgg_view('profile/profile_ownerblock', array('section' => $section));
+       echo elgg_view('profile/ownerblock', array('section' => $section));
 ?>
 </div>
\ No newline at end of file
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 7e8a1d97d7cf41ce936d35177e0b2ea88b5ca0b0..bf54bd7e73511cef7741e7a41f9c977ee5964245 100644 (file)
@@ -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));