init.php 947 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. class Example_VFeed extends Plugin {
  3. // Demonstrates how to create a dummy special feed and chain
  4. // headline generation to queryFeedHeadlines();
  5. // Not implemented yet: stuff for 3 panel mode
  6. private $host;
  7. private $dummy_id;
  8. function about() {
  9. return array(1.0,
  10. "Example vfeed plugin",
  11. "fox",
  12. false);
  13. }
  14. function init($host) {
  15. $this->host = $host;
  16. $this->dummy_id = $host->add_feed(-1, 'Dummy feed', 'images/pub_set.svg', $this);
  17. }
  18. function get_unread($feed_id) {
  19. return 1234;
  20. }
  21. function get_headlines($feed_id, $options) {
  22. $qfh_ret = queryFeedHeadlines( -4,
  23. $options['limit'],
  24. $options['view_mode'], $options['cat_view'],
  25. $options['search'],
  26. $options['search_mode'],
  27. $options['override_order'],
  28. $options['offset'],
  29. $options['owner_uid'],
  30. $options['filter'],
  31. $options['since_id'],
  32. $options['include_children']);
  33. $qfh_ret[1] = 'Dummy feed';
  34. return $qfh_ret;
  35. }
  36. }
  37. ?>