aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/blog_lib.php
diff options
context:
space:
mode:
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-07 15:54:28 +0000
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-07 15:54:28 +0000
commit4814c847028b8ef3bfcfd62a8a8807637172f8a4 (patch)
tree2e914a9c68246e37d4f6cec2e2ed0290d0513b2d /mod/blog/blog_lib.php
parent227e4a108a009b985377202db7412331a1b8f6a0 (diff)
downloadelgg-4814c847028b8ef3bfcfd62a8a8807637172f8a4.tar.gz
elgg-4814c847028b8ef3bfcfd62a8a8807637172f8a4.tar.bz2
Highlighting current tab in content header.
Includes updates to language strings. git-svn-id: http://code.elgg.org/elgg/trunk@5650 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/blog/blog_lib.php')
-rw-r--r--mod/blog/blog_lib.php36
1 files changed, 24 insertions, 12 deletions
diff --git a/mod/blog/blog_lib.php b/mod/blog/blog_lib.php
index 83afab872..0ecd48b86 100644
--- a/mod/blog/blog_lib.php
+++ b/mod/blog/blog_lib.php
@@ -30,7 +30,7 @@ function blog_get_page_content_read($owner_guid = NULL, $guid = NULL) {
}
} else {
$content = elgg_view('page_elements/content_header', array(
- 'context' => $context,
+ 'context' => $owner_guid ? 'mine' : 'everyone',
'type' => 'blog',
'all_link' => "{$CONFIG->site->url}pg/blog"
));
@@ -61,7 +61,12 @@ function blog_get_page_content_read($owner_guid = NULL, $guid = NULL) {
);
}
- $content .= elgg_list_entities_from_metadata($options);
+ $list = elgg_list_entities_from_metadata($options);
+ if (!$list) {
+ $content .= elgg_echo('blog:none');
+ } else {
+ $content .= $list;
+ }
}
return array('content' => $content);
@@ -121,11 +126,8 @@ function blog_get_page_content_archive($owner_guid, $lower=0, $upper=0) {
$now = time();
- $content = elgg_view('page_elements/content_header', array(
- 'context' => $context,
- 'type' => 'blog',
- 'all_link' => "{$CONFIG->site->url}pg/blog"
- ));
+ elgg_push_breadcrumb(elgg_echo('blog:archives'));
+ $content = elgg_view('page_elements/content_header_member', array('type' => 'blog'));
if ($lower) {
$lower = (int)$lower;
@@ -174,7 +176,12 @@ function blog_get_page_content_archive($owner_guid, $lower=0, $upper=0) {
);
}
- $content .= elgg_list_entities_from_metadata($options);
+ $list = elgg_list_entities_from_metadata($options);
+ if (!$list) {
+ $content .= elgg_echo('blog:none');
+ } else {
+ $content .= $list;
+ }
return array(
'content' => $content
@@ -190,16 +197,16 @@ function blog_get_page_content_archive($owner_guid, $lower=0, $upper=0) {
function blog_get_page_content_friends($user_guid) {
global $CONFIG;
- elgg_push_breadcrumb(elgg_echo('blog:friends'));
+ elgg_push_breadcrumb(elgg_echo('friends'));
$content = elgg_view('page_elements/content_header', array(
- 'context' => $context,
+ 'context' => 'friends',
'type' => 'blog',
'all_link' => "{$CONFIG->site->url}pg/blog"
));
if (!$friends = get_user_friends($user_guid, ELGG_ENTITIES_ANY_VALUE, 0)) {
- $content .= elgg_echo('blog:no_friends');
+ $content .= elgg_echo('friends:none:you');
} else {
$options = array(
'type' => 'object',
@@ -224,7 +231,12 @@ function blog_get_page_content_friends($user_guid) {
);
}
- $content .= elgg_list_entities_from_metadata($options);
+ $list = elgg_list_entities_from_metadata($options);
+ if (!$list) {
+ $content .= elgg_echo('blog:none');
+ } else {
+ $content .= $list;
+ }
}
return array('content' => $content);