News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Wordpress 3.0+ User Integration

Started by SlammedDime, May 19, 2011, 06:54:29 PM

Previous topic - Next topic

SlammedDime

Link to Mod

This is an integration for Wordpress 3.0+ and SMF 2.0 RC5+.


Some basic features:
  • All user registrations and logins/logouts must go through SMF
  • Wordpress and SMF can reside in different databases with different database users if you wish
  • If a user doesn't exist in one of the systems when logging in, they will be created automatically
  • When a user registers in SMF, they will be registered into WP as well
  • When a user updates their profile in SMF, it will update in Wordpress (future feature: create a separate profile screen in SMF admin panel that maps to profile in Wordpress)
  • Map Wordpress Roles to SMF Membergroups and vice versa.  If their membergroup changes in SMF, it will change in Wordpress.  If a user doesn't exist in SMF, but does in Wordpress, they will get a SMF membergroup that you have associated with their Wordpress Role (and vice versa for users in SMF but not WP).
  • The only thing you need to enter in the admin panel after installing is the path to your wp-config.php file.  The mod even tries to auto-locate this file for you on your file system.

    PHP 5.2+ and a MySQL database is required for this mod to work.  It will throw an error on installation if you are not on PHP 5.

    Please see http://code.mattzuba.com/blogbridger for known issues/bugs/features, as well as more documentation and the most up to date code (for those daring enough to download and compile their own packages from the latest development code).  Only releases here on Simple Machines are supported, however I will gladly accept bug reports for non released, "trunk" code.

    Do NOT use the bug tracker for support.  If you don't know how to properly file a bug, don't use it.  I will close out 'bugs' reported that are support questions or that are not posted with reproducible steps, server information (Web server and version, PHP version, Mysql Version, SMF and Wordpress versions, etc).
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Eudemon

#1
hey 1st page reply for a soon be popular mod  ;D

so this check and updates both smf and wp db tables right

does it work for separate domains?
does it modifies wp files as well?
i guess it won't work if the sites are in different servers
(unless use remote db, but wutever this has nothing to do with me right now XD)

what about more than one wp and/or smf

i have smf and wp this mod should be useful, thx
will give this a try in the near future

SlammedDime

Quote from: Eudemon on May 19, 2011, 07:35:58 PM
hey 1st page reply for a soon be popular mod  ;D

so this check and updates both smf and wp db tables right

does it work for separate domains?
i guess it won't work for sites in difference servers

what about more than one wp and/or smf

i have smf and wp this mod should be useful, thx
Yes, it will update either database if the user doesn't exist in it.  No it will not work on different domains because of the rules of cookies.  It also won't work on different servers as this mod needs access to the wp-config.php file.  It also won't work on more than one wp/smf combo, as the database info is contained in the wp-config.php file for one wp install only.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

SlammedDime

SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

Eudemon

#4
didn't know u were online, was editing my post
thx for the quick respond tho

