Professional Drupal web development, site management, and web applications.
» Free Tagging from Windows Live Writer to Drupal

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]

Jump to the Source Code

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.

Post new comment

  • No HTML tags allowed
  • Lines and paragraphs break automatically.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.