SMFHacks.com

Modifications/Themes => Modifications Talk => Latest Mods => Topic started by: SMFHacks on April 03, 2020, 11:37:44 am

Title: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: SMFHacks on April 03, 2020, 11:37:44 am
SMF2WPBridge - Wordpress Login Bridge



https://www.smfhacks.com/index.php?action=downloads;sa=view;down=228

SMF2WPBridge is a simple one way bridge from Simple Machine Forum to Wordpress.

This plugin will do these following tasks:

    If a user log in SMF, then that user will be logged in WP.
    If a user logout in SMF, then that user will be logout in WP.
    If a user created/register/change password in SMF, those actions happen on WP!
    Users that are created in WP can be used once disabled SMF plugin.
    For integrate old users send password in login page!
    For upgrade SMF2WPBridge version unistall first.
    For a full way integration use with WP2SMFBridge plugin: https://github.com/xchwarze/WP2SMFBridge https://wordpress.org/plugins/wp2smfbridge
Limitations

    SMF login with OpenID does not work

Install instructions

    Create a folder named SMF2WPBridge in your Packages folder
    Install with Admin > Package Manager

or

    Download from button "Download ZIP"
    Uncompress zip
    Zip the content of "SMF2WPBridge-master" folder to a new zip
    Upload and install with Admin > Package Manager,2
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: SMFHacks on April 03, 2020, 01:41:05 pm
Note this mod does require changes for 2.0.16 with the https://wordpress.org/plugins/wp2smfbridge/


https://www.simplemachines.org/community/index.php?topic=570989.0
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: SMFHacks on April 04, 2020, 07:16:59 pm
Have sent the patched file to the original developer for the bridge to add support for SMF 2.0.16+
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: Decent_946 on April 09, 2020, 01:56:31 pm
Have sent the patched file to the original developer for the bridge to add support for SMF 2.0.16+
Hi, Is it operational in 2.0.17 ? Cuz installing it broke my site.

Code: [Select]
Fatal error: Redefinition of parameter $memberName in /storage/ssd1/390/13123390/public_html/Sources/Subs-SMF2WP-User.php on line 98
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: SMFHacks on April 09, 2020, 02:15:41 pm
Made a patch for it. Redownload latest.
Grab Subs-SMF2WP-User.php and copy to your sources folder to try
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: Decent_946 on April 09, 2020, 03:37:54 pm
Made a patch for it. Redownload latest.
Grab Subs-SMF2WP-User.php and copy to your sources folder to try
It worked. Thank you! :)
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: SMFHacks on April 10, 2020, 12:36:02 pm
Fixes added!
And SMF 2.1.x support added
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: js on April 22, 2020, 01:20:47 pm
@SMFHacks

I came here to resolve this doubt. I think that properly configured two plugins: WP2SMFBridge, SMF2WPBridge - but there is a problem. When I log in to WP, I am logged in to SMF, but if I log into SMF first, I am not logged in to WP. What's wrong here?
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: SMFHacks on April 22, 2020, 01:24:25 pm
Will have to look into maybe

First is the account the same on both. If you create one in smf and it creates in wordpress can you lgoin there.
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: js on April 22, 2020, 01:32:32 pm
The account in WP and SMF has the same name and the same password.

Is this information: Your WP path is invalid! could not locate wp-config.php is generated automatically by checking if there is a connection to this file or is it just normal information? I am asking because this information is still displayed despite the fact that WP > SMF login is correct.

Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: SMFHacks on April 22, 2020, 01:44:13 pm
No you shouldn't see the WP path only if it does not exist make sure you have a / on the end

Code: [Select]
if (empty($modSettings['smf2wp_wp_path']) ||
!file_exists($modSettings['smf2wp_wp_path'] . 'wp-config.php'))
$config_vars[] = '<span style="color:#DF013A">' . $txt['smf2wp_error'] . '<span>';
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: js on April 22, 2020, 01:55:57 pm
Only this sign should be entered here?

(https://i.imgur.com/S9pghKo.png)
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: SMFHacks on April 22, 2020, 02:00:09 pm
No the full path like /home/public_html/wordpress/
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: js on April 22, 2020, 02:09:16 pm
I set this path: /websites/mydomain.pl/wordpress/ this information is still displayed: Your WP path is invalid! could not locate wp-config.php
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: SMFHacks on April 22, 2020, 02:19:51 pm
Might be a safe mode issue not sure. We just use a normal file_exists check
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: js on April 22, 2020, 02:36:55 pm
I will ask server support. Although this information is displayed, the WP > SMF connection is working properly. I hope that SMF > WP will also work. I'm waiting for information from you.
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: SMFHacks on April 22, 2020, 02:57:06 pm
Yes it does work to create users. Cookies not sure I think you have to be on same domain
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: js on April 22, 2020, 03:17:10 pm
What do you mean?

Why, when I log in to SMF first, I am not logged in to WP?
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: SMFHacks on April 22, 2020, 03:30:23 pm
You should as long as you are on the same domain. Blog and forum need to be on same domain.
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: js on April 23, 2020, 02:35:44 am
Will have to look into maybe

First is the account the same on both. If you create one in smf and it creates in wordpress can you lgoin there.

Did you check the login correctness between SMF and WP? When you log in to SMF, are you also logged in to WP? As I wrote earlier. When I log in to wordpress first, I am automatically logged in to SMF. But the bridge between logging into SMF and automatically logging into WP is not working. Therefore, it is worth checking the correct working of the bridge between SMF and WP.

You should as long as you are on the same domain. Blog and forum need to be on same domain.

I installed the blog and forum in these folders:

Blog: mydomain.pl/wordpress

SMF: mydomain.pl/wordpress/forum
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: js on April 26, 2020, 03:04:47 pm
Okay, this information has disappeared after implementation the full path. The SMF > WP bridge also works. 8)
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: SMFHacks on April 26, 2020, 03:22:22 pm
Nice!
Title: Re: [Mod]SMF2WPBridge - Wordpress Login Bridge
Post by: js on April 28, 2020, 05:04:54 am
Can even enter this path:

../

And this is also the correct path. :)