相关主题
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:
- xmlrpc.php for wordpress 2.0.1
- xmlrpc.php for wordpress 2.0.3
- xmlrpc.php for wordpress 2.1







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
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.
[...] 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. [...]
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?
which version of ecto are you using? You may want to use the ecto console to see what happens
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.
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.
[...] Robin Lu made it work by providing some xmlrpc.php hacks: Part 1 - part 2. [...]
[...] Another hack, this one from Robin Lu, to get UTW, Wordpress, and Ecto (my blog editor) working together happily. [...]
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?
David, it could be an ecto issue. You can go to ecto support forum to have a try.
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?
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?
I didn’t test it on WordPress 2.0.4. Use this hack on your own risk.
[...] 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 [...]
[...] 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. [...]
[...] Step 1: How to make ecto work with Ultimate Tag Warrior. Step 2: How to make ecto work with Ultimate Tag Warrior - Part II [...]
I just tested this hack on WordPress 2.0.4, and it worked fine.
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?
[...] 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. [...]
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.
[...] 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. [...]
Ditto with 2.05.
[...] 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? [...]
[...] How to make ecto work with Ultimate Tag Warrior How to make ecto work with Ultimate Tag Warrior - Part II [...]
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.
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.
Thanks for reporting the problem. I will check it soon.
enioomassa
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
[...] 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 [...]
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.
Any update on this Mr. Lu? Ecto-Tags effectively broken with WP 2.1
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.
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.
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.
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 - Part IIHow to make ecto work with Jerome’s KeywordsMadfox 0.3发布Madfox 0.3.1发布madfox [...]
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.
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.
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.
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.
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.
[...] 甚麼?不會?就知道你想撿現成便宜,跟我~~一樣,Robin Lu也很大方,將適用於WP各個經典版本的xmlrpc.php一併釋出,跟我一樣懶的人可以直接下載。 [...]
[...] Robin Lu [...]
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?
[...] 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 [...]
[...] pour mac et windows. Tous les utilisateurs de mac en disent du bien (…). Il existe même une combine pour que ça fonctionne avec [...]
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!
what is the coding for the posting tag like this???
[...] 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. [...]
[...] Step 2: How to make ecto work with Ultimate Tag Warrior - Part II [...]
a screw loose,