How to make ecto work with Ultimate Tag Warrior - Part II

[update: I have updated downloadable xmlrpc.php example for wordpress 2.1. It also fixes the wordpress 2.1 bug when getting category via xmlrpc. Check the end of the post. 2007-02-20]

I once wrote about “How to make ecto work with Ultimate Tag Warrior”. In that article, I discussed how to make the wordpress with UTW plugin recognize tag information sent by ecto. It works well except that some friends reported after the post is published, the tag information can not be stored in ecto. It means you lose track of all the tag information in ecto. When you edit a post, you have to set the tags again, which is very inconvenient.

From a post in the ecto forum, I knew that ecto recognizes mt_keywords. After some more hacking of xmlrpc.php, I fixed the problem. Now, you can not only use ecto to publish your post with tag information but also get tag information from your post. Here’s how (UPDATE: be sure to follow the steps in Part I before applying following steps. Thank Bruce for your reminding and all the helps):

First, you need to add one function in xmlrpc.php before the class wp_xmlrpc_server is defined:

/* ROBIN LU HACK get keywords */
function ecto_get_keywords($postid) {
$utw = new UltimateTagWarriorCore();
$tags = $utw->GetTagsForPost($postid);
$postkeywords = '';
if (is_array($tags)) {
foreach($tags as $data) {
if(!empty($data) &&
!empty($postkeywords))
$postkeywords .= ", ";
$postkeywords .= $data->tag;
}
}
return ($postkeywords);
}

Then, add this line

'mt_keywords' => ecto_get_keywords($postdata['ID']),

in function mw_getPost at where $resp is set:

$resp = array(
'dateCreated' => new IXR_Date($post_date),
'userid' => $postdata['post_author'],
'postid' => $postdata['ID'],
'description' => $post['main'],
'title' => $postdata['post_title'],
'link' => $link,
'permaLink' => $link,
// commented out because no other tool seems to use this
//	      'content' => $entry['post_content'],
'categories' => $categories,
'mt_excerpt' => $postdata['post_excerpt'],
'mt_text_more' => $post['extended'],
'mt_allow_comments' => $allow_comments,
//ROBIN LU HACK
'mt_keywords' => ecto_get_keywords($postdata['ID']),
'mt_allow_pings' => $allow_pings
);

Then add this line:

'mt_keywords' => ecto_get_keywords($entry['ID']),

in function mw_getRecentPosts() at where $struct[] is assigned like this:

$struct[] = array(
'dateCreated' => new IXR_Date($post_date),
'userid' => $entry['post_author'],
'postid' => $entry['ID'],
'description' => $post['main'],
'title' => $entry['post_title'],
'link' => $link,
'permaLink' => $link,
// commented out because no other tool seems to use this
//	      'content' => $entry['post_content'],
'categories' => $categories,
'mt_excerpt' => $entry['post_excerpt'],
'mt_text_more' => $post['extended'],
'mt_allow_comments' => $allow_comments,
//ROBIN LU HACK
'mt_keywords' => ecto_get_keywords($entry['ID']),
'mt_allow_pings' => $allow_pings
);

Save your xmlrpc.php and refresh in ecto. You will get all the tag information back to you.
There are xmlrpc.php files for different wordpress version:

