Post to Vanilla from Wordpress

edited April 2007 in Vanilla 1.0 Help
Has anyone come up with a way to create a new Vanilla thread when a post is created in Wordpress?
At the minute my users can post to the Wordpress blog or the Vanilla forum, and we are getting a lot of duplication between the two.

Comments

  • circuit, I would like this as well. It would be cool to basically be able to replace Wordpress comments with a Vanilla discussion, all neatly bundled under a "Wordpress Blog" category which has them listed in post order (WallPhone created an extension for this I think, but it currently won't work just on one category IIRC).
  • yeah, that is exactly what i'm after. would it really be that hard to modify the extension to post in one category?
  • Hard for me :D
  • 'fraid I know nothing of wordpress.

    As far as the extension, it sorts discussions based on the creation date rather than the last active date. The way it works is kind of a cheap hack now.

    It isn't easy to mix both sort modes on the discussions page, but it could be made to sort differently if you were to view a category page directly. I'm going to re-write it so will keep this mixed sort in mind to see if it can be done.
  • TVM WallPhone ;)
  • I've been double posting all my blogs to vanilla too, trying to use it for all discussion. It's a lot of extra work, I would love if it were automated more.
  • I'd be great wouldn't it?
  • Which extention did WallPhone create already?
  • If you click on a user's name in any comment, you get taken to their profile page. On that page all the extensions that user has created are listed and on WallPhone's, you'll see Chronological :)
  • I'm looking for this same thing. Since it doesn't seem to exist, I'll try my hand at coding it. I think the answer is in the XML-RPC ping that WordPress will send whenever you post. I imagine a PHP script that does the following: 1. Drop the XML on the floor (the actual contents are useless). 2. Query the wp_posts table for the most recently updated post. 3. Query the wp_postmeta field to see if that post has a custom field called 'vanilla_discussion', or some such. 4. If there is no 'vanilla_discussion' for that post, generate a new Vanilla discussion with the same user ID (if you have WP and Vanilla sharing a users table) or some other pre-selected user ID. 5. Add a custom field 'vanilla_discusison' to the WP post with the permalink to your new discussion. Then you just tell WP to ping your auto-discussion script whenever there's an update, and tweak your WP theme to properly consume the 'vanilla_discussion' field. No need to touch any WP code. Actually this technique could work equally well with any other non-WP blog that can be made to send XML-RPC pings.
  • So would there be anything that would work with Textpattern as well?
  • @ [-Stash-] I've used that add-on from WallPhone, but does that add a Vanilla discussion when a Wordpress article is posted? That is what i'm trying to do. I guess when I read this the first time I thought the extention being refered to was something other than Chronological. Thanks though.
  • Oh no, the complete extension that you want has not been created yet, although I was merely referring to a piece of the puzzle that would be useful in creating it ;)
  • Okay, I'm almost finished. Is anyone interested in helping me test for, say, a week before I release it into the wild?

    I wrote it for WordPress 2.1 but it should work for 2.0.X also.
  • I'm game.
  • creede, it's finished now and it's called janine... you can find it by searching the forum
  • thanks, I'll put it on my to do list.
This discussion has been closed.