blob: 1c35163ad41cb2f6dfdc29a267d701e9a6c3f582 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
<?php
/**
* Profile of a group
*
* @package ElggGroups
*/
$guid = get_input('group_guid');
elgg_set_context('groups');
elgg_set_page_owner_guid($guid);
// can the user see all content
$group_access = group_gatekeeper(false);
// turn this into a core function
global $autofeed;
$autofeed = true;
$group = get_entity($guid);
elgg_push_breadcrumb(elgg_echo('groups:all'), elgg_get_site_url() . "pg/groups/world");
elgg_push_breadcrumb($group->name);
$sidebar = '';
$content = elgg_view('groups/profile/profile_block', array('entity' => $group));
if (group_gatekeeper(false)) {
$content .= elgg_view('groups/profile/widgets', array('entity' => $group));
$sidebar = elgg_view('groups/sidebar/members', array('entity' => $group));
} else {
$content .= elgg_view('groups/profile/closed_membership');
}
$params = array(
'content' => $content,
'sidebar' => $sidebar,
'title' => $group->name,
'buttons' => elgg_view('groups/profile/buttons', array('entity' => $group)),
'filter' => '',
);
$body = elgg_view_layout('content', $params);
echo elgg_view_page($title, $body);
|