blog
How to Post to Drupal using Windows Live Writer
I wrote this series on how to post to Drupal using Windows Live Writer because I saw a lot of questions and issues about this on the Drupal forums. I had previously gone through the trial and error process to set this up for a number of people who work for me. We now use Live Writer for initial posts and quick updates to a large site we manage.
I'd like other developers and Drupal service providers to see they can provide this option for clients and that Drupal communicates and does well with modern and useful web technologies such as blogging APIs.
Modules and Tips Useful for Posting to Your Drupal Site with a Blogging Application
Proper Configuration Checks for External Applications to Use Taxonomy Terms
If you want your users to be able to assign terms to their content when they are using an external blogging application, like Windows Live Writer, make sure you have the Taxonomy module enabled, and that you have selected the appropriate content types, those available to the Blog API. I have forgotten to do this a few times when adding a new content type to use with the Blogging API. Each time a new content type is created, taxonomy requires you to go back and specify whether your new content type can use a vocabulary.
Content types section: admin/content/taxonomy/edit/vocabulary/<vocab id>
Getting Good URL Names by Using Pathauto
If you have Drupal’s Path Module enabled to allow users to rename URLs (custom URLs), I recommend using the “Pathauto” module in combination with your external blogging client. You can set it to give the content a URL based on the post title.
Configuring Drupal for Posting from External Blogging Applications
An external blogging application like Windows Live Writer will allow you to create and publish posts from your desktop to your Drupal site. But, before you can post via one of these applications you’ll need to enable and configure your Blog API module and a few additional settings.
Step 1: Enable the Modules
Enable your Blog and Blog API modules here: admin/build/modules
Step 2: Make Content Types Available to External Clients
Select the content types you’d like to make available to external blogging clients: admin/settings/blogapi
Inline Tags Sample Module Code
/**
* Module implementing Drupal's hook_nodeapi
* @see http://api.drupal.org/api/function/hook_nodeapi/6
* Important Note: This is sample code.
Free Tagging from Windows Live Writer to Drupal
Allowing Tags to be Added in the Post Body Text
Free Tagging when the Blog API Does Not Support It
The following is a quick code sample showing the start of a Drupal module which lets a user add new tags to a post by placing the tags in the body of the post in a format like so:
[tags]blog, blog api, blogging, Drupal 6, weblog, windows live writer, wlw[/tags]
Use Case
I’m only using code like this for one use case. It’s for clients who do a lot of editing and posting of their Drupal content through Windows Live Writer.
With Windows Live Writer and Drupal, my clients use the “Movable Type API”. Without extending the API, it does not yet support adding new vocabulary terms. Thus, from Windows Live Writer to Drupal sites, one can only tag content with existing terms. This code allows new tags to be added.
The terms are added to a specified vocabulary id and associated with the new or updated content node.
The inline tags are removed from the body of the text before insert or update.
Posting to Drupal 6 with Windows Live Writer
Demonstrates using Windows Live Writer to post to a Drupal 6 powered blog. Includes adding a photo, and adding terms to a post.
Configuring Windows Live Writer to Post to Drupal, Blogs and Custom Content Type
Shows how to add weblog accounts to post to Drupal with the blog content type and a custom content type.
Posting to Drupal 6 with Windows Live Writer
Demonstrates using Windows Live Writer to post to a Drupal 6 powered blog. Includes adding a photo, and adding terms to a post.
Configuring Windows Live Writer to Post to Drupal, Blogs and Custom Content Type
Shows how to add weblog accounts to post to Drupal with the blog content type and a custom content type.