QuoteWhen a user updates their profile in SMF, it will update in Wordpress
does this include post counts, avatar etc? (i'm sure password, e-mail stuff are included right)

QuoteIt also won't work on more than one wp/smf combo, as the database info is contained in the wp-config.php file for one wp install only.
i think it should work if those wp or smf share some tables
for example i have 2 smf sites that are in the same database with separate tables
but they share the same member, membergroup etc tables

can u gimme a list of tables this mod will modify just to make sure it won't have conflict

Ken.

"If you don't have a stack of failures in your shop, you aren't trying hard enough". --Richard Raffin.


SlammedDime

Quote from: Eudemon on May 19, 2011, 07:53:52 PM
didn't know u were online, was editing my post
thx for the quick respond tho

QuoteWhen a user updates their profile in SMF, it will update in Wordpress
does this include post counts, avatar etc? (i'm sure password, e-mail stuff are included right)

QuoteIt also won't work on more than one wp/smf combo, as the database info is contained in the wp-config.php file for one wp install only.
i think it should work if those wp or smf share some tables
for example i have 2 smf sites that are in the same database with separate tables
but they share the same member, membergroup etc tables

can u gimme a list of tables this mod will modify just to make sure it won't have conflict
I don't see how post counts would sync... wordpress doesn't track that data.  Avatar won't sync either.  The only items that sync are:
            'member_name' => 'user_login',
            'real_name' => 'display_name',
            'email_address' => 'user_email',
            'id_group' => 'role',
            'website_url' => 'user_url',


This mod also does not modify any database tables.  It only inserts members into SMF's members table or Wordpress' user table, either through SMF's registerMember method or direct database injection respectively.


Quote from: live627 on May 19, 2011, 08:02:25 PM
Quote from: SlammedDime on May 19, 2011, 07:45:50 PMeh?
Your own rule got broken. So the PHP4 compatibility rule is null and void now, then.
You should probably take some time to review the updated Customization Guidelines...
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

King N

A feature to be added is that whenever a post is made in wordpress, a thread about that post is made in smf.

Masterd


Özgür

As always with SlammedDimme, nice work.
So Long

SlammedDime

Quote from: King N on May 20, 2011, 04:27:12 AM
A feature to be added is that whenever a post is made in wordpress, a thread about that post is made in smf.
Sorry King N, that won't likely happen anytime soon.  This mod can make no integration with Wordpress itself, it can only modify.  The only way to accomplish that would be to use Scheduled Tasks and poll the Wordpress database on a regular basis and create posts off of that, so there would be a delay between when it's posted in Wordpress to when it's posted in SMF.  However, I disagree with needing to even do that in the first place.  Why duplicate content?


Quote from: Masterd on May 20, 2011, 06:41:15 AM
Nice mod, SlammedDime! :D
Quote from: Özgür | Daydreamer on May 20, 2011, 07:32:13 AM
As always with SlammedDimme, nice work.
Thanks guys
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

KensonPlays

Is there a plugin you need to install on the WP end? or not?

Owner of Mesozoic Haven

SlammedDime

Nopers... hell nopers... I severely dislike the GPL for PHP code ;)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

KensonPlays

Ok. I will try this out when I get the time tomorrow :)

Owner of Mesozoic Haven

nram

I login to SMF but not I log in WP. I also can not register one in the SMF!

SlammedDime

Any errors on screen?  Any errors in your error log?  Link to your site?  Test account?
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

nram

Quote from: SlammedDime on May 20, 2011, 02:54:26 PM
Any errors on screen?  Any errors in your error log?  Link to your site?  Test account?
Try register: http://forum.umportfolio.net/index.php?action=register [nofollow]

Portal: http://umportfolio.net [nofollow]

ormuz

Quote from: King N on May 20, 2011, 04:27:12 AM
A feature to be added is that whenever a post is made in wordpress, a thread about that post is made in smf.

There is already a plugin on wp repository that does that very well.

thanks a lot for this mod.

SlammedDime

Quote from: nram on May 20, 2011, 03:13:21 PM
Quote from: SlammedDime on May 20, 2011, 02:54:26 PM
Any errors on screen?  Any errors in your error log?  Link to your site?  Test account?
Try register: http://forum.umportfolio.net/index.php?action=register

Portal: http://umportfolio.net
Can you please answer the other three questions I asked?  Also I haven't tested this with subdomains, so there is a possibility it may not work with them.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

nram

Quote from: SlammedDime on May 20, 2011, 02:54:26 PM
Any errors on screen?  Any errors in your error log?  Link to your site?  Test account?

Any errors on screen?
When I try to register: "Database Error: Please try again. If you come back to this error screen, report the error to an administrator."

Any errors in your error log?
Nop

Test account?
User: teste
Pass: teste

I can not give administrator accounts because it has confidential information



Other settings:
- Use subdomain independent cookies [YES]
- Use database driven sessions [YES]

- No portal estou a usar SSI do SMF

Advertisement: