XFtoWP - XenForo to WordPress integration

XFtoWP - XenForo to WordPress integration [Paid] 1.5.5

No permission to buy ($79.00)
sure, do you use anything other than the standard WP registration features? The first integration rolling out with beta 2 is MemberPress, for example.

No, not really I think. I have a custom made system within Wordpress (in the form of a plug in) where we store all kinds of data, that is then displayed on our website. Currently that system is accessible by all Wordpress users with a certain rank/role. Before this system was only meant for "staff" (ca. 100 people in our case) but we would like to open up this system for everyone. The system then becomes a bit similar to Wikipedia.

We already have a XenForo community running and those people will probably form the core of those who will also start using this system. Currently they would have to make a seperate account on Wordpress and it would be ideal if that's not necessary, while keeping the old Wordpress accounts (our staff) in place.

I'm actually not familiar with MemberPress, but a quick search learns me that this is to monetize memberships? That won't be necessary for us, it's just basic registration and logging in when I think about it. However, all the added features where we can sync our forums with our blog posts more then we're doing now are also very nice upgrades.
 
1. On WordPress, bridge displays at maximum only first page of XF comments (regardless of the number set in the options: "Replies per page"). This maximum number depends on the XF setting. There is no possibility to load more (the button is not displayed). In my case we have a lot of comments in XF but right now only first 30 are loaded from XF to WP.
This is at the top of the priority list for enhancing Thread comments along with offering comment sorting options.

2. From WordPress the only reaction possible is "like", all type of reactions are displayed and counted as "like".
I've heard this before and like the idea of including other reactions, which is possible to do!

3. <b></b> and <br/> tags from "forum-comment-user-title" section are displayed as text.
4. No possibility to translate singular "like" ("1 like")
Sound like minor bugs, I'll look into these.

5. Custom smiley's are not embedded as images but as text
6. Number of comments from XF are not reflected on the WP's home page
Can you send me a link to an example of these?

Can i use new beta version on production setup? What do you recommend?
To be safe I don't yet recommend using the beta plugin on a production site. Fortunately Beta 2 is proving to be remarkably stable and I expect to be in a full release before the month is over.

Thanks for the feedback, that was all very helpful!
 
  • Like
Reactions: def
No, not really I think. I have a custom made system within Wordpress (in the form of a plug in) where we store all kinds of data, that is then displayed on our website. Currently that system is accessible by all Wordpress users with a certain rank/role. Before this system was only meant for "staff" (ca. 100 people in our case) but we would like to open up this system for everyone. The system then becomes a bit similar to Wikipedia.
I'd have to see more to point you in the best direction but I'm certain there will be a way to integrate XFtoWP into your custom system without much difficulty.

I don't know if you're on the development side of things but this introduction guide should help you and your team get a grasp on what is needed to make custom integrations.


That article covers the very basics and there's still a few things that to be done in beta to make custom integrations fully self-sufficient, but I will be excited to help you get this running when the plugin is out of beta. :)
 
Can you send me a link to an example of these?
Currently in the text of the comment we see ::mycustomsmile:: which is namespace/code for our smile (usually animated gif).
To test please do:
1. xenforourl/admin.php?smilies/
2. add (xenforourl/admin.php?smilies/add) custom smiley
3. all smiley's are stored in xenforodb.xf_smilie table
4. SELECT * FROM xenforodb.xf_smilie
5. loop through it and regexp to replace xenforodb.xf_smilie.smile_text (usually sth like ::mycustomsmile:: ) with xenforodb.xf_smilie.image_url (two options here: stored as full or relative url)

If smileys are not available via the XF API they could be copied/synced to xfwp options, or dynamically from db (but then db connection, db auths, etc.), or manually entered in options (less convenient but no hassle with the xenforodb sql auths/connection). Last option is clean as we dont introduce 2nd layer of communication to already existing one - api.

For our previous XF-to-WP solution I have written "onload" javascript with a loop regexp on hardcoded array, but maybe such a workaround is not needed.

Right now I am kind of trying to figure out why on the home page the xf comment number (in the_loop) for post is most often 0 (almost, but not always!), while on page it counts number of comments correctly (always). Any hint? Is this theme issue? How could I trace it? I see that in wordpressdb.wp_postmeta['xfwp'] timestamps are updated according to the "Refresh interval" setting in XFWP admin panel section (currently set to 5m, in some of our bussiness scenarios we cannot afford delay). A debug-feature request here: if in the wp admin I could see human friendly XML showing what is stored for connected thread it could help :) (some attributes, values, etc, html is not needed)

