Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The attached patch supports views 'feed' selector. Simply enabling it gives all views that have the feed selector an atom feed and an icon.
Downside: atom.module doesn't come with an atom icon, so it just uses the RSS icon. This could easily be fixed by providing an icon with the module.
Downside #2: There ends up being 2 'atom' feeds listed on the view; one global one for the site, and one for the feed itself. The main atom feed should probably only be added if drupal_is_front() is true but I didn't want to force that decision on you.
Upside: Atom feeds a-plenty.
Comment | File | Size | Author |
---|---|---|---|
atom_views_feed.patch | 6.52 KB | merlinofchaos |
Comments
Comment #1
eaton CreditAttribution: eaton commentedI'd like to be the first to call this "awesometastic."
Comment #2
deekayen CreditAttribution: deekayen commentedNow that I'm actually paying some attention to this module, please re-roll this against DRUPAL-6--1.
Comment #3
deekayen CreditAttribution: deekayen commentedSince Views for D6 isn't stable (that I know of), go ahead and roll for D5.
Comment #4
deekayen CreditAttribution: deekayen commentedLinking up to http://code.google.com/p/google-highly-open-participation-drupal/issues/...
Comment #5
tmadeira CreditAttribution: tmadeira commentedI've started reading the code of views and atom modules and I'll release the new patch soon.
BTW, about the icon:
I'll use the standard feed icon: http://feedicons.com/
Is that OK?
Comment #6
deekayen CreditAttribution: deekayen commentedThat one is preferred, though use the one that comes with Drupal in the misc directory (feed.png).
Comment #7
add1sun CreditAttribution: add1sun commentedtask was re-opened due to lack of response and is now claimed by alexandrebfarias.
Comment #8
cwgordon7 CreditAttribution: cwgordon7 commentedOpening task because it's not really claimed by tmadeira.
Comment #9
Etinin CreditAttribution: Etinin commentedAssigning it to myself as it's now claimed by me (alexandrebfarias on Google Code).
Sorry about the delay in upgrading this, but I've been busy with some other things.
Comment #10
webchickBack up for grabs.
Comment #11
merlinofchaos CreditAttribution: merlinofchaos commentedComment #12
kyl191 CreditAttribution: kyl191 commentedaclight & co. : I'm still here, working on the code. Have one question for now -
return theme('feed_icon', url($url));
- As far as I can tell, to fix downside #1, this is where I pass the url for the atom feed icon, right?As I mentioned to webchick, the going is slow cause I'm not that familiar with PHP - but I'm still going to finish it even if I have to work beyond the ghop deadline.
Comment #13
deekayen CreditAttribution: deekayen commentedYou haven't given much context, so I'll say, yes
theme('feed_icon', url($url));
is correct as long as...1) $url actually needs to be processed by
url()
(it hasn't already been throughurl()
already)2) $url points to the URL of the feed - the place where the feed reader will need to go for the content you're syndicating. the theme function already knows where to find the feed icon when you tell it 'feed_icon'.
3) returning
theme(
... is the result of a function that should be just processing the feed iconPut it inside some code and upload it and it'll be much easier to give you a clear answer and help point you in the right direction if it's wrong.
Comment #14
deekayen CreditAttribution: deekayen commentedhttp://drupal.org/project/coder is a decent module for getting automated help on your code if you're still too shy to post a preview patch.
Comment #15
agerson CreditAttribution: agerson commentedViews 2 is now stable. It would be great to have atom integration.
Comment #16
deekayen CreditAttribution: deekayen commentedAgreed. This feature is welcomed if someone fixes the patch for 6.x.
Comment #17
XerraX CreditAttribution: XerraX commentedsubscribing