articles.phtml 1.1 KB

123456789101112131415161718192021222324252627282930
  1. <?php
  2. // TODO: A lot have to be done!
  3. $username = Minz_Session::param('currentUser', '_');
  4. $type_id = "TODO";
  5. $title = Minz_Translate::t("TODO");
  6. $entries = [];
  7. ?>{
  8. "id": "user/<?php echo str_replace("\"", "", $username); ?>/state/org.freshrss/<?php echo $type_id; ?>",
  9. "title": "<?php echo addslashes($title); ?>",
  10. "author": "<?php echo addslashes($username); ?>",
  11. "items": [
  12. <?php $i = 0; foreach($entries as $entry) { $i++;
  13. echo $i > 1 ? ', ': ''; ?>{
  14. "id": "<?php echo $entry->id(); ?>",
  15. "categories": [<?php /* TODO */ ?>],
  16. "title": "<?php echo addslashes($entry->title()); ?>",
  17. "published": <?php echo $entry->date(true); ?>,
  18. "updated": <?php echo $entry->date(true); ?>,
  19. "content": "<?php echo addslashes($entry->content()); ?>",
  20. "origin": {
  21. <?php /* TODO */ ?>
  22. "streamId": "",
  23. "title": "",
  24. "htmlUrl": "",
  25. "feedUrl": ""
  26. }
  27. }
  28. <?php } ?>
  29. ]
  30. }