I just found out that the plugin broke ZenPress the first time I tried to load my gallery. It’s fixed now and the file has been switched out. I’m pretty sure I got to it before anyone else did ;-).
Related Posts in your offline editor with xmlrpc
Note: This post is over a year and a half old. You may want to check later in this blog to see if there is new information.
The following links are auto-generated but may help you locate newer content:
Updated 11-6-06
There were a couple of bugs in the TextMate commands that I packaged up. I’ve corrected them and have put a new package, version 0.2 on the link.
As most of you know, I do most of my blogging in TextMate these days. Well, all of my blogging. There’s one time I have to actually go out to my blog while I’m writing, though. If I want to quickly link to an article I wrote in the past and can’t remember the title of it, I have to go do a search on my blog and copy the permalink back into my post. Now it’s good practice to link to your own articles now and then, it keeps people moving around your site and sparks a little more interest in what you might have to say. That was kind of the whole point behind the Related Posts plugin to begin with.
So, with permission from the author I have taken the plugin and created a counterpart that creates xmlrpc hooks for retrieving the database query. The package comes with a couple of TextMate commands that allow you to search your blog with text input through a dialog or to link text to a previous post by highlighting it and searching for matches based on keywords in the selected text.
There’s a couple extra commands included, one that searches within your site using Google and creates a “lucky link” and one that fetches 40 recent posts and inserts a link to whichever you select from a dropdown. Those were my first 2 attempts at solving the problem. The Related Posts plugin ended up being a far more elegant solution.
The plugin currently uses the metaWeblog interface, but can easily be modified. If you want to adapt this to any other blogging platform, just have a look at the code, it’s really straightforward. Everything you really need to know is in the last 5 lines…
add_filter('xmlrpc_methods', 'attach_new_xmlrpc');
function attach_new_xmlrpc($methods) {
$methods['wordpress.getRelatedPosts'] = 'wprpc_getRelatedPosts';
return $methods;
}
That’s one hook that you can call with whatever language your blogging app uses. Just for reference, if you name the method something that is already taken, you can actually override the previous method. That leads to some interesting possibilities. It’s what I’m using to make the get and save post functions include Ultimate Tag Warrior tags. That’s almost ready.
Anyway, there are two packages:
The plugin: Related Posts XMLRPC for Wordpress
and the TextMate stuff: TextMate commands for Related Posts 
-
11.05.06 / 4pm
Comments are closed
Comments are currently closed on this entry.