MyBB Community Forums

Full Version: [XenForo 2.2 -> MyBB] Restoring Reactions (Likes)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I am migrating soon from XenForo 2.2 to MyBB. I have been running a test merge and I have noticed that the likes from XenForo so called reactions are not getting restored.

Is there a way to restore the likes ? Did somebody have done it before?
Currently I have no idea how I would achieve this, this why I try to reach out to hopefully get some help.

Thank you.
The current core MyBB software doesn't have the support for the reaction / like function you've mentioned. A feature kind of similar to it is post reputation but not exactly the same, so we haven't written a module for converting these data.

Probably you could find a mod / extension acting the same way as XenForo's reaction's, and try to convert your data.
(2023-07-10, 09:40 AM)noyle Wrote: [ -> ]The current core MyBB software doesn't have the support for the reaction / like function you've mentioned. A feature kind of similar to it is post reputation but not exactly the same, so we haven't written a module for converting these data.

Probably you could find a mod / extension acting the same way as XenForo's reaction's, and try to convert your data.

Hello, thank you for your reply.
Yes, there's a plugin that does exactly the same thing which appears to be https://community.mybb.com/mods.php?action=view&pid=360

I mean restoring the actual like count is not hard, but restoring what content exactly a user has liked is not possible :/
(2023-07-13, 07:44 AM)Eldamar Wrote: [ -> ]Yes, there's a plugin that does exactly the same thing which appears to be https://community.mybb.com/mods.php?action=view&pid=360

I mean restoring the actual like count is not hard, but restoring what content exactly a user has liked is not possible :/

We installed this same plugin to return the per-post like system. Plugin seems to work good, but yeah, couldn't figure out a way to convert our old forum likes into the new one, since it was more of a chicken and the egg situation. Its ok, people can move forward now though and give new likes. Decent plugin.
(2023-07-14, 12:28 PM)IncredibleHat Wrote: [ -> ]
(2023-07-13, 07:44 AM)Eldamar Wrote: [ -> ]Yes, there's a plugin that does exactly the same thing which appears to be https://community.mybb.com/mods.php?action=view&pid=360

I mean restoring the actual like count is not hard, but restoring what content exactly a user has liked is not possible :/

We installed this same plugin to return the per-post like system. Plugin seems to work good, but yeah, couldn't figure out a way to convert our old forum likes into the new one, since it was more of a chicken and the egg situation. Its ok, people can move forward now though and give new likes. Decent plugin.

Exactly, it seems like a very decent plugin. But still, all the likes will be gone from our users Sad it sucks.
I do not know your Xenforo system and therefore not the Likes there.

are there different Likes? then these have surely an own table and a clearly assignable ID
Then there are entries where the Likes were given, to which post and from whom and if necessary when

The myreactions-plugin has also a table for the reactions where these get a clear ID assigned
In another table is recorded, which posts, which reactions from whom have received

If you transferred the posts from Xenforo to MyBB, do they have the same ID (at MyBB pid)? If not, you can see how much the difference is.

Then only a script would have to be programmed that reads the Likes in xenforo and creates in the myreactions.
And then get the likes from the posts and assign them to the new pid, if necessary with adjustment for the difference in value. And with the new reaction_id belonging to the old likes_id

pure theory, don't ask me if I can program this for you; I could, but I just don't have the time and the knowledge about Xenforo. If you can do it yourself great, otherwise ask under Jobs if someone can build you a script there
It should be possible to code a custom module that converts your Xenforo reaction data to MyBB (plugin) data.
(2023-07-14, 06:48 PM)bv64 Wrote: [ -> ]I do not know your Xenforo system and therefore not the Likes there.
are there different Likes? then these have surely an own table and a clearly assignable ID
Then there are entries where the Likes were given, to which post and from whom and if necessary when
The myreactions-plugin has also a table for the reactions where these get a clear ID assigned
In another table is recorded, which posts, which reactions from whom have received
If you transferred the posts from Xenforo to MyBB, do they have the same ID (at MyBB pid)? If not, you can see how much the difference is.
Then only a script would have to be programmed that reads the Likes in xenforo and creates in the myreactions.
And then get the likes from the posts and assign them to the new pid, if necessary with adjustment for the difference in value. And with the new reaction_id belonging to the old likes_id
pure theory, don't ask me if I can program this for you; I could, but I just don't have the time and the knowledge about Xenforo. If you can do it yourself great, otherwise ask under Jobs if someone can build you a script there

XenForo has reactions yes, which gives +1 or -1 in points, depending on what u specify, pretty much like reputation. You can also add several emojis for a reaction (Sad face for -1 for example). But we only had "heart" for +1 reaction, and disabled everything else to keep it simple.

https://i.imgur.com/hKGwKfa.png


Then in the database, you find this table called xf_reaction_content with information:

https://i.imgur.com/uSMpwRz.png

As well as xf_thread which has a column called first_post_reaction_score with this information:

https://i.imgur.com/QLhNnZE.png

Pretty much overwhelming.

Edit: I think the data about what topic/reply a user has liked isn't really much neccesary. I would be happy if I could recover the actual "reaction/like" count for the user itself. Because I guess this is the most important thing our users would like to see restored.
I recall source (Xenforo) IDs (post ID, user ID) are stored while you run the merge, so it should be possible to import your _xf_reaction_content_ table content and then run a rebuild of the reputation data.

This would need a custom script because IIRC it doesn't exist. Or as I replied early, a custom module for the merge system.