Feeds, Aggregators, and such things

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Branjawn's picture

I've asked for help on drupal.org, none received. So, reaching out to my North Cack peeps.

I have a site (church site). A member (pastor) has a blog. I want to feature the blog.

Attempt 1: Using core module Aggregator, publish box that has blog title and recent posts. This works, kinda. I get the titles of individual entries, but the url is the same for each one.
Article 1 (links to Article 3)
Article 2 (links to article 3)
Article 3 (links to Article 3)

Attempt 2: Using Feeds module, import blog as Feed Items. Formatting is off because import has user / role of Anonymous. There is a place to set the user for the import and I did, but it isn't taking, it's still importing as Anonymous. So there is no formatting because I use a 'simple text' input filter for anon users.

So, neither one really works for me. Have any of you had success with either of these modules for importing blogs?

Comments

Feed url

Branjawn's picture

Here is the blog if you wanna try it. http://souloxygen.blogspot.com/

Aggregator, Views and cronjob

mipaca's picture

Branjawn,

I have used Aggregator with Views and a cronjob to pull in the feed from the National Covenant News for the Northwest Conference (http://www.nwc-cov.org/news - grey sidebar).

Aggregator setup - Fill-in the title, URL and update fields. Likely just like you did before.

Views setup:
1. Add a View.
2. Enter the View name, View description (optional), View tag (optional) and select Aggregator item for the View type.
3. Click Next.
4. For the Defaults:
a. Enter a Title
b. Set the Style to HTML List
c. Row style to Fields
d. Items to display to the number of items you want to display (I used 3)
e. Under the Fields area add the fields for the Aggregator: Title and Aggregator Body
i. For Aggregator: Title choose the "Display as link" option
ii. For Aggregator: Body choose the Trim this field... and Strip HTML tags options
f. Under the Sort criteria add the Aggregator: Timestamp and choose descending for the ordering
g. Once you have those set click save.
h. Next choose from the Display type drop-down on the left the type of display you want the feed to be (block in my case)
i. Click Add Display
j. Under the Block/Page settings edit the Admin or Path and Menu settings
k. Click Save
5. Once you have that setup then insert the block on a page or navigate to the page.
6. Apply CSS styling to make the feed look the way you want it to.
7. Setup cronjob, this varies so much by hosting company that it requires some research based on your hosting provider. The point of the cronjob is to run the cron.php file in your Drupal install which will load the new post in the aggregator when they are available from the blog. I have mine set to run each hour. You might be able to do it daily depending on the frequency of posts.

Let me know if you need additional information.

Peace,

Mike

Mike Burrows
Owner, Mipaca Interactive, LLC
www.mipaca.com

Sweet

Branjawn's picture

That's awesome. Looks great. I'll try and implement immediately. Will let you know of the results!

Dude

Branjawn's picture

it worked perfectly, thanks!

You're Welcome

mipaca's picture

I am glad to hear that you were able to get it working.

Mike Burrows
Owner, Mipaca Interactive, LLC
www.mipaca.com

Spoke too soon

Branjawn's picture

to see, check out foc4u.org, look in lower left of page...
articles still all have same url, and it's not even a generic url for the blog, it's the url for an older blog post.

In Aggregator, this is the url I am using: http://souloxygen.blogspot.com/feeds/posts/default
Here is the result of that: http://foc4u.org/aggregator/sources/3

You see for URL it has something unexpected. I should have known, nothing in Drupal is every that easy.

found some evidence

Branjawn's picture

So, I went into phpMyAdmin and found that in the aggregator_feed table, there was a column called "Link" that had the faulty urls. It turns out that Drupal doesn't play well with Atom feeds.

I found a D.O. thread that I had missed before that said: there is a workaround, blogspot feeds have an rss2 option: use the alternate feeds/posts/default?alt=rss and the feed will integrate properly.

I tagged ?alt=rss to the end of my feed urls and this seems to have worked. Still, this is a critical bug with a core module. Aggregator cannot properly import Atom feeds, period. The thread has been open and active for over 3 years. Sad.

Good to Know

mipaca's picture

Interesting that the Atom Feeds won't integrate properly using Aggregator. Glad that Blogspot offers the alternative of an rss2 feed.

Mike Burrows
Owner, Mipaca Interactive, LLC
www.mipaca.com

Closed / Fixed

Branjawn's picture

Just affirming that this IS working with the url tweak. thanks again to mipaca for the walk-through which was spot on. Cheers!