How to make ecto work with Ultimate Tag Warrior

I once wrote about “How to make ecto work with Jerome’s Keywords“. Unfortunately, Jerome’s Keywords does not work well with WordPress 2.0. With suggestion from Meng Yan, I switched to Ultimate Tag Warrior. Again, I met the problem of how to make ecto work with it. Here’s the solution.

  1. make sure Ecto is using Movable Type API to contact with your wordpress. You can check it out in the Account settings.
  2. set up the template of tags in Ecto. Set the “Tag separator” as “,” which is the default setting and “Put tags in” as “keywords” which is NOT the default setting.
  3. update the xmlrpc.php in the directory of your blog system. add the following line into the function mw_newPost and mw_editPost after where $content_struct is initialized:

$_POST[‘tagset’] = $content_struct[‘mt_keywords’];

Here’s the sample code to show where to make the modification (below the comments “ROBINLU HACK”):

/* metaweblog.newPost creates a post */
function mw_newPost($args) {
global $wpdb, $post_default_category;
... ...
$post_excerpt = $content_struct['mt_excerpt'];
$post_more = $content_struct['mt_text_more'];
// ROBIN LU HACK
$_POST['tagset'] = $content_struct['mt_keywords'];
$comment_status = (empty($content_struct['mt_allow_comments'])) ?
... ...
}
... ...
/* metaweblog.editPost ...edits a post */
function mw_editPost($args) {
global $wpdb, $post_default_category;
$this->escape($args);
$post_ID     = $args[0];
... ...
$post_title = $content_struct['title'];
$post_content = apply_filters( 'content_save_pre', $content_struct['description'] );
$catnames = $content_struct['categories'];
// ROBINLU HACK
$_POST['tagset'] = $content_struct['mt_keywords'];
$post_category = array();
... ...
}

Update: See Part II to get ecto fully functional with UTW.

42 thoughts on “How to make ecto work with Ultimate Tag Warrior

Comments are closed.