exif.php 563 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * EXIF sidebar module
  4. */
  5. $image = $vars["image"];
  6. elgg_load_library("tidypics:exif");
  7. $exif = tp_exif_formatted($image);
  8. if ($exif) {
  9. $title = "EXIF";
  10. $body = "<table class='elgg-table elgg-table-alt'>";
  11. foreach ($exif as $key => $value) {
  12. $body .= "<tr>";
  13. $body .= "<td>" . elgg_view("output/text", array("value" => filter_tags($key))) . "</td>";
  14. $body .= "<td>" . elgg_view("output/text", array("value" => filter_tags($value))) . "</td>";
  15. $body .= "</tr>";
  16. }
  17. $body .= "</table>";
  18. echo elgg_view_module("aside", $title, $body);
  19. }