/
bottom.php
77 lines (64 loc) · 1.97 KB
/
bottom.php
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/**
* Footer for main page
*/
namespace Elgg\CommunityPlugins;
// Note: Not using elgg_extract because these are potentially expensive database queries.
if (!isset($vars['newest'])) {
$vars['newest'] = elgg_list_entities(array(
'type' => 'object',
'subtype' => 'plugin_project',
'pagination' => false,
'order_by' => 'e.last_action DESC'
));
}
if (!isset($vars['popular'])) {
$vars['popular'] = elgg_list_entities(array('pagination' => false), __NAMESPACE__ . '\\get_plugins_by_download_count');
}
if (!isset($vars['recommended'])) {
$vars['recommended'] = elgg_list_entities_from_annotation_calculation(array(
'types' => array('object'),
'subtypes' => array('plugin_project'),
'annotation_names' => array('plugin_digg'),
'calculation' => 'count',
'pagination' => false,
));
}
?>
<div class="elgg-grid elgg-community-plugins">
<?php
// Newest
echo '<div class="elgg-col elgg-col-1of3">';
echo '<div class="elgg-inner">';
echo elgg_view_module('info', elgg_echo('plugins:listing:newest'), $vars['newest'], array(
'footer' => elgg_view('output/url', array(
'href' => '/plugins/list/newest',
'text' => elgg_echo('plugins:browse_more:newest'),
)),
));
echo '</div>';
echo '</div>';
echo '<div class="elgg-col elgg-col-1of3">';
echo '<div class="elgg-inner">';
// Most downloaded
echo elgg_view_module('info', elgg_echo('plugins:listing:popular'), $vars['popular'], array(
'footer' => elgg_view('output/url', array(
'href' => '/plugins/list/popular',
'text' => elgg_echo('plugins:browse_more:popular'),
)),
));
echo '</div>';
echo '</div>';
echo '<div class="elgg-col elgg-col-1of3 elgg-col-last">';
echo '<div class="elgg-inner">';
// Most recommended
echo elgg_view_module('info', elgg_echo('plugins:listing:dugg'), $vars['recommended'], array(
'footer' => elgg_view('output/url', array(
'href' => '/plugins/list/recommended',
'text' => elgg_echo('plugins:browse_more:dugg'),
)),
));
echo '</div>';
echo '</div>';
?>
</div>