- Choose "Another weblog service"
- In the "Weblog Homepage URL" field, enter your blog's URL followed by "/node/add/blog". Example: "http://mysite/node/add/blog". Replace "blog" with "story", "page" or whatever content type you will be posting from WLW.
- Enter your credentials in the username/password fields
- In the "Type of weblog that you are using" dropdown, select "Movable Type API"
- In the "Remote posting URL" field, enter your website's URL followed by "/xmlrpc.php". Example: "http://mysite/xmlrpc.php"
- Now select the same content type you chose above in step 2 (e.g. blog, story, page) from the list
- WLW will detect some settings and download some content from your site
- You might want to change the name in the "Weblog Name" field - this is just the name that will be listed in WLW
- Click Finish
2008-08-27
使用windows live writer 更新drupal的完全解决方案
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://pcsky.blogbus.com/logs/28215514.html
Finally - a completely functional Windows Live Writer solution
keathmilligan http://drupal.org/node/287615
I've been struggling with various posting methods with Drupal for a while - editing raw HTML, manually uploading images and cutting and pasting embed links for videos has been a real pain. I've tried the various wysiwyg editors, they all end up lacking in some way or another - buggy, poor image/media support, bad spell-check implementations, etc.
Windows Live Writer has been a popular choice for other platforms for a while. It is rock solid, offers an MS Word-like editing environment and supports images, video and tons of other content types through plugins. Unfortunately getting it to work with Drupal (without giving up features) is tricky.
Many of the solutions out there work partially (i.e. no image, no category download support, etc.). Really getting it to work requires a couple of minor modifications to the Drupal code and the addition of a simple module.
Here is how to get WLW fully functional with Drupal 6 (I'm on 6.3 currently):
Step 1: Patch Drupal's blogapi Module
There is a bug in Drupal's blogapi module that will prevent WLW from downloading your categories. To fix it, you can download and apply this patch or you can simply edit modules/blogapi/blogapi.module and add the following code to the top of the of the blogapi_metaweblog_get_category_list function.
$user = blogapi_validate_user($username, $password);
if (!$user->uid) {
return blogapi_error($user);
}
For more discussion of this issue, see: http://drupal.org/node/221677#comment-755721
Step 2: Setup a Sane Default Filter
Drupal's default behavior is to apply the system default filter to all new content that is added through the blogapi module. This is filtered HTML by default which won't allow images, video or other media unless you either change the filter or the default filter type (and thus allow everyone to post such content). To get around this problem, I use the simple Filter Default module which selects a default filter based on the role of the user.
Filter Default hasn't yet been officially updated for Drupal 6, but there is an unofficial version here that has. Download and install this version.
Now open modules/filter_default/filter_default.module and add the following function:
/**
* Implements hook_nodeapi()
*/
function filter_default_nodeapi($node, $op) {
if ($op == "blogapi new" || $op == "blogapi edit") {
global $user;
$roles = user_roles();
for ($i = 1; $i < count($roles)+1; ++$i) {
list($role, $format) = variable_get('filter_default_'. $i, array());
if (array_key_exists($role, $user->roles)) {
$node->format = $format;
break;
}
}
}
}
Now go to the Input Formats admin page and set up the desired default filters for each role. For the role that will be posting via WLW, you will likely want to enable Full HTML to be able to post images, etc.
Step 3: Install and Configure Windows Live Writer
After installing WLW, launch it and the Add Account wizard should appear. If not, or if you already had it installed, select Weblog | Add Weblog Account... from the menu.
Credit where credit is due: These instructions are based on this how-to guide with some suggested updates from forum posts here on drupal.org.
Enjoy!
That's it. It sounds harder than it is :). Once you're finished, you'll have a deluxe wysiwyg editor, automatic image upload capability, video embedding and more. You'll never want to go back. Trust me.
A couple of notes:
WLW's notion of Tags is different than Drupal's taxonomy. The WLW "Insert Tags" function will insert links to an external tag provider like Technorati. For setting Drupal taxonomy, use the "Categories" dropdown at the bottom of the window and check the categories you want.
There are many WLW plugins. Check them out at http://gallery.live.com/results.aspx?c=0&bt=9&pl=8&st=5.
随机文章:
收藏到:Del.icio.us







