diff options
author | Andrew Dolgov <[email protected]> | 2013-03-27 16:14:27 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-03-27 16:15:25 +0400 |
commit | a413f53ebff7d28033090dc343d1ed1d0993ae0b (patch) | |
tree | db02d7ab6427985603384ac489a72646e702befa /plugins/example_vfeed | |
parent | cedfac22e33b944c65675b4c939464344268bf58 (diff) |
add experimental base for plugin vfeeds (3 pane mode not yet
implemented)
Diffstat (limited to 'plugins/example_vfeed')
-rw-r--r-- | plugins/example_vfeed/init.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/plugins/example_vfeed/init.php b/plugins/example_vfeed/init.php new file mode 100644 index 000000000..e646809a4 --- /dev/null +++ b/plugins/example_vfeed/init.php @@ -0,0 +1,49 @@ +<?php +class Example_VFeed extends Plugin { + + // Demonstrates how to create a dummy special feed and chain + // headline generation to queryFeedHeadlines(); + + // Not implemented yet: stuff for 3 panel mode + + private $link; + private $host; + private $dummy_id; + + function about() { + return array(1.0, + "Example vfeed plugin", + "fox", + false); + } + + function init($host) { + $this->link = $host->get_link(); + $this->host = $host; + + $this->dummy_id = $host->add_feed(-1, 'Dummy feed', 'images/pub_set.svg', $this); + } + + function get_unread($feed_id) { + return 1234; + } + + function get_headlines($feed_id, $options) { + $qfh_ret = queryFeedHeadlines($this->link, -4, + $options['limit'], + $options['view_mode'], $options['cat_view'], + $options['search'], + $options['search_mode'], + $options['override_order'], + $options['offset'], + $options['owner_uid'], + $options['filter'], + $options['since_id'], + $options['include_children']); + + $qfh_ret[1] = 'Dummy feed'; + + return $qfh_ret; + } +} +?> |