How to make ecto work with Ultimate Tag Warrior - Part II
by Robin Lu on Mar.19, 2006, about ecto, hack, keyword, tag, UTW, wordpress, xmlrpc
[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
35 Comments for this entry
18 Trackbacks / Pingbacks for this entry
-
Beautifully Letdown » Blog Archive » Test post
April 2nd, 2006 on 9:58 am[...] 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. [...]
-
pollas.dk » Blog Archive » UltimateTagWarrior and ecto
April 11th, 2006 on 3:21 am[...] 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 on 5:16 am[...] Another hack, this one from Robin Lu, to get UTW, Wordpress, and Ecto (my blog editor) working together happily. [...]
-
daniel roehe» » ecto reloaded
August 28th, 2006 on 1:25 am[...] 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 on 12:07 pm[...] 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 on 7:26 am[...] Step 1: How to make ecto work with Ultimate Tag Warrior. Step 2: How to make ecto work with Ultimate Tag Warrior - Part II [...]
-
Getting Ecto to work with Ultimate Tag Warrior at My Continuing Adventures in Technology…
November 2nd, 2006 on 12:47 am[...] 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. [...]
-
Testing Ecto Blog Client at The Q
November 18th, 2006 on 1:06 pm[...] 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. [...]
-
Tagging mit Ecto oder MarsEdit? - surfgarden
December 5th, 2006 on 6:23 pm[...] 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 on 11:50 am[...] How to make ecto work with Ultimate Tag Warrior How to make ecto work with Ultimate Tag Warrior - Part II [...]
-
vbali blogja » WLW, UTW és WP xmlrpc hack
February 14th, 2007 on 6:04 am[...] 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 [...]
-
How to make ecto work with Ultimate Tag Warrior » 石锅拌饭 | 互联网 Mac & 软件开发
February 24th, 2007 on 10:12 pm[...] 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 [...]
-
WLW、WP與UTW的相容大法 | 兔眼看天下
March 31st, 2007 on 5:34 pm[...] 甚麼?不會?就知道你想撿現成便宜,跟我~~一樣,Robin Lu也很大方,將適用於WP各個經典版本的xmlrpc.php一併釋出,跟我一樣懶的人可以直接下載。 [...]
-
-
Circle Six Blog » Blog Archive » UTW-RPC Beta Testers Wanted
June 12th, 2007 on 10:37 am[...] 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 on 6:02 am[...] pour mac et windows. Tous les utilisateurs de mac en disent du bien (…). Il existe même une combine pour que ça fonctionne avec [...]
-
» Ecto Plays Nice With Wordpress and Tags » The Progress Bar
November 16th, 2007 on 4:32 am[...] 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 on 8:16 am[...] Step 2: How to make ecto work with Ultimate Tag Warrior - Part II [...]
March 19th, 2006 on 3:47 pm
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
March 24th, 2006 on 5:37 am
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.
April 5th, 2006 on 10:26 am
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?
April 5th, 2006 on 12:57 pm
which version of ecto are you using? You may want to use the ecto console to see what happens
April 5th, 2006 on 8:50 pm
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.
April 5th, 2006 on 11:17 pm
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.
June 22nd, 2006 on 10:15 pm
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?
June 23rd, 2006 on 9:06 am
David, it could be an ecto issue. You can go to ecto support forum to have a try.
June 23rd, 2006 on 9:47 pm
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?
August 18th, 2006 on 1:28 am
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?
August 18th, 2006 on 10:21 am
I didn’t test it on WordPress 2.0.4. Use this hack on your own risk.
October 7th, 2006 on 9:28 am
I just tested this hack on WordPress 2.0.4, and it worked fine.
October 23rd, 2006 on 11:08 pm
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?
November 10th, 2006 on 7:56 am
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.
November 20th, 2006 on 2:08 am
Ditto with 2.05.
January 30th, 2007 on 3:45 am
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.
February 1st, 2007 on 10:08 am
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.
February 1st, 2007 on 10:14 am
Thanks for reporting the problem. I will check it soon.
February 3rd, 2007 on 3:50 am
enioomassa
February 10th, 2007 on 8:22 pm
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
February 17th, 2007 on 3:58 am
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.
February 19th, 2007 on 11:32 pm
Any update on this Mr. Lu? Ecto-Tags effectively broken with WP 2.1
February 22nd, 2007 on 2:44 am
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.
February 22nd, 2007 on 5:33 pm
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.
February 23rd, 2007 on 10:25 pm
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.
February 24th, 2007 on 9:52 pm
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.
February 25th, 2007 on 5:38 am
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.
February 26th, 2007 on 7:43 am
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.
March 7th, 2007 on 6:34 am
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.
March 15th, 2007 on 7:58 pm
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.
March 21st, 2007 on 2:16 am
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.
June 1st, 2007 on 5:37 am
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?
August 21st, 2007 on 6:09 am
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!
October 3rd, 2007 on 3:00 am
what is the coding for the posting tag like this???
May 30th, 2008 on 9:18 pm
a screw loose,