How To Create Recent Topics and Popular Topics Widget?


(Mohammad Mustafa Ahmedzai) #1

I would love to get the javascript code to display Recent Topics/ Popular topics list on our primary website. Just like we do it in Blogspot blogs or Wordpress. I would love to know how can we do this as Discourse supports RSS and display recent entries in the RSS format. I would love to display recent topics lists and Popular topics list to my website readers on a simple widget built with javascript.

The Recent Topics widget must have the following features:

  • Display List of Recent Topics by title sorted by date
  • Each Topic Title may display Date and Author Name

The Popular Topics widget must have the following features:

  • Display List of Popular Topics by title sorted by views
  • Each Topic Title may display Date and Author Name

I am sure everyone would love this


(Jeff Atwood) #2

Any RSS displaying widget should work for your needs then. Surely there are thousands of choices out there.


(Mohammad Mustafa Ahmedzai) #3

@codinghorror I would really appreciate if you could share some links or at least a working code. It would save us a hell lot of time!


(Mohammad Mustafa Ahmedzai) #4

Just want to inform that I found a great example at jquery.rss example - JSFiddle

Would appreciate if you could share the list of all available RSS links in Discourse. I know of 301 Moved Permanently
Are there separate RSS files for category, popular lists?

One more question, the author and Date tags have a pretty ugly format. Can we make the format output look clean for <author> and <Date> ?
Author tag outputs no-reply@example.com (@Mohammad Mohammad Mustafa Ahmedzai) can we display only the nickname>


(Jeff Atwood) #5

View source to see the RSS links on various pages.


#6

I would love to see a plugin that did this and displayed the most popular, most commented, most liked, etc.