aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/profile/javascript.php15
-rw-r--r--mod/profile/start.php42
-rw-r--r--mod/profile/views/default/profile/content_wrapper.php (renamed from mod/profile/views/default/profile/profile_content.php)0
-rw-r--r--mod/profile/views/default/profile/metatags.php9
-rwxr-xr-xmod/profile/views/default/profile/ownerblock.php (renamed from mod/profile/views/default/profile/profile_ownerblock.php)0
-rw-r--r--mod/profile/views/default/profile/sidebar.php2
-rwxr-xr-xmod/profile/views/default/profile/tab_navigation.php (renamed from mod/profile/views/default/profile/profile_navigation.php)0
-rwxr-xr-xmod/profile/views/default/profile/tabs/activity.php (renamed from mod/profile/views/default/profile/profile_contents/activity.php)0
-rw-r--r--mod/profile/views/default/profile/tabs/commentwall.php (renamed from mod/profile/views/default/profile/profile_contents/commentwall.php)5
-rwxr-xr-xmod/profile/views/default/profile/tabs/details.php (renamed from mod/profile/views/default/profile/profile_contents/details.php)0
-rwxr-xr-xmod/profile/views/default/profile/tabs/friends.php (renamed from mod/profile/views/default/profile/profile_contents/friends.php)0
-rw-r--r--mod/profile/views/default/profile/tabs/groups.php (renamed from mod/profile/views/default/profile/profile_contents/groups.php)0
-rwxr-xr-xmod/profile/views/default/profile/tabs/twitter.php (renamed from mod/profile/views/default/profile/profile_contents/twitter.php)0
13 files changed, 14 insertions, 59 deletions
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 @@
-<?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
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;
}
diff --git a/mod/profile/views/default/profile/profile_content.php b/mod/profile/views/default/profile/content_wrapper.php
index 4fb43e7c9..4fb43e7c9 100644
--- a/mod/profile/views/default/profile/profile_content.php
+++ b/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 @@
<?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
diff --git a/mod/profile/views/default/profile/profile_ownerblock.php b/mod/profile/views/default/profile/ownerblock.php
index 3fb5f509e..3fb5f509e 100755
--- a/mod/profile/views/default/profile/profile_ownerblock.php
+++ b/mod/profile/views/default/profile/ownerblock.php
diff --git a/mod/profile/views/default/profile/sidebar.php b/mod/profile/views/default/profile/sidebar.php
index 96b4a1955..525a2da81 100644
--- a/mod/profile/views/default/profile/sidebar.php
+++ b/mod/profile/views/default/profile/sidebar.php
@@ -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
diff --git a/mod/profile/views/default/profile/profile_navigation.php b/mod/profile/views/default/profile/tab_navigation.php
index ca0873ebd..ca0873ebd 100755
--- a/mod/profile/views/default/profile/profile_navigation.php
+++ b/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
index ccd2a3915..ccd2a3915 100755
--- a/mod/profile/views/default/profile/profile_contents/activity.php
+++ b/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
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
index 27b0f943b..27b0f943b 100755
--- a/mod/profile/views/default/profile/profile_contents/details.php
+++ b/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
index 9195629e5..9195629e5 100755
--- a/mod/profile/views/default/profile/profile_contents/friends.php
+++ b/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
index 323bb61f1..323bb61f1 100644
--- a/mod/profile/views/default/profile/profile_contents/groups.php
+++ b/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
index 06a0551d4..06a0551d4 100755
--- a/mod/profile/views/default/profile/profile_contents/twitter.php
+++ b/mod/profile/views/default/profile/tabs/twitter.php