content.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * Display the latest photos uploaded by an individual
  4. *
  5. * @author Cash Costello
  6. * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
  7. */
  8. $owner = elgg_get_page_owner_entity();
  9. $content = elgg_list_entities(array(
  10. 'type' => 'object',
  11. 'subtype' => 'image',
  12. 'limit' => $vars['entity']->num_display,
  13. 'owner_guid' => $owner->guid,
  14. 'full_view' => false,
  15. 'list_type' => 'gallery',
  16. 'list_type_toggle' => false,
  17. 'pagination' => false,
  18. 'gallery_class' => 'tidypics-gallery-widget',
  19. ));
  20. echo $content;
  21. if ($content) {
  22. $more_link = elgg_view('output/url', array(
  23. 'href' => "/photos/siteimagesowner/" . $owner->guid,
  24. 'text' => elgg_echo('link:view:all'),
  25. 'is_trusted' => true,
  26. ));
  27. echo "<span class=\"elgg-widget-more\">$more_link</span>";
  28. } else {
  29. echo elgg_echo('tidypics:widget:no_images');
  30. }