Archive for August, 2007

Wordpress remote management

Uncategorized No Comments »

I’m trying to automate as much of the WP admin stuff as possible, and the reasons for that is of course because I’m lazy, hehe. Seriously, it takes a lot of to manage 20ish of blogs (on different servers and different hosting accounts etc) if you are supposed to go through the admin GUI  and login/click around etc for each of them.

I have my own Windows client for managing it, where I basically select a blog from a dropdownlist and then by utilizing XML-RPC calls do my stuff. One example of where the existing RPC interface is not enough is blogrolling, therefore I created my own extention plugin for link management. I have a lot of more of these type of RPC extentions, but they are simply not ready to be published yet, but I will.

In the meantime waiting, why don’t you download a really basic remote blog manager program, which gives you the (C# sourcecode is included) very first skeleton program for you to build upon. While the actual article writing GUI is a joke compared to other blog clients, say LiveWriter for instance, the point is that is is totally expandable. And YOU decide on how to expand it. If you know how to implement some XML-RPC on the server side then there is NO limit on what you can achieve from your OWN blog client. For example I am experimenting on some options manager. So please feel free to download and try it out - the code is very simple, but has no error handling at all, but, hey, at least it’s a start.

wpLinkMentor manage your Wordpress links with RPC

wpLinkMentor 1 Comment »

While blogroll (link) management in the Wordpress admin GUI is pretty straightforward, I still find it incredibly slow when needing to wipe out links and add some completely new. Well, to be honest, what slows things down is actually

  1. finding the loginid and password for the blog
  2. logging in
  3. clicking to blogroll part of admin gui

It’s ok to do it if you have, say, 5 blogs, but if you like me manages around 20 or more then it gets SOOO frustrating.  

Remote management for posts and categories in multiple blogs scenarios is not a problem cause XMLRPC allows us to create our own client application. There are a lot of blog clients available, but I like to do things my way, so I have actually written my own. However,next step was to find a way to manage the blogrolls remotely. Since there is no built in support in WP XMLRPC for it I simply decided to write my own. It’s implemented as a regular WP plugin - so all you need to do is download the zip file, unzip it, upload it to your plugins directory and from your WP admin pages you activate it.

croppercapture21.Png

I won’t give you much info on how to use it in this particular post - you do need some XMLRPC experience - I will get back with info on how to use it from a more userfriendly perspective, for now I just want to publish it and therefore I assume the php function headers will be enough for you to understand how to build up the XMLRPC call:

wpLinkMentor.getLinks

    $blog_ID    = (int)$args[0];
    $user_login = $args[1];
    $user_pass  = $args[2];
    $cat_id  = $args[3];

you just send in an category ID (numeric). I *think* that in a typical clean install of Wordpress then the blogroll will
have ID 2. This means you can use it to manage links for ANY category in your blog.

Returns an array of links - each link having

link_id
link_url
link_title
link_description
link_visible
link_rel

wpLinkMentor.deleteLink

    $blog_ID    = (int)$args[0];
    $user_login = $args[1];
    $user_pass  = $args[2];
    $link_id  = $args[3];

you just send in the link ID (numeric). In other words - you should typically first
call getLinks to retrieve all links and by that you get the link_id:s.
wpLinkMentor.updateLink

    $blog_ID    = (int)$args[0];
    $user_login = $args[1];
    $user_pass  = $args[2];
    $cat_id  = $args[3];
    $link_id  = $args[4];
    $link_url  = $args[5];
    $link_name  = $args[6];
    $link_description  = $args[7];
    $link_visible  = $args[8];
    $link_rel = $args[9];

If you specify “-1″ as link_id then it will create a new link, otherwise update. 

Return the id of new/updated link. 

Download wpLinkMentor 

phpAdMentor 1.01

wpAdMentor 6 Comments »

This is the old phpAdMentor. It hasn’t been updated since 2001. I am working on a new version which will be updated to support PHP 5 and also available as a Wordpress plugin.

The old file is still available:  
phpAdMentor