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

Is there any documentation for activity stream logic?

Discussion in 'XenForo Development Discussions' started by rhodes, Feb 15, 2015.

  1. rhodes

    rhodes Active Member


    I have a database table my_events with two columns
    1: timestamp
    2: html string with information about an event like "Carl made a comment in another system".

    I was wondering if I could embed these event informations in my xf activity stream. I already had a look at the source code of showcase and some other addons, but unfortunately I still groping in the dark.

    Are xf activity stream events saved in a database table or created on the fly? Is there any documentation available about this theme?

    Regards, rhodes
  2. Chris D

    Chris D XenForo Developer Staff Member

    Stuff is added to the news feed as it happens, e.g. if person X likes a post, at the same time we add an entry in the news feed.

    The only way you're really going to get third party activity in the stream is by using the News Feed system in the same way add-ons do. e.g. entering items into the news feed directly as they happen.

    Vaguely speaking this requires:
    • A content type
    • A content type field
    • A news feed handler class
    • Some custom templates/phrases
  3. rhodes

    rhodes Active Member

    OK, fine. Thank you. But there is no documentation for any of these options?
  4. Chris D

    Chris D XenForo Developer Staff Member

    It's all there in the code, really.

    The only thing slightly hidden away is the content type stuff, but if you look at any add-on that implements a news feed handler, you'll see in its Install file that it adds records to the xf_content_type table and xf_content_type_field tables.

Share This Page