content.php 533 B

1234567891011121314151617181920212223242526
  1. <?php
  2. // get widget settings
  3. $count = sanitise_int($vars["entity"]->file_count, false);
  4. if (empty($count)) {
  5. $count = 8;
  6. }
  7. $options = array(
  8. "type" => "object",
  9. "subtype" => "file",
  10. "limit" => $count,
  11. "full_view" => false,
  12. "pagination" => false
  13. );
  14. if ($files = elgg_list_entities($options)) {
  15. echo $files;
  16. echo "<span class='elgg-widget-more'>";
  17. echo elgg_view("output/url", array("href" => "file/all", "text" => elgg_echo("file:more"), "is_trusted" => true));
  18. echo "</span>";
  19. } else {
  20. echo elgg_echo("file:none");
  21. }