This would be an ideal module for a Drupal 6 site I'm working on. Are there any plans for a Drupal 6 version? If so, is that coming soon? Great add on for FeedAPI either way.

CommentFileSizeAuthor
#11 feedapi_itemfilter.zip14.13 KBacreibo

Comments

momper’s picture

+1

momper’s picture

Title: Plans for Drupal 6? » FeedAPI Item Filter: Plans for Drupal 6?
acreibo’s picture

I have ported the Item Filter to Drupal 6 - only slight modifications were necessary. Works great so far. I don't know the best way to input code to a project.

fumbling’s picture

Looking forward to trying out your item filter in 6. Do you think you'll be able to find a way to have that added to the project within a week or so? Thanks again.

acreibo’s picture

I wrote to the current maintainer of the module - no answer so far.

cdemetriadis’s picture

If the current maintainer isn't willing to continue with this project, could someone just take over?

D6 is now in it's finest hour with the most popular modules up & running (Views, CCK etc)... so I guess all modules should be upgraded too...

This is a module I'd like to use too, but with the "term/tag" filtering option (see here). Maybe there should be an option in it's settings where you select where you want to filter the items - body, tags, title etc...

@acreibo Could you pls post your ported version so I can start form there, until the maintainer of this module comes through?

Thx to all...

TheUser’s picture

Any updates?

matt v.’s picture

acreibo,

You could add the updated files you came up with as attachments to this issue. From the sounds of it, there are several of us who would be glad to help in testing it.

fumbling’s picture

+1 on what Matt V. said. I'd be happy to help out any way I can.

TheUser’s picture

Hi,

i`m not a developer so i dont know if its ok ...but it worked so far. (Just a simple test but hey).

Changes: (use at your own risk)

feedapi_itemfilter.info
---old---
version = 5.x-1.0-beta
dependencies = feedapi
---end---
---new---
version = 6.x-1.0-beta
dependencies[] = feedapi
core=6.x
---end---

feedapi_keyword_filter.info
---old---
version = 5.x-1.0-beta
dependencies = feedapi feedapi_itemfilter
---end---
---new---
version = 6.x-1.0-beta
dependencies[] = feedapi
dependencies[] = feedapi_itemfilter
---end---

feedapi_itemfilter.module
---old---
113: $node = node_load(arg(1));
---end---
---new---
113: $node = menu_get_object();
---end---

feedapi_keyword_filter.module
---old---
18: function feedapi_keyword_filter_help($section) {
19: switch ($section) {
---end---
---new---
18: function feedapi_keyword_filter_help($path) {
19: switch ($path) {
---end---

thats it.

acreibo’s picture

Category: feature » task
Status: Active » Needs review
StatusFileSize
new14.13 KB

Attached please find the module for Drupal 6. Please note that I improved the keyword_filter slightly so that it is also looking for the keywords in the title or the tags of the feedapi node. It works great, but a cleaner way would be for sure to make it configurable via the settings, which shouldn't be hard.

matt v.’s picture

For what it's worth, I've installed the updated version (from comment #11) and so far it seems to be working great. I'll report back here if I run into any issues.

fumbling’s picture

Thanks, been looking forward to this release.

So far it seems to work perfectly for positive keywords. I can't seem to get negative keywords to work however, using "-wordhere" without the quotes. Is that right? Also, whenenever I refresh the feed I get the following error for each item updated. This error does not seem to effect the output, but thought you'd want to know about it, could very well be on my end:

warning: join() [function.join]: Invalid arguments passed in /var/www/html/sites/all/modules/feedapi_itemfilter/keyword_filter/feedapi_keyword_filter.module on line 109.

More than anything, I would like to use this module to weed out any feed item that contains a certain character rather than an entire word or phrase. In my case, any post containing the "@" symbol is what I'm trying to eliminate. Is this part of the regular expressions release? If so, is that coming soon? Really look forward to it.

Thanks again, surprised there aren't more people using this module.

matt v.’s picture

fumbling,

I looked over the code and it appears that acreibo updated the code to search more than just the descriptions (see line #109); however, the 'neg' section of the code doesn't appear to have been updated accordingly. Try changing line #114 to:

              if (stristr($teststring, $value)) continue 2;

I think that should fix it for negative filters.

acreibo’s picture

Hello Matt,

you are definitely right.

fumbling’s picture

Thanks!

Ultimately what I'm trying to do is pull in particular Twitter posts through FeedAPI. It's working, but I need to weed out all the @replies, such as @acreibo, @fumbling, etc, as they represent more than half the posts and only add noise to the application. Do I need the regular expression addition you mentioned at one point to do that? If I can eliminate any post with the @ symbol in the feed item title that would work perfectly.

fumbling’s picture

By the way, FeedAPI 6.x-1.5 just released. I was going to update, but the changelog warns that it has an API change. Will that affect how the install of Feed item filter for 6 works?

matt v.’s picture

fumbling,

For what it's worth, I've been running the updated FeedAPI (6.x-1.5) in conjunction with the updated FeedAPI Item Filter above for a while now with no major problems.

fumbling’s picture

Thanks Matt, i'll try it out with 1.5

kenorb’s picture

will test it as well...

milosh’s picture

Assigned: Unassigned » milosh
Status: Needs review » Closed (fixed)

I have added the Drupal 6 version as an official release.

As regards the modification to search the keywords in the title, description or the tags, then this will come with the configurable settings into development version.