Extending the XML_RPC Plugin

Creating and modifying plugins.
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Extending the XML_RPC Plugin

Post by blog.brockha.us »

Hello.

The XML_RPC plugin implements interfaces defined by other blog tools.
At the moment I need some new calls, that are not defined in other interfaces AFAIK. In example: I need to get all articles for a given category.

So I' thinking about implementing some unique s9y_* XML_RPC calls.

What do you think: Should I implement these new XML_RPC calls in the XML_RPC plugin in order to make them available to the community, or should I implement a new private plugin only available to myself?
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Extending the XML_RPC Plugin

Post by garvinhicking »

Hi!

Well, the full and cool way of course would be to enhance the plugin in some kind of RFC-like way, by also asking other blog developers how their systems can support special calls.

I believe WordPress has added some custom options, so maybe there's some common ground to use for new functions?

REgards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Post by blog.brockha.us »

Do you have a link describing the new WP XML_RPC features you mean?
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Sadly not. A year or two ago, I was contacted by them and Yahoo telling me about a taskforce/workgroup that was to be created.I offered to assist in it and implement the features for s9y.

Half a year later I never heard from them again, but read a WP announcement that they enhanced the XML-RPC on their own with proprietary functions. I wasn't happy about this, and never dug really into it since.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

Grischa - if you do work on the plugin, can you fix this output, which always fails validation:

Code: Select all

<link rel="EditURI" type="application/rsd+xml" title="RSD" url="http://www.example.com/serendipity_xmlrpc.php?xsd=true" />
I think it is just the "url=" bit.... can that be href?
=Don=
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Post by blog.brockha.us »

@Garvin: Hmm.. I only find the typical calls for WP at http://codex.wordpress.org/XML-RPC_wp . I am wondering, why every blog has to redefine them again and again? There are all the same, I saw at other XMLRPC definitions.. :-/

@Don: Well, if I work on it, I will fix this. Are your sure, it has to be called href? I'm not very firm in this..
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

blog.brockha.us wrote:@Don: Well, if I work on it, I will fix this. Are your sure, it has to be called href? I'm not very firm in this..
No, I am not sure it has to be an href... but it does fail validation using url, or at least, I think that is the reason. I do not use this plugin myself, so I cannot be sure. I AM, however, sure that it does not validate.
=Don=
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Post by blog.brockha.us »

Okay, "url" seems to be realy wrong. I fixed this to "href" and commited it into the cvs. Sadly Widows Life Writer still is unable to detect the blog automatically. I had hope about this..
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Post by blog.brockha.us »

Okay.. Now I need a new function call: Get all entries for a given category (list).

Should I implement my own plugin or should I implement them into the S9Y Plugin?
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

ALL entries?

Well, serendipity_fetchEntries() can do it, according to its inline documentation.

Just set $serendipity['GET']['category'] to the list of category IDs, separated by semicolons: "1;3;29;17". Then call serendipity_fetchEntries().
Judebert
---
Website | Wishlist | PayPal
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Post by blog.brockha.us »

Yes all or using a "maxentries" parameter, like the other xml_rpc calls do it.

Your hint about setting post parameters doesn't help when using xmlrpc, AFAIK. I have to implement a new xmlrpc call to offer the possibility to get all entries of a category. Or do I misunderstand you, judebert?
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Ah.

Sorry; I thought you wanted a serendipity function that could get all entries, so you could implement an XML-RPC method. I didn't realize you were trying to determine the correct place to put an XML-RPC method that returns all entries in a category.

You probably knew about fetchEntries anyway.

I don't know enough about XML-RPC to answer that question.
Judebert
---
Website | Wishlist | PayPal
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Post by blog.brockha.us »

Okay. I think, I will do my own plugin then but keep an eye on it making it easy to merge it with the normal xmlrpc plugin, if desired later..
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
ormus7577
Regular
Posts: 122
Joined: Sat Nov 04, 2006 12:11 pm
Location: Ulm, Germany

Post by ormus7577 »

Sorry for digging up this old thread...

Grischa, didn't you fix the encoding of html entities for the title of entries published via Live Writer? Somehow it doesn't work for me, the entities are converted, but not the way I would expect them to... Very strange. Example: http://www.ormus.info/archives/19-Umlau ... riter.html
my installations:
family blog: http://familie.lobenstein.info/
personal blog: http://www.ormus.info/
OrmusTool Homepage: http://tool.ormus.info/
Online Adventskalender: http://www.ormus.info/pages/advent.html
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Post by blog.brockha.us »

Yes, this is right, I fixed the plugin to get it working with the WLW. But sorry, I have no idea, why it doesn't work for you. It looks as if it is some kind of encoding problem.

I'm on Linux now (since a year or so), so I can't test WLW at the moment..
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
Post Reply