How to make ecto work with Jerome’s Keywords
by Robin Lu on Sep.15, 2005, about ecto, hack, keyword, wordpress, xmlrpc
The support for tags in Wordpress 1.5.2 still depends on plugins. I use Jerome’s Keywords for this purpose. However, it does not work well with Ecto. I digged into the source code of the plugin and wordpress implementation of xml-rpc a bit. Although I am not familiar with php, I managed to make Ecto work with Jerome’s Keywords plugin. Here’s how to do it:
- make sure Ecto is using Movable Type API to contact with your wordpress. You can check it out in the Account settings.
- 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.
- 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:
$_REQUEST['keywords_list'] = $content_struct['mt_keywords'];
Have a try with your Ecto. Set tags when you are composing blogs. After publishing, you can find the tags you set in ecto work just fine with Jerome’s Keywords Plugin.
If you have no interesting in how it works, you can stop here. Now I’d like to explain how I made it.
First, Ecto supports submit tag information as keyword with Movable Type API as mt_keywords. What you have to do is just to enable it in Templates settings. Meanwhile, Jerome’s Keywords hooks the action “publish_post” and “edit_post” to add keywords into post meta table. It extracts the keyword from the HTML REQUEST. So, my hack is to fake the request parameter “keywords_list” with the information in mt_keywords. They happend to use the same structure to present the tags so all I have to do is to add a single line in each post related method in xmlrpc.php
2 Trackbacks / Pingbacks for this entry
-
One Hoopy Frood » How to get MarsEdit to work with Jerome’s Keywords
July 22nd, 2006 on 12:04 am[...] But I stumbled upon How to make ecto work with Jerome’s Keywords, which also will work for MarsEdit (and probably any other tool that uses XML-RPC to talk to WordPress). [...]
December 29th, 2005 on 10:28 pm
[...] 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. [...]