Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSS feed on tagged-content-for-author pages needs to be built #2149

Closed
jywarren opened this issue Jan 27, 2018 · 1 comment
Closed

RSS feed on tagged-content-for-author pages needs to be built #2149

jywarren opened this issue Jan 27, 2018 · 1 comment
Labels
help wanted requires help by anyone willing to contribute Ruby

Comments

@jywarren
Copy link
Member

Profile pages like https://publiclab.org/profile/cfastie now show some great links to, for example, all content tagged as an activity for a given user --

https://publiclab.org/tag/activity:*/author/cfastie

However, the RSS feed on that page is a generic feed for activities, not just cfastie's:

https://publiclab.org/feed/tag/activity:*.rss

We need an RSS feed for this. It can be based on this one, which is the generic "all content for this tag" feed:

def rss
if params[:tagname][-1..-1] == '*'
@notes = Node.where(status: 1, type: 'note')
.includes(:revision, :tag)
.references(:term_data, :node_revisions)
.where('term_data.name LIKE (?)', params[:tagname][0..-2] + '%')
.limit(20)
.order('node_revisions.timestamp DESC')
else
@notes = Tag.find_nodes_by_type([params[:tagname]], 'note', 20)
end
respond_to do |format|
format.rss do
response.headers['Content-Type'] = 'application/xml; charset=utf-8'
response.headers['Access-Control-Allow-Origin'] = '*'
render layout: false
end
format.ics do
response.headers['Content-Disposition'] = "attachment; filename='public-lab-events.ics'"
response.headers['Content-Type'] = 'text/calendar; charset=utf-8'
render layout: false, template: 'tag/icalendar.ics', filename: 'public-lab-events.ics'
end
end
end

Any help with this would be appreciated! The new feed should probably be at:

https://publiclab.org/feed/tag/activity:*/author/_AUTHORNAME_.rss

Thanks!

@jywarren jywarren added help wanted requires help by anyone willing to contribute Ruby labels Jan 27, 2018
@SidharthBansal
Copy link
Member

@jywarren May I take this?? I want to implement and learn about how rss works, I think this issue will help me with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted requires help by anyone willing to contribute Ruby
Projects
None yet
Development

No branches or pull requests

2 participants