New here? Read Greetings Earthling!

elWpAPI rFC Plugin Example | Blogroller

I updated elWpAPI and did a few things. Two fixes and the timeout increased to 15 seconds. I removed a htmlentities() that apparently was causing trouble to funky character languages and I added a new rFC plugin called BLOGROLLER. This is the big thing actually. Blogroller will expose several functions that can be called with 5ub.RFC. They will allow you to easily manage your blogroll.
Read the rest of this entry »

elWpAPI (Wordpress API) has gone Incutio XMLRPC Library (IXR) Friendly

Just had a client telling me his hosting service has updated PHP and somehow lost elWpAPI functionality on the way. I don't know what they have done but maybe disabled the XMLRPC extension.

This is a first, but , as I seek to please (sigh) :) I quickly made the code compatible with IXR. Get the library here directly. So, right now, you should be able to use this without the PHP XMLRPC Extension. I tested it and it works but you make sure to save the oldie but goldie version before you try on the new one. I might have missed stuff on the way ... it happens when I speed code.

Enjoy.

There are a few changes in the code. If the response is a fault (error) the returned result will always be null. Use $wp->wasError() or $wp->wasSuccess() to determine success status. This way it will be a lot easier to determine success state of an operation. Use if(!($response = $wp->doStuff())) return false;

You can also totally avoid PHP XMLRPC if IXR exists by changing this to TRUE: define('FORCE_IXR_XMLRPC', false);

If you got problems ... the comment form is below. And go get a fresh copy!

elWpAPImu extends elWpAPI

Well ... it's done! Get downloading. And backup first as I never keep old versions :)

There are a few things to pay attention to. rFC & rSQL have been ejected from xmlr_rpc and were transformed in standalone plugins. Truth is these two plugins can do almost anything to Wordpress remotely. That's why I needed to pay attention to them separately.

Some new files are required to work. The xmlrpc.php must be in same folder with wpapi.php. I removed the XMLRPC communication part and made a standalone class to be used with any XMLRPC needs.

elWpAPI works as before but the new class elWpAPImu extends it with new WordpressMU functions that need rFC to work.  You can extend on it easily with any WordpressMU functions you want ... or you can ask me.

I didn't really get to test it throughly as I just wanted it out. It works [as I tested each function building it] but there is always something out there :) Let me know and, as always, I'll fix quickly.

As for the documentation and examples ... it's 2AM here :) In the next week I will start a new blog just for elWpAPI with many examples and a lot more detailed explanations including details on these new functions. But I'm pretty sure most of you will be able to use them right away.

All wpMU functions start with wpmu_*.

Have a good night ... I'll crash now!

elWpAPImu Foreplay | Managing Blogs, Not Posts :)

I had a great idea from btray77 about making the class compatible with WordpressMU. And so I did ... even if any1 else could have used rFC to achieve this themselves. But this new class elWpAPImu which extends the elWpAPI is a lot cooler. It still needs rFC enabled.

These are the new functions that I added from WordpressMU and you can do anything. Well ... anything I noticed interesting in Wordpress MU but if you need other functions wrapped up I'll gladly do it for you.

createBlog, createBlogURL, createBlogDomain, createEmptyBlog, createEmptyBlogURL, createEmptyBlogDomain, deleteBlog, dropBlog, createUser, deleteUser, addUserToBlog, addSubscriberToBlog, addContributorToBlog, addAuthorToBlog, addEditorToBlog, addAdministratorToBlog, removeUserFromBlog, isUserMemeberOfBlog, getBlogPermalink, getBlogID, getBlogIDFromURL, getBlogsOfUser, getBlogOption, addBlogOption, deleteBlogOption, updateBlogOption, setBlogPublic, enableRegistrations, usersCanRegister, getBlogAddressByID, getBlogAddressByName, getBlogAddressByDomain, isMainBlog, getBlogDetails, getUserCount, getBlogCount, getBlogList

Yet ... there's a catch.

This post is only the heads up as I'm currently documenting the code as I do with all new code [and slowly with old one]. So stay alert tomorrow as I'm releasing the updated version and I know you want it ... if you want to be a good farmer.