有53 条关于 “How to make ecto work with Ultimate Tag Warrior - Part II”的留言

  • Bruce March 19th, 2006 15:47

    Thanks Robin; it works sweet :-)

    Just to clarify for visitors who land on this page: you need to read and follow Part 1 first.

    Also, I can verify the (5 in total) edits work with the xmlrpc.php file from WordPress 2.0.2.

    Cheers, Bruce

  • Jeremy March 24th, 2006 05:37

    Wow, I’m impressed. I like Ecto, but once I started using UTW I thought there was no way I could use it. You’ve solved that problem. Great work, and thanks.

  • Beautifully Letdown » Blog Archive » Test post April 2nd, 2006 09:58

    [...] I’m testing a couple of modifications I made. UPDATE: I’m stoked! I got both this hack and this hack to work in ecto. Absolutely fabulous brilliant. [...]

  • Adam Rice April 5th, 2006 10:26

    Hmm, I’ve installed your hacked xmlrpc on a vanilla WP 2.01 install, and I can use the keywords field to create tags, but the tags do not come back into Ecto when I edit an entry in it. Any ideas?

  • Robin Lu April 5th, 2006 12:57

    which version of ecto are you using? You may want to use the ecto console to see what happens

  • Adam Rice April 5th, 2006 20:50

    I’m using Mac Ecto 2.4.1 (current). I’m pretty sure I’ve got everything set up according to your instructions. It doesn’t look like there’s any transaction requesting the keywords–I’d be happy to e-mail you a copy of the console transcript, if you’re interested.

  • Adam Rice April 5th, 2006 23:17

    You know what? I’m an idiot. Ecto *is* retrieving the tags. I was looking for them in the “keywords” field, not the “tags” pane.

    That said…I’m guessing there would be a way to hack the xmlrpc file to return those tags to the keywords field.

  • pollas.dk » Blog Archive » UltimateTagWarrior and ecto April 11th, 2006 03:21

    [...] Robin Lu made it work by providing some xmlrpc.php hacks: Part 1 - part 2. [...]

  • Kelly’s World- A View into the mind of Uber Geek, Kelly Adams » Blog Archive » Ultimate Tag Warrior, Ecto, and other fun things May 7th, 2006 05:16

    [...] Another hack, this one from Robin Lu, to get UTW, Wordpress, and Ecto (my blog editor) working together happily. [...]

  • David Evans June 22nd, 2006 22:15

    I made the changes and Ecto is displaying the tags. Now, the notification options of ping or email are greyed out. Any ideas what is causing this?

  • Robin Lu June 23rd, 2006 09:06

    David, it could be an ecto issue. You can go to ecto support forum to have a try.

  • Robin Lu June 23rd, 2006 21:47

    David, I found the notification options are only greyed out when I edit the blog after it has already been posted. I think it is reasonable feature of ecto. what do you think?

  • Ralph August 18th, 2006 01:28

    Robin, before i start messing around with the xmlrpc file and wonder why something is broken, is the hack also supposed to work with WordPress 2.0.4?

  • Robin Lu August 18th, 2006 10:21

    I didn’t test it on WordPress 2.0.4. Use this hack on your own risk.

  • daniel roehe» » ecto reloaded August 28th, 2006 01:25

    [...] Vor eineinhalb Jahren habe ich schon mal mit Ecto meine Blog-Beiträge geschrieben. Das hatte leider ein Ende, als ich anfing, mit UTW meine Tags zu verwalten. Dank dieses schönen Tutorials Tutorials arbeitet Ecto nun auch mit dem unverzichtbaren Wordpress-Plugin zusammen. tags:digital, ecto, plugins, utw, wordpress [...]

  • Nontrivial Exercises » Blog Archive » Ultimate Tag Warrior WordPress Plugin and Ecto September 16th, 2006 12:07

    [...] But the great thing about using an opensource, highly extensible blogging platform is that the community can figure out how to make things work the way we want them to. Robin Lu from China has experimented with WordPress’s xmlrpc file and has identified a few small modifications that will enable ecto tag integration with UTW. Be sure to see both part 1 and part 2 of Robin’s hack. [...]

  • Wordpress, Tagging and TextMate at remy sharp’s b:log October 1st, 2006 07:26

    [...] Step 1: How to make ecto work with Ultimate Tag Warrior. Step 2: How to make ecto work with Ultimate Tag Warrior - Part II [...]

  • Dan Bruno October 7th, 2006 09:28

    I just tested this hack on WordPress 2.0.4, and it worked fine.

  • mois October 23rd, 2006 23:08

    similar problem: i would like to do have tagging with SharpMT PocketPC, too. this blogging software uses movable type as i know and offers a keywords field as well. it nicely works with the wordpress standard xmlrpc.php which writes the movable type posting into the worpress database. but xmlrpc.php seems to dump the keywords data. i installed Robin Lus xmlrpc and played around with it but couldn’t get tags out of it…
    any ideas?

  • Getting Ecto to work with Ultimate Tag Warrior at My Continuing Adventures in Technology… November 2nd, 2006 00:47

    [...] However, after pointing ecto at my Wordpress blog, a couple of hiccups became apparent, most noticeably that ecto’s support for tagging posts involves placing the tags in the body text of the post, rather than using them as metadata. I use the Ultimate Tag Warrior plugin for tagging in Wordpress, and guessed that I can’t have been the first person to try and make ecto and UTW work in harmony. A quick google search confirmed my suspicions; Robin Lu has written a fantastic tutorial (part two here) that explains very clearly how to set up ecto and hack Wordpress’s xmlrpc.php file to get the two to talk to each other. [...]

  • David Evans November 10th, 2006 07:56

    Any word on whether or not this works with Wordpress version 2.0.5? I just reinstalled Ecto and now tags aren’t being retrieved, even though I changed the tags template setting to use the keywords field.

  • Testing Ecto Blog Client at The Q November 18th, 2006 13:06

    [...] Update: Thanks to Robin Lu’s hack, I managed to get Ecto to post tags using UTW. I am definitely using ecto to blog from now on. It really is a great piece of software. It eliminates my need to log into Wordpress which I hate doing. [...]

  • Rob Hyndman November 20th, 2006 02:08

    Ditto with 2.05.

  • Tagging mit Ecto oder MarsEdit? - surfgarden December 5th, 2006 18:23

    [...] Gerade bin ich auf das hervorragende Tutorial How to make ecto work with Ultimate Tag Warrior von Robin Lu gestossen, mit dem sich Wordpress-Blogs mit installiertem Ultimate Tag Warrior Plugin bequem mit Tags über Ecto versorgen lassen. Da ich auch eine Möglichkeit gefunden habe, Movable Type über das Keywords-Feld mit Tags zu versorgen, bietet sich nun Ecto als Blogging-Software Nummer 1 an. Allerdings habe ich mich extrem auf MarsEdit eingeschossen. Nun meine Frage: Kennt jemand eine Möglichkeit, UTW auch mit MarsEdit zum Laufen zu bringen? [...]

  • Suave’s Blog » » blog with ecto January 26th, 2007 11:50

    [...] How to make ecto work with Ultimate Tag Warrior How to make ecto work with Ultimate Tag Warrior - Part II [...]

  • joonhwan January 30th, 2007 03:45

    Does it work with WP 2.1? I tried the modification, and now I can post tags with ecto, but cannot retrieve tag list from the server.

  • Paul February 1st, 2007 10:08

    Same problem here with WP 2.1. The MOD works, however two things happen:

    • the tags that I assocciated with specific posts using Ecto come back unchecked in Ecto after posting

    • Ecto does not pick up the tags that I incorporated in the WP admin panel before the MOD

    As noted, the tags show up in the blog posts correctly.

    Any news on this?

    thanks for the MOD …

    -ptfigg.

  • Robin Lu February 1st, 2007 10:14

    Thanks for reporting the problem. I will check it soon.

  • aas February 3rd, 2007 03:50

    enioomassa

  • Ulrich February 10th, 2007 20:22

    Hi.. Brilliant Hack… I really need this and I’m trying to make your guide available in Danish.. Unfortunatly I allso have troubble making it work in WP 2.1

  • vbali blogja »  WLW, UTW és WP xmlrpc hack February 14th, 2007 06:04

    [...] További információk:Windows Live Writer and Ultimate Tag WarriorHow to make ecto work with Ultimate Tag WarriorHow to make ecto work with Ultimate Tag Warrior Part II Kategóriák: Code, Blog, Tool Kulcsszavak: Ecto, Fiddler, Ultimate Tag Warrior, Windows Live Writer, Wordpress, xmlrpc [...]

  • Dave Evans February 17th, 2007 03:58

    I’m having same issue. It would be great to have a link to an edited xmlrpc file for the various versions of WP, saves many people lots of time, just download and drop in folder.

  • Vincent February 19th, 2007 23:32

    Any update on this Mr. Lu? Ecto-Tags effectively broken with WP 2.1 :(

  • Dave Evans February 22nd, 2007 02:44

    1) The xmlrpc file you provided needs to be updated for WP 2.1.1.

    2)Why in the world did you change the code in the Main WP trunk to fix the categoryId string problem from string to strval? Is this why it’s broken again? Man I am tired of chasing these UTW issues down, spending hours a day, ugh. I’m ready to go back to Movable Type. /end rant.

  • Robin Lu February 22nd, 2007 17:33

    Dave:
    That’s why your suggestion doesn’t work. I don’t provide xmlrpc file for each version of WP. I’ve already provided how. I don’t owe you the fix and don’t care which blog system you are using.

  • Dave Evans February 23rd, 2007 22:25

    You don’t care which system your users are using? That’s not the the most appropriate comment to make judging by all the problems we are encountering. You’re right, you don’t owe us anything, a telling statement about your ongoing maintenance of UTW. You still didn’t answer my question about rewriting the code.

  • Robin Lu February 24th, 2007 21:52

    Dave:
    You are not my user. I am a user of wordpress, ecto and UTW myselft just as you. I just happened to scratch my own itch and shared how I scratched. If you choose to use my fix, you are on your own risk.
    When I was fixing the categoryId bug, wordpress 2.1.1 is not releasing and I didn’t check how they fixed it. I used strval and it works for me. That’s it.

  • How to make ecto work with Ultimate Tag Warrior » 石锅拌饭 | 互联网 Mac & 软件开发 February 24th, 2007 22:12

    [...] How to make ecto work with Ultimate Tag Warrior - Part IIHow to make ecto work with Jerome’s KeywordsMadfox 0.3发布Madfox 0.3.1发布madfox [...]

  • Dave Evans February 25th, 2007 05:38

    I confused you with the UTW creator, my bad. Your page is a great resource. I wish we could delete the 100 blog posts that address stale UTW/WP/Ecto issues which is what is confusing everyone. One page, one description, one solution, for various configurations and setups. Would save hundreds of lost hours.

  • Vincent February 26th, 2007 07:43

    So has anyone managed to get this working with WP 2.1.1? I upgraded just before I saw this fix, and I think the WP-people changed/broke something again.

  • David Evans March 7th, 2007 06:34

    I can’t get tags to be set with with 2.1.2. Older posts’ tags are downloading into Ecto just fine, but new posts don’t get tags set.

  • miklb March 15th, 2007 19:58

    Just a FYI for UTW/ecto users, you can use the built in feature of UTW to add tags to your posts by using [tags]foo, bar[/tags]. The only issue I’ve seen so far is that though that won’t show in the post, it will show in your RSS feed.

  • Adam Rice March 21st, 2007 02:16

    I’m having the same experience that David Evans reports.

    I’ve tried using both the hacked xmlrpc file you provide here, and manually adding your code into the standard xmlrpc file.

  • WLW、WP與UTW的相容大法 | 兔眼看天下 March 31st, 2007 17:34

    [...] 甚麼?不會?就知道你想撿現成便宜,跟我~~一樣,Robin Lu也很大方,將適用於WP各個經典版本的xmlrpc.php一併釋出,跟我一樣懶的人可以直接下載。 [...]

  • Blogging From Ecto at David Brunelle: Geek for Life May 13th, 2007 08:27

    [...] Robin Lu [...]

  • Kay June 1st, 2007 05:37

    I tried the hack and the tags from my posts show up in ecto, but it doesn’t work with posting with tags :-(

    Using 2.2 with the latest UTW.

    Any help?

  • Circle Six Blog » Blog Archive » UTW-RPC Beta Testers Wanted June 12th, 2007 10:37

    [...] 2.2, or maybe both? Want to help beta-test the new UTW-RPC plugin (the one that incorporates the Robin-Lu Hack to allow tagging to work in TextMate, ecto, et al)? It handles both Ultimate Tag Warrior and Simple [...]

  • Panorama des solutions pour bloguer non connecté avec WordPress June 21st, 2007 06:02

    [...] pour mac et windows. Tous les utilisateurs de mac en disent du bien (…). Il existe même une combine pour que ça fonctionne avec [...]

  • AltaGid August 21st, 2007 06:09

    Hello! Help solve the problem.
    Very often try to enter the site, but says that the password is not correct.
    Regrettably use of remembering. Give like to be?
    Thank you!

  • mark paulsen October 3rd, 2007 03:00

    what is the coding for the posting tag like this???

  • » Ecto Plays Nice With Wordpress and Tags » The Progress Bar November 16th, 2007 04:32

    [...] I stopped using Ecto, my favorite offline blog editor, a while back because it ate a number of draft messages and tag support with Ultimate Tag Warrior was always broken. [...]

  • TextMate tagging with WordPress 2.2 December 19th, 2007 08:16

    [...] Step 2: How to make ecto work with Ultimate Tag Warrior - Part II [...]

  • Mike May 30th, 2008 21:18

    a screw loose,

发表你的看法

Tags:

Bookmarks:

My music: