aboutsummaryrefslogtreecommitdiff
path: root/mod/custom_index_widgets/views/default/widgets/latest_photos_index/content.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2013-11-09 16:19:23 +0100
committerSem <sembrestels@riseup.net>2013-11-09 16:19:23 +0100
commitd44f0965e80edd003dca4c85f5bdbc462affbe8a (patch)
tree9ef0b1374ab77f3512e10335107175f2281b80cf /mod/custom_index_widgets/views/default/widgets/latest_photos_index/content.php
parented6d980dcb06a66e1746fe4959aa138c39fb4e9e (diff)
parentc76018e381332ccb4aed03fbebd80a6b151cd5e5 (diff)
downloadelgg-d44f0965e80edd003dca4c85f5bdbc462affbe8a.tar.gz
elgg-d44f0965e80edd003dca4c85f5bdbc462affbe8a.tar.bz2
Add 'mod/custom_index_widgets/' from commit 'c76018e381332ccb4aed03fbebd80a6b151cd5e5'
git-subtree-dir: mod/custom_index_widgets git-subtree-mainline: ed6d980dcb06a66e1746fe4959aa138c39fb4e9e git-subtree-split: c76018e381332ccb4aed03fbebd80a6b151cd5e5
Diffstat (limited to 'mod/custom_index_widgets/views/default/widgets/latest_photos_index/content.php')
-rw-r--r--mod/custom_index_widgets/views/default/widgets/latest_photos_index/content.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/mod/custom_index_widgets/views/default/widgets/latest_photos_index/content.php b/mod/custom_index_widgets/views/default/widgets/latest_photos_index/content.php
new file mode 100644
index 000000000..bb83cac40
--- /dev/null
+++ b/mod/custom_index_widgets/views/default/widgets/latest_photos_index/content.php
@@ -0,0 +1,25 @@
+<div class="contentWrapper">
+<?php
+
+ $num_items = $vars['entity']->num_items;
+ if (!isset($num_items)) $num_items = 10;
+
+ $widget_group = $vars["entity"]->widget_group;
+ if (!isset($widget_group)) $widget_group = ELGG_ENTITIES_ANY_VALUE;
+
+ if ($widget_group != 0){
+ $album = elgg_get_entities("object", 'album', $widget_group, "", 1, 0, false);
+ $album_guid = $album[0]->getGUID();
+ $entities = elgg_get_entities("object", "image", $album_guid, '', 999);
+ elgg_set_context('front');
+ $widgetdatas = elgg_view_entity_list($entities);
+ }else{
+ $widgetdatas = tp_get_latest_photos($num_items, 0);
+ }
+
+ echo '<div class="icon_latest">';
+ echo $widgetdatas;
+ echo '</div>';
+
+?>
+</div> \ No newline at end of file