We had some issues with caching (CloudFlare) but now it is solved (/etc/hosts has the IP for the xenforo domain so php api call from wordpress host to xenforourl/api/ does not go via cloudflare's dns but directly to the IP of http host). Currently the whole XF domain is excluded from caching in the CloudFlare setting, but additionally on our end any request to xenforourl/api/ goes directly to the backend.

Let me know please if you have some ideas what I could do to find reason for wrong comment number.
 
Last edited:
For our previous XF-to-WP solution I have written "onload" javascript with a loop regexp on hardcoded array, but maybe such a workaround is not needed.
The best I can see the plugin do from here is to introduce a filter that would allow you to add your own parse conditions to the thread content output, where you can swap the ::smilename:: to the image path.

Right now I am kind of trying to figure out why on the home page the xf comment number (in the_loop) for post is most often 0 (almost, but not always!), while on page it counts number of comments correctly (always). Any hint? Is this theme issue? How could I trace it?
Yes, sounds like a theme issue. XFtoWP filters into the standard WordPress get_comments_number filter so you will need to make sure all comments are output with the identically named get_comments_number() function.

EDIT: to generate the correct comments link you also need to make sure you use the comments_link() in the anchor tag. Full example looks something like:

Code:
<a href="<?php comments_link(); ?>"><?php echo get_comments_number(); ?></a>
.

A debug-feature request here: if in the wp admin I could see human friendly XML showing what is stored for connected thread it could help :) (some attributes, values, etc, html is not needed)
To save a trip to the database you can print the contents of xf_post_meta() to see what data is attached to any give page. Truthfully, outside of any comments data, there really isn't much XFtoWP needs to store. Your point here has given me an idea to add the "last sync date" to the Thread comments meta box, similar to how the new user sync options look.

Screen Shot 2021-04-07 at 3.33.11 PM.png
 
Last edited:
  • Like
Reactions: def
Right now I am kind of trying to figure out why on the home page the xf comment number (in the_loop) for post is most often 0 (almost, but not always!), while on page it counts number of comments correctly (always). Any hint? Is this theme issue? How could I trace it?
Hi @def, I'm not seeing any progress made with this on your site so if you need further consultation please message me at the MD Forums and I'd be happy to help you out.
 
  • Like
Reactions: def
I meant it will work fine with woocommerce plugin ? Users getting notifications when a purchase is made.
Sending messages and group promotions/demotions is not yet part of the WooCommerce integration. Account registration and updating email/password is already functional, however.
 
Sending messages and group promotions/demotions is not yet part of the WooCommerce integration. Account registration and updating email/password is already functional, however.

im more looking that when user will made a purchase from shop , he will get an email confirmation or notification on xf account. Is that possible?
 
im more looking that when user will made a purchase from shop , he will get an email confirmation or notification on xf account. Is that possible?
The WP and XF accounts presumably use the same email address, and WooCommerce already sends emails on product purchase so I don't see a need to duplicate that functionality with XFtoWP.
 
Hi @def, I'm not seeing any progress made with this on your site so if you need further consultation please message me at the MD Forums and I'd be happy to help you out.
Thank for tracking the issue - I reached theme authors first, lets see what they will say.
I advised to test with a simple plugin:
PHP:
function return_always_123( $count, $post_id ) {
return 123;
}

add_filter( 'get_comments_number', 'return_always_123' );

and then compare the_loop, the_post and the sections/blocks created with WYSIWYG editor of the theme.

If I understand it correctly this should be enough to reproduce the issue.
 
Mangini updated XFtoWP - XenForo to WordPress Integration with a new update entry:

Small functionality update

  • Hard filters out common excerpt strings ..., [...] from automatically showing in WordPress excerpts. To ensure you have consistent excerpts, edit the “default thread” settings in XFtoWP > Thread comments > Create thread
  • Removes {content} label from create thread controls
This patch is available in XFtoWP 1.2 Beta 2 Patch 1 (gasps for air) and XFtoWP 1.1.3.

Read the rest of this update entry...
 
Really interested in this and assuming it can do a couple of things I'll purchase right away :)

Right now I have a basic bridge which connects users between WP and Xenforo. I have the WP site setup to check against all the information in the Xenforo userdb. So for example, if login on the WP site, it checks the Xenforo userdb and if the user is not found in the WP DB, the user is added to the WP DB. That user can then login on both WP and Xenforo.

As this has a lot more functionality, which we could do with, would it be possible to switch to your system? Right now we push everyone to register via the Xenfoto registration. In your system, can we keep it that way so users still register via Xenforo and then the account will add them to the WP DB? Or, do all new forum users need to register via WP first, or can they register/login via either system?

Cheers!
 
Top Bottom