Basic:

- field handler for source (URL, etc.)

FeedsNodeProcessor:

- list nodes by feed
- field handlers for URL and GUID

There are some interesting questions around delegation of tasks. E. g. the source handling is going to depend on what's the content in the source field of feeds_source - a URL, etc.

Comments

alex_b’s picture

Field handler for source is done.

Open:

- relate node nid to feed_nid for building lists of nodes for feeds
- Field handlers for feeds_node_item.url and feeds_node_item.guid and feeds_node_item.imported

acouch’s picture

Version: » 6.x-1.0-alpha7
StatusFileSize
new1.85 KB

Attached is a patch that allows sorting by the nid of the node creating the feed by selecting the nid in the feeds_node_item table.

I just added to the feeds.views.inc file.

acouch’s picture

I am getting an error message when trying to attach the patch. Here is the code:

? feeds_view_node_item.patch
Index: feeds.views.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feeds/views/feeds.views.inc,v
retrieving revision 1.1
diff -u -p -r1.1 feeds.views.inc
--- feeds.views.inc 20 Oct 2009 21:03:08 -0000  1.1
+++ feeds.views.inc 18 Nov 2009 03:58:59 -0000
@@ -62,6 +62,46 @@ function feeds_views_data() {
     ),
   );

+  $data['feeds_node_item']['table'] = array(
+    'group' => 'Feeds source',
+    'base' => array(
+      'field' => array('feed_nid', 'id'),
+      'title' => 'Feed Items source',
+      'help' => 'The Feed Items identified by the node id it was created from.',
+    ),
+  );
+  $data['feeds_node_item']['feed_nid'] = array(
+    'title' => 'Feed item node id',
+    'help' => 'Contains the node id of the feed item, otherwise contains 0.',
+    'field' => array(
+      'handler' => 'views_handler_field_numeric',
+      'click sortable' => TRUE,
+    ),
+    'filter' => array(
+      'handler' => 'views_handler_filter_numeric',
+      'allow empty' => TRUE,
+      'help' => 'Filter on Feed Items by the Feed they were generated from using the Node Id of the Feed Node. ',
+    ),
+    'argument' => array(
+      'handler' => 'views_handler_argument_numeric',
+      'numeric' => TRUE,
+      'validate type' => 'nid',
+      'help' => 'Argument on Feed Items by the Feed they were generated from using the Node Id of the Feed Node.',
+    ),
+    'sort' => array(
+      'handler' => 'views_handler_sort',
+      'help' => 'Sort Feed Items by the Feed they were generated from using the Node Id of the Feed Node.',
+    ),
+  );
+  // 'feed node item' nid joins to 'node' nid.
+  $data['feeds_node_item']['table']['join'] = array(
+    'node' => array(
+      'left_field' => 'nid',
+      'field' => 'nid',
+      'type' => 'LEFT',
+    ),
+  );
+
   return $data;
 }
pbuyle’s picture

Version: 6.x-1.0-alpha7 » 6.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new3.46 KB

I took the previous patch and added support for URL, GUID and import date. It doesn't use any custom handlers.

Renee S’s picture

A quick comment, wondering if there's a way to add a relationship so that "Feed source" works? Right now it just appears as empty.

omerida’s picture

A relationship per #5 is a must-have. Or at least, I'm not seeing how to display the source of imported nodes when using the fields display handler in views.

mhrabovcin’s picture

It would be also nice if feed_nid argument could load title.

boztek’s picture

I agree with #5 and #6 - a "Feed Source" relationship such as was possible in Feed API is a must have.

alex_b’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new5.15 KB

Finally I got around to review this patch. I added relationship for owner feed as requested in #5/#6/#8 . I will commit this work en suite, posting the patch here for the record.

Here is the view I've built testing:

http://pastebin.com/m6b7004a6

alex_b’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thank you everybody.

#7: Using the feed node title as page title via argument handler works with the Owner feed relationship (see view posted in #9). Please reopen if I'm missing something.

strr’s picture

Thanks Alex
When can we expect the next update including this features in the Donload Version for Feeds 6.x Module?

strr’s picture

Thryed to import the view at http://pastebin.com/m6b7004a6
that gave couple errors:

# Field handler feeds_node_item.imported is not available.
# Field handler feeds_node_item.guid is not available.
# Field handler feeds_node_item.url is not available.
# Field handler feeds_node_item.feed_nid is not available.
# Field handler feeds_node_item.imported is not available.
# Field handler feeds_node_item.guid is not available.
# Field handler feeds_node_item.url is not available.
# Field handler feeds_node_item.feed_nid is not available.

What did i miss?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.