Ticket #4023 (closed enhancement: fixed)

Opened 5 years ago

Last modified 3 years ago

Add slash:comments to RSS2 feed

Reported by: Otto42 Owned by: rob1n
Priority: low Milestone: 2.8
Component: Feeds Version: 2.8
Severity: minor Keywords: has-patch tested commit dev-feedback
Cc:

Description

The slash:comments extension to RSS2 basically puts the number of comments available into the feed directly. This can allow some feedreaders the ability to display the comments in the reader itself. Plus it really doesn't hurt anything to have it there.

Patch attached.

Attachments

slash-comments.diff Download (806 bytes) - added by Otto42 5 years ago.
Adds slash:comments to rss2 feed
slash-comments-fix.diff Download (796 bytes) - added by Otto42 5 years ago.
Fixed version using get_comments_number();
4023.patch Download (700 bytes) - added by peaceablewhale 3 years ago.
Patch for trunk

Change History

Otto425 years ago

Adds slash:comments to rss2 feed

Correction to previous patch: Use get_comments_number() to retrieve the number of comments. This actually works. :)

Otto425 years ago

Fixed version using get_comments_number();

  • Keywords dev-feedback 2nd-opinion added

I like it, but do you have any statistics on who actually *looks* at slash namespace stuff? For example, do Bloglines, Google Reader, etc look at it?

It seems if it's not popular, then it might as well go into a plugin...

  • Milestone changed from 2.1.3 to 2.2
  • Milestone changed from 2.2 to 2.3

After a bit of research, +1 for plugin and leaving it out of the core.

The only readers that use the slash namespace are readers that run on the desktop, as far as I know. They're often the only ones that display comments on an item to the user.

The slash namespace only has the one possible element, which gives the number of comments. It's limited in scope, but still useful information for these readers. At least a few of them cannot properly display comments from the comments feeds without knowing the number of comments in advance. Therefore it's useful to have.

While it could be in a plugin, it makes more sense in the core. I've been using it for a while and every reader I've tried handles it perfectly well. It passes through feedburner just fine. There's no real compatibility issues with it and modern feedreaders.

Also, for what it's worth, FeedValidator is aware of the slash namespace and will complain if it contains non-numeric data and so forth. It considers it to be a "normal" extension.

  • Owner changed from anonymous to rob1n
  • Keywords dev-feedback removed
  • Status changed from new to closed
  • Resolution set to wontfix
  • Milestone 2.3 deleted

Talked to Ryan, he says he doesn't think it really warrants being in the core. I agree, but I whipped up a plugin (URL at end of this post) in case someone wants to use this.

 http://shorty114.net/2007/04/slashcomments-plugin

  • Status changed from closed to reopened
  • Severity changed from trivial to minor
  • Component changed from Optimization to Feeds
  • Version changed from 2.1.2 to 2.8
  • Keywords dev-feedback added
  • Resolution wontfix deleted

I think the decision made 2 years ago should be reviewed now. slash:comments has been reviewed by the RSS Advisory Board and documented on the RSS Best Practices Profile:  http://www.rssboard.org/rss-profile#namespace-elements-slash-comments. In addition, the WordPress Atom feed provides the comment number via the thr:total element yet the RSS 2 feed does not have the same information provided.

  • Milestone set to Future Release
  • Keywords needs-patch added; has-patch removed

Patch for trunk

  • Keywords has-patch added; needs-patch removed

New patch attached.

  • Keywords commit added
  • Keywords 2nd-opinion commit removed

shouldn't this get added to the other feeds?

The Atom Threading Extension has been supplying comment number in the WordPress Atom feeds while the RSS 1 feeds do not have comment information. As a result, only RSS 2 feeds need this fix.

  • Keywords changed from has-patch dev-feedback to has-patch dev-feedback
  • Milestone changed from Future Release to 2.8

it's easily left to a plugin imo.

Not many users are aware of such a plugin I think. They will only notice that WordPress does not provide comment number information in the feed. (Especially because the RSS 2 is the default feed)

comment:20 in reply to: ↑ 18   Otto423 years ago

Replying to Denis-de-Bernardy:

it's easily left to a plugin imo.

The same information is already in the ATOM feed, and it's considered a best practice for RSS feeds. It's an extremely minor feature that should not need a plugin for it.

  • Keywords tested commit added

let's see if this gets in, then... there are just too many tickets around, and I feel like closing a hundred more.

Looks good to me.

Now we have lastBuildDate this seems safe to add

  • Status changed from reopened to closed
  • Resolution set to fixed

(In [11272]) Add slash:comments extension to RSS2 feed to give comment counts for posts. Fixes #4023 props peaceablewhale.

Note: See TracTickets for help on using tickets.