Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Forum: Unreplied RSS Feed – How to? (3 posts)

Started 3 months, 3 weeks ago by: Pisanojm

  • Profile picture of Pisanojm Pisanojm said 3 months, 3 weeks ago:

    I would like to be able to generate a RSS feed or a postable list of topics that are currently “unreplied” in the forums to generate activity on those items. Currently we are able to view unreplied items in the forums by using the drop-down filter… Is there/ how can I generate an RSS feed of these items or format them in a way that I can easily grab and post them in a widget, etc.?

  • Profile picture of Pisanojm Pisanojm said 3 months, 2 weeks ago:

    Anybody?

  • Profile picture of r-a-y r-a-y said 3 months, 2 weeks ago:

    Check out how feeds are done in BuddyPress itself.

    There are two things you need to do:
    1) Create an action listener to tell BuddyPress that the URL you’re on is the feed
    2) Next, tell BuddyPress what template file to use for the feed and create an activity loop to generate the feed.

    For example, to see how BuddyPress generates the sitewide activity feed:

    1) BP creates an action listener for the sitewide activity feed here:

    http://buddypress.trac.wordpress.org/browser/tags/1.5.3.1/bp-activity/bp-activity-actions.php#L359

    2) BP uses the following template file referenced in step 1 to generate the sitewide activity feed:

    http://buddypress.trac.wordpress.org/browser/tags/1.5.3.1/bp-activity/feeds/bp-activity-sitewide-feed.php#L1

    See how that file structures the RSS feed? It uses an activity loop (bp_has_activities()) with specific arguments to sitewide activity.

    To create an unreplied RSS feed, follow the steps above as a guide.

    Instead of an activity loop in the RSS feed, you’ll probably need to use a forum topics loop with ‘type=unreplied’ as the argument.

    Hope that gives you a few pointers.