From a413f53ebff7d28033090dc343d1ed1d0993ae0b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 27 Mar 2013 16:14:27 +0400 Subject: add experimental base for plugin vfeeds (3 pane mode not yet implemented) --- classes/pref/feeds.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'classes/pref') diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index a6811f3fc..d2e69c502 100644 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -115,6 +115,32 @@ class Pref_Feeds extends Handler_Protected { array_push($cat['items'], $this->feedlist_init_feed($i)); } + /* Plugin feeds for -1 */ + + global $pluginhost; + + $feeds = $pluginhost->get_feeds(-1); + + if ($feeds) { + foreach ($feeds as $feed) { + $feed_id = PluginHost::pfeed_to_feed_id($feed['id']); + + $item = array(); + $item['id'] = 'FEED:' . $feed_id; + $item['bare_id'] = (int)$feed_id; + $item['name'] = $feed['title']; + $item['checkbox'] = false; + $item['error'] = ''; + $item['icon'] = $feed['icon']; + + $item['param'] = ''; + $item['unread'] = 0; //$feed['sender']->get_unread($feed['id']); + $item['type'] = 'feed'; + + array_push($cat['items'], $item); + } + } + if ($enable_cats) { array_push($root['items'], $cat); } else { -- cgit v1.2.3