石锅拌饭

How to make ecto work with Ultimate Tag Warrior

by Robin Lu on Dec.29, 2005, about , , , , , ,

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.

:, , , , , ,

7 Comments for this entry

  • Christopher Black

    Thanks so much for publishing this hack!

  • Michael B

    Jerome’s Keywords has been updated to work with 2.0.

    Though it may not be as robust as UTW.

  • Tom

    Hello Robin,
    thank you so much for this wonderfull hack. I was nearly getting confused about no tagging with ecto. But I like this Editor so much. Then I found your Site and your hack and all my problems went away.
    Thx and have fun.

  • Joost

    Dear Robin,
    I’m trying to add tags with ecco but it doesn’t work. I did complete step 1 and step 2. When I add tags through the wp-admin I get the right tags for each post into ecco, but when I try to make a new post and add tags with ecco they won’t appear on my website. Using WP 2.2.. Any thoughts?

  • Idetrorce

    very interesting, but I don’t agree with you
    Idetrorce

  • Maximus

    I would like to see a continuation of the topic

  • elusercelib

    Не подскажете, как ссылки в футере убрать, если он закодирован. С интересом читал ваш блог и тоже решил завести себе на подобную тему. Заранее спасибо.

36 Trackbacks / Pingbacks for this entry

Archives

Browse by tags