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