XF 2.2 Shared discussion between two xenforo sites?

Dannymh

Active member
Hi,

I am trying to find a way to facilitate a discussion between two different sites. We both have sites about different teams in a sports tournament and we want to have both sites share a joint discussion when the game is one without requiring the users to register on each page.

Currently I have a quick solution in place for this using an embedded commenting/chat system that is shared between both sites and embedded in each, so users can chat at the same time from the relative comfort of their site.

Going forward I would like to see if I can find a way to do this without needing 3rd party tools. I am thinking of seeing if I may be able to use the API to push the posts in a specific thread between the sites when they are posted where the post will still show with username but without the user needing to be registered.

I am just wondering if that would work

So each site has a thread, when someone posts in
Site a -> post is pushed also to site be
Someone in replies in site b -> reply is pushed to site A

I know its probably pushing things and maybe asking for trouble, but would something like that work?
 

Robert9

Well-known member
I have to do something equal soon.
But i dont want to have the same users in both forums.
So i only fetch posts from any thread by check them and send them to the other forum.
One special user will post them in a new thread in a special subforum in the second forum.


In your case you maybe need this way:

threadForumA = x
threadForumB = y

somehow select the posts
send them with API from A to B or B to A
use a specialUser or two like SportsAReporter, SportsBReporter

maybe add a sentence above like:

i]this post is fetched from SportsForumA, you can find the original here, url#postId[/i
{message}
 

Dannymh

Active member
Think it's going to need two things

1 - An addon that has the thread ID from each site in the settings, or could be triggered by title. The addon will need to look at the post creator or on save method
2 - API connection on each and that API is triggered on post-save to pushed to the other site, that way it all happens as close to real time as possible and doesn't need to poll the forums and pull the data. I just need to be careful about overheads it may create
 

Dannymh

Active member
Just as a way of updates I took this on as a thing to add and we have a really good and basic setup going between 3 sites.

I hooked into the post preparer and on the post being added, it pushes the post to the two other sites into a given discussion on those endpoints.

The receiving end takes the post as a specified user calles "Site x user" and puts the post in place with an amendment of "Posted on behalf of <siteX> user"

We are managing embedded images as well.

We tested it last night across the 3 sites and had a really good embedded conversation. It is a little hard to read as its not really clear which user has posted the message, so I am looking at a next stage of adding in a custom post template based on the user that is posting i.e. if its SiteX user, use the custom post template, that makes it looks like it comes from a user, then I may push some ID's and do some rendering on that set of ID's to try and get the quote and pushing done that way. It's been a fun experiment and a good usecase
 
Top