]> git.wh0rd.org - tt-rss.git/blob - plugins/example_vfeed/init.php
add experimental base for plugin vfeeds (3 pane mode not yet
[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 $link;
10 private $host;
11 private $dummy_id;
12
13 function about() {
14 return array(1.0,
15 "Example vfeed plugin",
16 "fox",
17 false);
18 }
19
20 function init($host) {
21 $this->link = $host->get_link();
22 $this->host = $host;
23
24 $this->dummy_id = $host->add_feed(-1, 'Dummy feed', 'images/pub_set.svg', $this);
25 }
26
27 function get_unread($feed_id) {
28 return 1234;
29 }
30
31 function get_headlines($feed_id, $options) {
32 $qfh_ret = queryFeedHeadlines($this->link, -4,
33 $options['limit'],
34 $options['view_mode'], $options['cat_view'],
35 $options['search'],
36 $options['search_mode'],
37 $options['override_order'],
38 $options['offset'],
39 $options['owner_uid'],
40 $options['filter'],
41 $options['since_id'],
42 $options['include_children']);
43
44 $qfh_ret[1] = 'Dummy feed';
45
46 return $qfh_ret;
47 }
48 }
49 ?>