Windows Live Writer And Wordpress Mu (WPMU)

Date July 19, 2007

I finally was able to add my blog on WPMU to windows live writer.  I searched and searched and searched and finally found the answer.

Change these lines in xmlrpc.php:

    foreach ( $blogs as $blog ) {
        $blog_id = $blog->userblog_id; 
        switch_to_blog($blog_id); 
        $is_admin = current_user_can(’level_8′); 
        $struct[] = array(
            ‘isAdmin’  => $is_admin,
            ‘url’      => get_option(’home’) . ‘/’,
            ‘blogid’   => $blog_id,
            ‘blogName’ => get_option(’blogname’)
        );
    } 
  return array($struct);

To:

$req_url = ‘http://’ . $_SERVER[’HTTP_HOST’] . $_SERVER[’REQUEST_URI’]; foreach ( $blogs as $blog ) { $rpc_url = get_option(’home’) . ‘/xmlrpc.php’; if( $rpc_url == $req_url ){ $blog_id = $blog->userblog_id; switch_to_blog($blog_id); $is_admin = current_user_can(’level_8′); $struct = array( ‘isAdmin’ => $is_admin, ‘url’ => get_option(’home’) . ‘/’, ‘blogid’ => $blog_id, ‘blogName’ => get_option(’blogname’) ); break; } } if($struct){ return array($struct); }else{ return $this->error; }

kick it on DotNetKicks.com

3 Responses to “Windows Live Writer And Wordpress Mu (WPMU)”

  1. Jettero Heller said:

    Do you know if this is still the case? I.e. do you still have to hack WPMU in order to make it work with Windows LiveWriter? I’m standing up a new WPMU install right now, and am curious as WLW is the coolest workflow of any blog editor I’ve ever seen. And I am SO not a microsoft fan.

  2. Emad Ibrahim said:

    @Jettero: Actually, I am not sure if this is still the case. I have a feeling it has been fixed. I am using a standalone WP and it works great, so I am guessing the new version of WPMU and WLW should play well together. If you do find the answer, please come back and let me know.

    Thanks

  3. JetteroHeller said:

    Thanks — yes, it’s exactly the image workflow that I want to enable using LiveWriter. How one can literally just copy/paste photos and screenshots and images into the blog window and just have it magically show up for the user — that was what attracted me to it. I was getting pretty partial to Flock, but Flock still doesn’t do the automagic image upload thing — which I really dig.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Close
E-mail It