[Development] - Post to WordPress from myBB
Hi All,

Whilst I am writing a CMS style plugin for my site, I need something to allow me to migrate away from Joomla ASAP as it is slowing my site and starting to become a bit bulky. I want to get onto wordpress as a good intermediate way of still hosting content whilst I further develop my custom CMS.

A large part of my site is not only user interaction in the forums but also user submitted and generated content. Up until my site was hacked I had my logins integrated between my main site joomla and the forums, when my, mybb was hacked I broke off this connection and decided not to repackage it.

Instead my front site runs on its own for now.

However when I get to WP I wanted a way for my users to still submit content and articles to the main site without having to login and the resolution for this was simple.

1 - Use external authentication in WP which brings users into WP and authenticates them against my Mybb database
2 - Build a plugin that allows usrs to submit articles directly from a page in myBB using wp XML-RPC

The plugin has options allowing for the post to be linked to the user or a default user, it also has the ability to create users in WP if they do not exist and so on.

Right now I have the basics working I can submit a post etc. I am not just building out a more robust submit page which includes categories as well. Once this is done, I will be tying in a PM to specific user group when a news article is posted and the ability for mybb users to change the post from draft to published all from mybb.

Some may not see the point in all of this, but I am working with less than savvy computer users and multiple logins etc confuse them, this just builds in a better way for them to do this in an easily managed way.

  • Create post from mybb
  • attribute post to user who posted or default user
  • Add user to WP if they do not exist
  • Discuss Bot, Either full post, excerpt or above the "more" tag is inserted into a new thread in specific forum for discussion (wordpress comments plugin will be created to get thread posts as comment)
  • guest posting can be enabled/disabled

Please note:
This uses wordpress xml-rpc, usernames and passwords are transmitted unencrypted the cURL.

- cURL must be enabled on your server
- uses xmlrpc_encode_request and xmlrpc_decode. Which are marked as "experimental" under PHP.

Once complete I may look at non-curl and rpc methods and manually build the xml request to get around the two above notes.

Anyway. This is a while off completion yet but wanted to see if there was any external interest because if there is I will make it a bit more friendly than it is

For anyone interested in this.

I have 2 choices for the editor

- Use the mybb Editor for the content box
- Implement TinyMCE into the content pages

Either is fine and easy enough to add. Just wondering if there is a preference. I would need to add an additional code button for adding the <!--more-> tags however.

Surprised there is no interest in this. I really would have thought that with so many people looking for integration and bridges for wordpress and the forums this would have been popular.

I have this working 90% now, I just need to do the edit/publish post functionality for configured users and the integration is complete.

Allows for creating users, creating posts, publishing posts all from a mybb form and all in a completely non-hacky way. Just clean plugins using resources available in both apps.

The only caveat is that in 3.5.2 the wp.newUser was pulled, however matt cuttler released this as a plugin. Matt Cuttler is one of the core xml-rpc developers for wordpress, so you need to add the xmlrpc modernization plugin for wordpress, to allow that to work.

All users are created as contributors. I am not planning on making extra things available like user management as by and large these can be handled better in the default apps.
I use external authentication reloaded plugin with WP which means all users are actually managed inside mybb anyway.

Will release a beta for testers in the next few days if anyone could assist in testing, especially stress testing, performance testing and security

^ just to say that many are interested in the integration of MyBB and WordPress (based on earlier threads & replies)
I had thought of offering assistance but unfortunately unable to devote time Sad
All good. this is fairly straight forward. The XML-RPC is awesome for wordpress.

Just finishing off the post edit functionality now and will just add some spit and polish and ready for testing.

Last thing now is getting the categories from the post into the edit form
This is ready for beta testing now. Need to write the wordpress discuss/comment system but that isnt vital to functionality.

So any beta testers out there?

Came down with a cold so havent been near the pc will try to package it for beta over the weekend
well i don't use wordpress, but if you wish i help you to test your beta version, i need a beta testers too, but nobody want to help me, and i finish mi next plugin, but only have released on my site, because here im still waiting too much to validate my new plugin versions Sad.

anyway, i help you in your task if you want, told me how can i help by mp and in a fact i response to you xD.
i want to know more, you should post this on wordpress site too there IS interest lol... and sometimes on this site u have to post in the right section to get the right attention.

I am using mybb postalicious plugin which i modified.

