blob: 7f2fce3d6c6bf78d7c070de4243d0066a7bb59aa (
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
<?php
/**
* Main activity stream list page
*/
// $page_type comes from the page handler function
$options = array();
$type = get_input('type', 'all');
$subtype = get_input('subtype', '');
if ($subtype) {
$selector = "type=$type&subtype=$subtype";
} else {
$selector = "type=$type";
}
if ($type != 'all') {
$options['type'] = $type;
if ($subtype) {
$options['subtype'] = $subtype;
}
}
switch ($page_type) {
case 'mine':
$title = elgg_echo('river:mine');
$page_filter = 'mine';
$options['subject_guid'] = elgg_get_logged_in_user_guid();
break;
case 'friends':
$title = elgg_echo('river:friends');
$page_filter = 'friends';
$options['relationship_guid'] = elgg_get_logged_in_user_guid();
$options['relationship'] = 'friend';
break;
default:
$title = elgg_echo('river:all');
$page_filter = 'all';
break;
}
$activity = elgg_list_river($options);
$content = elgg_view('core/river/filter', array('selector' => $selector));
$sidebar = elgg_view('core/river/sidebar');
$params = array(
'content' => $content . $activity,
'sidebar' => $sidebar,
'buttons' => '',
'filter_context' => $page_filter,
'class' => 'elgg-river-layout',
);
$body = elgg_view_layout('content', $params);
echo elgg_view_page($title, $body);
|