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.
Here's a patch that adds RSS feeds to both the "all posts" and individual users' view. So you can get a feed of all posts to a site (not just those that are promoted to front page) or all posts by an individual user.
The patch also fixes tracker so that it does not list moderated nodes.
Due to the nature of RSS, there is no point to sorting the feed by latest comments, so the feed is simply sorted in reverse chronological order.
Comment | File | Size | Author |
---|---|---|---|
#15 | tracker-wants-rss.patch | 7.29 KB | matt westgate |
#11 | tracker-rss4.patch | 5.11 KB | jjeff |
#8 | tracker-rss3.patch | 4.98 KB | jjeff |
#3 | tracker-rss2.patch | 4.99 KB | jjeff |
tracker-rss.patch | 4.9 KB | jjeff | |
Comments
Comment #1
matt westgate CreditAttribution: matt westgate commented+1 on the bugfix and the feature. Until we make tracker URLs as robust as the taxonomy URL system, this is a worthwhile patch that allows folks to track only the users they want to.
I'm being nitpicky here, but we should add a line or two of documentation to tracker_feed().
Comment #2
Dries CreditAttribution: Dries commentedCoding style needs work too.
Comment #3
jjeff CreditAttribution: jjeff commentedComments added.
Code styled.
Good?
-jeff
Comment #4
moshe weitzman CreditAttribution: moshe weitzman commentedthis looks a bit odd:
if ($uid == 'feed'){
+ return tracker_feed();
+ }
+ elseif ($feed == 'feed'){
+ return tracker_feed($uid);
+ }
nice feature
Comment #5
Dries CreditAttribution: Dries commentedRather than writing:
I'd write:
$uid
being a number is not enough.$user
, use$account
.$user
is the current user. Best not to share the same variable for two different purposes. It's prone to security errors.$feedurl
should be$feed
,$url
or$feed_url
.Similarly:
Is better done as follows:
Comment #6
jjeff CreditAttribution: jjeff commentedOkay, I'll clean this up.
But the reason that I was using is_numeric() was to allow for a feed of anonymous user posts (uid = 0). Will
on every node in the listing. And to further compound things, the RSS feed is going to execute as an anonymous user, so they still may not be able to get the content. Would tagging the session id onto the end of the feed URL allow Drupal to recognize them as a user... even if the request is coming from a separate RSS reader?
(Sorry to head off on a tangent... just want to make this good.)
-jeff
Comment #7
Robin Monks CreditAttribution: Robin Monks commentedComment #8
jjeff CreditAttribution: jjeff commentedCleaned up and ready to go (I believe)...
-j
Comment #9
chx CreditAttribution: chx commentedregarding feeds and auth , the primary goal of securesite module is to provide auth'd feeds.
Comment #10
jjeff CreditAttribution: jjeff commentedThat last patch was bad. I'm fixing and will post another soon.
Comment #11
jjeff CreditAttribution: jjeff commentedFixed.
Comment #12
Jaza CreditAttribution: Jaza commentedThis patch is quite useful for following the main site-wide tracker, but it seems a bit useless for tracking your own posts (or other individuals'). You don't need the 'my recent posts' page to let you know when you've posted new content - you would know that without looking! The whole point of 'my recent posts' is to track updates (i.e. comments) on your posts. And the RSS feed doesn't communicate updates to posts at all.
As with Jeff, I don't see any solution to this problem. I guess that the only way to track updates to individual posts is either to use the comments RSS module, or to use the subscriptions module. This patch _could_ be modified to sort posts by latest comment, and to show posts as new when they are updated, but I don't know how well that would work.
Comment #13
Jaza CreditAttribution: Jaza commentedComment #14
Dries CreditAttribution: Dries commentedI still don't like the way you use
$uid
(taken directly from the query string). It's prone to security errors.Comment #15
matt westgate CreditAttribution: matt westgate commentedHere's an approach to this patch which handles RSS similar to blog.module. I find this a little cleaner to look at and it conforms with an already existing Drupal style.
Comment #16
Dries CreditAttribution: Dries commentedThis is a feature, not a bug.
I think we can clean up the code some more ...
Comment #17
Tobias Maier CreditAttribution: Tobias Maier commentedmarked http://drupal.org/node/7474 as duplicate of this one
and +1 from me for the idea :)
Comment #18
mcduarte2000 CreditAttribution: mcduarte2000 commented+1 I need this also.
Comment #19
moshe weitzman CreditAttribution: moshe weitzman commentedif possible, lets be thorough about our patch reviews. they are more than mere votes. see the guidelines: http://drupal.org/patch/review
Comment #20
m3avrck CreditAttribution: m3avrck commentedID tags on HTML elements can't have spaces in them.
$output = '<div id="tracker tracker-user-'. $account->uid .'">';
Perhaps that should *just be* tracker, to be consistent with the other use of
<div id="tracker">
later on in the patch.Also comments above the functions for PHPDoc would be useful.
It isn't clear how
function tracker_page($a = NULL, $b = NULL) {
makes use of argument $b. I didn't see anywhere in the patch that made use of this argument.Comment #21
Tobias Maier CreditAttribution: Tobias Maier commentedplease dont use so much id-attributes - I hate them!
dont hardcode html in general! use theme-functions
Comment #22
Uwe Hermann CreditAttribution: Uwe Hermann commentedBump - wanna have ;)
Comment #23
moshe weitzman CreditAttribution: moshe weitzman commentedIMO, Views + view feed modules makes the tracker and this feature request nearly obsolete.
Comment #24
matt westgate CreditAttribution: matt westgate commentedAgreed with Moshe.
Comment #25
Dries CreditAttribution: Dries commentedPlease don't mark this won't fix. We want this in core, and neither the feeds.module or the views.module are part of core at this point.
I'd like to see this patch land but it needs some clean-up. It uses 'blog' where it should be 'posts'. 'All Posts' should be 'All posts' (or something). Code can be slightly improved too.
Comment #26
jjeff CreditAttribution: jjeff commentedPerhaps, we should file this comment under feature creep, but how about a feed for all of the comments by a user... and/or all of the comments on a user's posts... and/or continuing comments on posts that a user has commented on...
Take a look at the different feeds that you can get from Flickr for some indications of where I would like to head with this. I'll take a look into these ideas in the next few days and try to roll a new patch. But I will likely need some help in the "cleaning it up" department -- as I consider myself to be a sloppy coder with big ideas. :-)
Comment #27
xaueious CreditAttribution: xaueious commentedCan someone educate me as to whether or not this patch works for 5.x?
Comment #28
funana CreditAttribution: funana commentedWhat's the status?
I would like to generate feeds for all usergenerated content by user, so that users can use their RSS on other pages, like "My posts on xyz.com" or "my bookmarkroll" (See also http://drupal.org/node/122445)...
Any news?
Comment #29
catchComment #30
singpolyma CreditAttribution: singpolyma commentedCan anyone give tips on how to apply this patch to Drupal? Can it work with 6.x-dev?
Comment #31
ChrisBryant CreditAttribution: ChrisBryant commentedAre there any plans to include this in an upcoming Drupal release (and possibly on Drupal.org?)
This would be a killer feature for the community/Drupal.org to be able to use RSS to subscribe to our own and other users posts/updates. It will help people keep up with important activity in the community from whatever other methods/channels they use.
Please excuse me if there is already some other viable method to do this that I'm not aware of?
Comment #32
Dave ReidChrisBryant, you can currently do this with the Views module.
Comment #33
ChrisBryant CreditAttribution: ChrisBryant commentedThanks David. I'm aware of that, but the problem is that it's not part of Drupal core and also not available on Drupal.org.
If Drupal.org started using the views module for the tracker view then it would all be good and could be added that way as well. :-)
Comment #34
Alex UA CreditAttribution: Alex UA commentedI'm currently trying to build a scraper to mimic this functionality so that we can display our drupal activity on our company profile pages, but the way the tables are structured is making it pretty difficult. Is there any way this could still make it into core? It would make things so much easier!
Comment #35
Dave ReidComment #36
Dane Powell CreditAttribution: Dane Powell commented+1 for enabling this on drupal.org. The most annoying thing about developing for Drupal for me is having to visit drupal.org every single time I want to check for replies to my issues and posts.
Comment #37
Dane Powell CreditAttribution: Dane Powell commentedSeriously, I'm willing to do some legwork to make this happen, I just need some direction. How can we get an RSS feed of our issue activity?
Comment #38
ChrisBryant CreditAttribution: ChrisBryant commentedAt this point Drupal.org is already running views so this should just be a matter of adding the rss feed to the view. Can someone with access add that for us?
Comment #39
Damien Tournoud CreditAttribution: Damien Tournoud commentedDrupal.org doesn't use Views for the tracker pages, but the Tracker2 module. The query that Views and the core Tracker module use simply doesn't scale.
If this is a feature request for d.o, please move that issue to the Tracker2 module, or open a new issue there.
Comment #40
Dane Powell CreditAttribution: Dane Powell commentedI have opened #492286: Provide RSS feed for drupal.org/tracker/uid and drupal.org/tracker in the T2 queue.
Comment #41
jhedstromCode more along the lines of Tracker 2 has been commited to D7 #105639: Tracker performance improvements.
Comment #42
catchThis is a new feature, so moving to Drupal 8.
Comment #43
Pinatz CreditAttribution: Pinatz commentedDoes this work with drupal 6.15? Or could anybody make a patch to get this working for a tracker.rss feed? I dont want to have a feed for every user but only one with every changes of the site like you can see in the tracker module :>
Comment #44
jhedstromThis issue needs to remain in the 8.x issue queue.
Comment #45
Pinatz CreditAttribution: Pinatz commentedOkay, but anyways a solution for a general tracker-Rss-Feed with the newest changes ? =/
Comment #46
Vacilando CreditAttribution: Vacilando commentedSubscribing.
Comment #47
jhedstromWow, this one is old. Anything left to be done here?
Comment #48
Darren OhWith Views in core, this is no longer an issue.
Comment #50
Gábor HojtsyLet's say its a won't fix since people can create those views themselves?