I modified it how the widget displays latest threads/posts, i also modified the crossposting, to be formatted in the forum post, to include link, to include thumbnail from post... and i am planning to have an excerpt too but havent done that yet.

It works descently to link back to the site. You can check it out on http://muslimbodybuilding.com

The only problem im experiencing that i just noticed recently is as i started copying/moving threads.. the widget is NOT showing the latest posts which is upsetting and its showing double items... not sure why... I may explore other options as such. I was searching and it looks like there is a php solution and also using rss feeder plugin... im tired now but one of these days need to spend some time experimenting...

Anyways back on topic i totally want to see this in action Smile Sounds very cool!

Wordpress by far in my opinion is the best and most proven customizable CMS... with tons of plugins and abilities... and mybb is the best free forum software... its too bad there isnt as much development between the two...

Also one downside to mybb postalicious is that you can only post in one forum section... in my case 'news'.. and well.. thats one of the reasons i started copying/moving threads recently to make the sections filled with content to discuss as opposed to everything going to news section... likewise, i wanted to have copies linking in different sections to same thread.. but it seems this is making the mybb postalicious widget poop by not showing latests posts and showing double threads... sigh..
Hey mate. I am away for a week but will be happy to send you the beta. I havent sorted out the moving topics yet. But will be before 1.0 release.

I also have just built the module for comments in wordpress but not linking topics from wp yet.

All on the radar though. I want to focus on the mybb side and controlling things from the mybb side as the focus for me is making things forum centric as much as possible and then I can worry about the wordpress side of things. But my main concern is mybb
yeah im curious all that you've got in store here. But so you know my site is live so it has to be reversible so it doesnt break the site in some way hehe Smile

We can work together on this for sure and my goal is to try to make people go to the forum, and that's the whole idea to keep discussion there, so this would be a good help.

I have cackle for comments i hope it works with that.

I just realized the snap social network auto poster is not working quite right with comments. It picked up comments but is not pasting them onto the comments... there is a feature to link back from facebook and twitter and write them into wordpres comments... i got the notifications for the comments on the post being made on facebook.. BUT... although they show under 'comments' in wordpress not showing on blog post.. which is weird...cackle is the commenting system i use in order to allow more commenting (facebook, twitter, linkedin, etc...)

Hopefully there isnt an issue with this either.. paid money for cackle ol.. its fantastic.. opens up so many social networks to comment on blog post.. but yea..
Ok here is an update for this as I decided to rewrite some of the code.

- You can post a draft or published post from mybb to wordpress using xml-rpc

When a post is created in wordpress you can
- add an existing thread to pull comments
- Ask it to create a new thread
- Turn comments on/off

If you make the WP post inactive (back to draft)
- The mybb post is made inactive

When a post is moved back to publish the post is reactivated in mybb

If you move a post to trash
- you can choose to either delete the mybb post or make it inactive
- moving it out of trash will re-activate it but can't undelete and no new post is created (will maybe add something for this)

Wordpress does not need to know any of your mybb database details or user details. The way I have set this up is that wordpress uses file_get_contents to call a URL on mybb, it sends a secret key which can only be used once and must match the mybb secret key.

It then performs whatever action you want from mybb, create post, delete post etc

Comments are pulled into mybb by RSS. The plugin looks for a linked post in the post link table and if it exists with comments on then it will expose the RSS of that specific thread.

Wordpress then just reads the RSS and makes it look a little nicer and publishes it as comments

This means you can still, if you like have standard wordpress comments in conjunction with your mybb post comments.

The code is a bit of a mess at the moment as I was doing this by creating process files that a task was picking up, I decided to use the secret key method instead as its just a little cleaner.

The way the secret key works is that you can go and put in however many you want in a comma delimited list.

My test site has over 200 keys I created using a random hash and key generator. you paste that list into mybb and the wordpress settings and then once used it is deleted from the list and marked as used in mybb so it can never be re-used again.

It's not the worlds best security and there are other things that would prevent things being reposted but it at least offers a level of security from people trying to use the exposed plugin for creating spam threads.

I will try to get it cleaned up and released as a beta soon. Or if yo are brave and want to try this on a test site let me know and I will send you the files. (mybb and wordpress plugins)


NOTE: This has no visual integration of mybb into wordpress or visa versa beyond the comments. This is pure a data integration to make managing the two under one site easier.

Forum Jump:

Users browsing this thread: 1 Guest(s)