aboutsummaryrefslogtreecommitdiff
path: root/mod/sitepages/index.php
blob: 5b575ef37ce6aafcff78fb574d02a70b49e45057 (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
<?php
/**
 * Elgg index page
 *
 */

/**
 * Start the Elgg engine
 */

require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");

//Load the front page
$content = elgg_view('sitepages/welcome');
$content .= elgg_view_title(elgg_echo('content:latest'));
set_context('search');
$offset = (int)get_input('offset', 0);
if(is_plugin_enabled('riverdashboard')){
	$items = elgg_view_river_items(0, 0, "", "", "", '', 10, 0, 0, true, false);
	$content .= elgg_view('riverdashboard/container', array('body' => $items . elgg_view('riverdashboard/js')));
}else{
	$content .= elgg_list_registered_entities(array('limit' => 10, 'offset' => $offset, 'full_view' => FALSE, 'allowed_types' => array('object','group')));
}
set_context('main');
global $autofeed;
$autofeed = FALSE;

$members = elgg_get_entities_from_metadata(array(
	'metadata_names' => 'icontime',
	'types' => 'user',
	'owner_guid' => 0,
	'limit' => 10
));
//include sidebar free text
$sidebar = elgg_view('sitepages/sidebar');
$sidebar .= elgg_view('sitepages/members', array('members' => $members));
		
$content = elgg_view_layout('frontpage', $content, $sidebar);
echo elgg_view_page(null, $content);