[wp-hackers] SMF Integrator (A WordPress 2.2.2 Plugin)

Curt Woodard clwoodard at gmail.com
Mon Aug 27 12:33:53 GMT 2007


> Quick questions, by curiosity:
> - are you using updatable views?

No, the view isn't updatable. This is because, in the view, I'm
changing the table header to match that of WordPress so that it's a
mirror of the users table. MySQL doesn't allow updatable views that do
this, for obvious reasons. One of those reasons being: SMF and WP
store dates differently. SMF stores them as unix timestamps while WP
stores them as datetime. So I had to use a MySQL function to
translate.

Now, I *could* make it updatable and find a way to change the result
of database queries into a form that WP uses, but that would require
hacking the core files, which we don't really want to do. If WP were
written so that you could override ANY function, then this wouldn't be
an issue, but that would require hacking WP as well at this point...
:)

> - are they 1 to 1 views or linking to multiple joined tables?
>
> Stephane

The view is 1-to-1 without joining to other tables. This is because
SMF has all of it's user information in the members table, unlike
WordPress's users and usermeta tables.

I went ahead and kept the usermeta table because it stores stuff that
is WordPress specific from plug-ins and the like.

Which reminds me, I need to check compatibility with a few of the
plugins that I use, like the LJ cross-poster. It might be a good idea
to somehow hack that plugin so that it's user-specific and can be
turned off on a user-by-user basis... No need to have JimmyBob posting
to my Live Journal, eh? Though, I could change that to a
community-based LJ and have people post that way... I'll have to see.


More information about the wp-hackers mailing list