There's more improvements to elWpAPI. I added session caching. This way, if your code is not well optimized and you create a category 10 times, the script will just do it once, cache the response and feed it back afterwards. This will be a great improvement in speed.

PS: Sorry btray77 for not publishing it today. I write code a lot faster than I write text or specs ;) but it'll be well worth the wait.

Scraped Content + elWpAPI = Autoblog v/Light

A customer asked for a fully fledged sample on how to use elWpAPI and I came up with this example. It uses my RSS parser to show you how to start up your own autoblogs. Takes content from a chosen feed and publishes posts with the contents. It's basic but you can build on it.
Read the rest of this entry »

Building On elWpAPI | Extending My Wordpress XMLRPC Class

I need to tell you this. Don't make any change to the actual elWpAPI class. If there's a bug, poke me and I'll fix it but, if you need extra functionality tailored to your needs, always extend the elWpAPI XMLRPC Class.

So, to build your own version, do this. Create a new class myWpAPI and extend the elWpAPI with it.

<?php
require_once('elwapi.php');
class myWpAPI extends elWpAPI{
... your new functions come here ...
};
?>

This is it. When I will make updates you won't need to make changes and alter my code to fit in your updates. Keep it clean and well organized and ejoy it or it could get messy :)

Wordpress XMLRPC | rSQL [Remote SQL] Addon

This is the second biggest Wordpress XMLRPC Addon provided with the elWpAPI. It's called rSQL [Remote SQL] and it does exactly what is says. It can run SQL queries at a distance and return results. It allows you to do so very much using SQL directly in the database and, combined with the rFC Addon, can do virtually anything.

It gives you access to most of $wpdb functions: get_var, get_col, get_row, get_results, update, insert, escape, query plus several other non-$wpdb functions as I needed them: get_prefix, get_tables, blog_tables, get_db, get_schemas, get_blogs. There's one very cool function [get_blogs] that will return all blog prefixes existing in all databases to allow you to work into another blog from a distance :)
Read the rest of this entry »

Wordpress XMLRPC | rFC [Remote Function Call] Addon

As you have noticed, with the elWpAPI class I also added a plugin which adds some extra functionality to Wordpress XMLRPC. It's time to explain one of those addons and I'll start with rFC [Remote Function Call].

I wrote 5ub.rFC to allow me to execute arbitrary functions on Wordpress through XMLRPC. I also wanted an alternative to the Wordpress XMLRPC and this can do virtually anything ... with more / less code.

To call 5ub.rFC you need to this:

  1. Instantiate a new elWpAPI class $wp = new elWpAPI(xmlrpc, user, pass);
  2. And call: $wp->doRpcRequestUP('5ub.rFC', function_name, [param1, param2]);

As you can see it needs the 5ub.rFC module mentioned, a function name and optional parameters. It can not get easier than this.
Read the rest of this entry »

Wordpress XMLRPC API | Change Log

To those who bought the elWpAPI class make sure you subscribe to the comment feed for this new page. Every change I will make to the class will reflect in a new comment added here explaining the new changes. When something new is posted here make sure you get the new code.
Read the rest of this entry »

Wordpress XMLRPC API | Remote Control Wordpress

WARNING:

THIS TOOL HAS RELOCATED: XMLRPC-API.wp (site will launch soon). WORDPRESS 3.1+ READY AND HEAVILY IMPROVED.
PRODUCT IS NO LONGER AVAILABLE HERE.

Before anything: Be aware that this is the easiest to use yet most complex Wordpress XMLRPC script you will find out there. Make sure you bookmark this page as you will return here if you're serious about your XMLRPC needs. See also a basic autoblog engine example.

WORPDRESS.MU BLOGS MANAGEMENT SUPPORT WAS ADDED.

Got this comment and several others along the same lines.

Hey 5ub,

The new Theme Plugins Manager System is cool and stuff but you promised, quite a while ago, to republish the paid-version of your WP.XMLRPC class.
Theme Plugins are cool but automated content is a bit more important to me right now and I'm waiting ... and waiting.

I understand you're busy with your other stuff but don't forget about those STILL WAITING!

Thanks.

Read the rest of this entry »