forked from telemed-duth/Metamorphosis-Meducator
/
tidypics.php
44 lines (38 loc) · 1.04 KB
/
tidypics.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
<?php
if (is_plugin_enabled('tidypics')){
$limit = get_plugin_setting('tidypics_num_items','vazco_mainpage');
if (!isset($limit) || !$limit) $limit = 10;
$images = get_entities('object','image',0,0,$limit, false, false);
?>
<div class="index_box">
<h2><?php echo elgg_echo("custom:tidypics"); ?></h2>
<div class="search_listing">
<?php
if(isset($images)) {
$counter = 0;
echo '<div class="frontpage_tidypics_box">';
foreach($images as $image){
$counter +=1;
if ($counter == 6){
$counter = 0;
echo "</div>";
echo '<div class="frontpage_tidypics_box">';
}
echo "<div class=\"tidypics_index\">";
echo elgg_view("vazco_mainpage/tidypics/icon", array(
'mimetype' => $image->mimetype
,'thumbnail' => $image->thumbnail
,'file_guid' => $image->guid
,'link' => $image->getUrl()
,'size' => 'small'
));
echo "</div>"; //tidypics_index
}
echo '</div>';
}else{
echo elgg_echo('vazco_mainpage:tidypics:noactivity');
}
?>
</div>
</div>
<?php }?>