aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-21 16:37:44 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-21 16:37:44 +0000
commitf9d4820e5c7c78cb788a7d0819c43e11458c7106 (patch)
tree46978245d32ae61b549dcbe14aaabcd854cf46b3
parentb83f9c0049e084f291aabe22e1aca73144fd481d (diff)
downloadelgg-f9d4820e5c7c78cb788a7d0819c43e11458c7106.tar.gz
elgg-f9d4820e5c7c78cb788a7d0819c43e11458c7106.tar.bz2
Updating Pages plugin to extend profile owner block directly with user-specific links.
git-svn-id: http://code.elgg.org/elgg/trunk@6127 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--mod/pages/start.php8
-rw-r--r--mod/pages/views/default/pages/profile_extend.php9
2 files changed, 10 insertions, 7 deletions
diff --git a/mod/pages/start.php b/mod/pages/start.php
index a769f3691..b0b16d0a3 100644
--- a/mod/pages/start.php
+++ b/mod/pages/start.php
@@ -43,6 +43,7 @@
elgg_extend_view('css','pages/css');
elgg_extend_view('groups/menu/links', 'pages/menu'); // Add to groups context
elgg_extend_view('groups/right_column', 'pages/groupprofile_pages'); // Add to groups context
+ elgg_extend_view('owner_block/profile_extend', 'pages/profile_extend');
// Register entity type
register_entity_type('object','page');
@@ -103,13 +104,6 @@
add_submenu_item(sprintf(elgg_echo("pages:group"),$page_owner->name), $CONFIG->wwwroot . "pg/pages/owned/" . $page_owner->username);
}
}
-
- if ($page_owner instanceof ElggEntity) {
- elgg_add_submenu_item(array(
- 'text' => elgg_echo('pages'),
- 'href' => "{$CONFIG->url}pg/pages/owned/{$page_owner->username}",
- ));
- }
}
/**
diff --git a/mod/pages/views/default/pages/profile_extend.php b/mod/pages/views/default/pages/profile_extend.php
new file mode 100644
index 000000000..c0b97481a
--- /dev/null
+++ b/mod/pages/views/default/pages/profile_extend.php
@@ -0,0 +1,9 @@
+<?php
+/**
+ *
+ */
+
+$url = "{$CONFIG->url}pg/pages/owned/{$page_owner->username}";
+$pages = elgg_echo('pages');
+
+echo "<div class=\"profile\"><a href=\"$url\">$pages</a></div>";