aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/lib/blog.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-29 21:51:56 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-29 21:51:56 +0000
commitd276934f6d90134a96b57d22d69ecedd29e6d03a (patch)
treecc26071b08f5f6a9bea1e60e3e0d872a44dd4a47 /mod/blog/lib/blog.php
parentcf2456caa366ccc66667481838c2bfd4883b5091 (diff)
downloadelgg-d276934f6d90134a96b57d22d69ecedd29e6d03a.tar.gz
elgg-d276934f6d90134a96b57d22d69ecedd29e6d03a.tar.bz2
Refs #2077 added new blog post button to group blog - can be used as module for remianing group tools
git-svn-id: http://code.elgg.org/elgg/trunk@7758 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/blog/lib/blog.php')
-rw-r--r--mod/blog/lib/blog.php18
1 files changed, 14 insertions, 4 deletions
diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php
index 8a4ab7644..354bf561d 100644
--- a/mod/blog/lib/blog.php
+++ b/mod/blog/lib/blog.php
@@ -80,10 +80,6 @@ function blog_get_page_content_list($container_guid = NULL) {
$crumbs_title = elgg_echo('blog:owned_blogs', array($container->name));
elgg_push_breadcrumb($crumbs_title);
- if (elgg_instanceof($container, 'group')) {
- $return['filter'] = '';
- }
-
if ($container_guid == $loggedin_userid) {
$return['filter_context'] = 'mine';
} else{
@@ -91,6 +87,20 @@ function blog_get_page_content_list($container_guid = NULL) {
$return['filter_context'] = 'none';
$return['buttons'] = '';
}
+
+ if (elgg_instanceof($container, 'group')) {
+ $return['filter'] = '';
+ if ($container->isMember(get_loggedin_user())) {
+ $url = "pg/blog/new/$container->guid";
+ $params = array(
+ 'href' => $url,
+ 'text' => elgg_echo("blog:new"),
+ 'class' => 'elgg-action-button',
+ );
+ $buttons = elgg_view('output/url', $params);
+ $return['buttons'] = $buttons;
+ }
+ }
} else {
$return['filter_context'] = 'all';
$return['title'] = elgg_echo('blog:title:all_blogs');