1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Display Recent Activity Elsewhere

Discussion in 'XenForo Questions and Support' started by Peter, Nov 30, 2010.

  1. Peter

    Peter Active Member

  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You can use javascript to display records from a forum feed on your external page. I don't see a JS feed in xenForo, only a RSS feed. So I think you need to use a service like feed2js to handle the XML parsing. Here is the javascript code it generated for the Announcements forum feed:

    Code:
    <script language="JavaScript" src="http://feed2js.org//feed2js.php?src=http%3A%2F%2Fxenforo.com%2Fcommunity%2Fforums%2Fannouncements%2Findex.rss&amp;chan=y&amp;num=10&amp;desc=1&amp;au=y&amp;utf=y"  charset="UTF-8" type="text/javascript"></script>
    
    If you enter this code into your web page then you will see it lists the 10 most recent threads from the Announcements forum here on xenforo.com.

    A few things to note:

    1) I personally don't like using a service for something like this, but I think it is necessary in the absence of a proper JS feed from xenForo. I imagine xenForo will eventually add other feed formats like JS.

    2) Currently xenForo doesn't have a feed for the entire forum, only for individual forums. This has already been suggested and I imagine it will be added eventually.
     
  3. Peter

    Peter Active Member

    Thanks for sharing Jake. So does that mean I can use it for recent activity as shown here? http://xenforo.com/community/recent-activity/

    Basically I would like to do something like http://testbp.org/ but as members do something, visitors will see it in real time.
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Oh OK. That is different than what I posted. You want a feed for all forum activity, not just recent threads. There is no outgoing feed for that so you can't use simple javascript like I posted before. There are other ways to implement this but they require custom code.

    If it was me I would post a request in this forum for a JS feed of recent activity.
     

Share This Page