b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (Version 1.9) [ class tree: xmlsrv ] [ index: xmlsrv ] [ all elements ]

Procedural File: xmlrpc.php

Source Location: /blogs/xmlsrv/xmlrpc.php

Page Details

XML-RPC APIs

This file implements the following XML-RPC remote procedures, to be called by remote clients:

b2evolution - http://b2evolution.net/ Released under GNU GPL License - http://b2evolution.net/about/license.html

Version:  $Id: xmlrpc.php,v 1.105.2.5 2007/03/08 00:08:47 blueyed Exp $
Copyright:  (c)2003-2006 by Francois PLANQUE - http://fplanque.net/
Filesource:  Source Code for this file
Includes
require_once (_admin.php) [line 34]
[ Top ]

require_once ($inc_path.'_misc/ext/_xmlrpcs.php') [line 2055]

** SERVER FUNCTIONS ARRAY ***

[ Top ]

require_once (dirname(__FILE__).'/../conf/_config.php') [line 33]

Set to TRUE to do HTML sanity checking as in the browser interface, set to

FALSE if you trust the editing tool to do this (more features than the browser interface)

Information Tags:
Todo:  fp> have a global setting with 3 options: check|nocheck|userdef => each then has his own setting to define if his tool does the checking or not. fp> Also, there should be a permission to say if members of a given group can or cannot post insecure content. If they cannot, then they cannot disable the sanity check fp> note: if allowed unsecure posting, disabling the sanity cjecker should also be allowed in the html backoffice
[ Top ]

require_once (_main.inc.php) [line 37]
[ Top ]

require_once (_upgrade.php) [line 36]
[ Top ]


Functions
b2getcategories  [line 209]

xmlrpcresp b2getcategories( xmlrpcmsg $m  )

b2.getCategories

B2 API

Gets also used for mt.getCategoryList. Is this correct?

Parameters:
xmlrpcmsg   $m:  XML-RPC Message
  1. blogid (string): Unique identifier of the blog to query
  2. username (string): Login for a Blogger user who is member of the blog.
  3. password (string): Password for said username.

API Tags:
Return:  XML-RPC Response


[ Top ]
b2newpost  [line 111]

xmlrpcresp b2newpost( xmlrpcmsg $m  )

b2.newPost. Adds a post, blogger-api like, +title +category +postdate.

b2 API

Parameters:
xmlrpcmsg   $m:  XML-RPC Message
  1. ?
  2. ?
  3. username (string): Login for a Blogger user who is member of the blog.
  4. password (string): Password for said username.
  5. content (string): The content of the post.
  6. publish (boolean): If set to true, the post will be published immediately.
  7. title (string): The title of the post.
  8. category (string): The internal name of the category you want to post the post into.
  9. date (string): This is the date that will be shown in the post, give "" for current date.

API Tags:
Return:  XML-RPC Response


[ Top ]
b2_getPostURL  [line 272]

xmlrpcresp b2_getPostURL( xmlrpcmsg $m  )

b2.getPostURL

B2 API

Parameters:
xmlrpcmsg   $m:  XML-RPC Message
  1. blogid (string): Unique identifier of the blog to query
  2. ?
  3. username (string): Login for a Blogger user who is member of the blog.
  4. password (string): Password for said username.
  5. post_ID (string): Post to query

API Tags:
Return:  XML-RPC Response


[ Top ]
bloggerdeletepost  [line 586]

xmlrpcresp bloggerdeletepost( xmlrpcmsg $m  )

blogger.editPost deletes a given post.

This API call is not documented on http://www.blogger.com/developers/api/1_docs/

Parameters:
xmlrpcmsg   $m:  XML-RPC Message
  1. appkey (string): Unique identifier/passcode of the application sending the post. (See access info http://www.blogger.com/developers/api/1_docs/#access .)
  2. postid (string): Unique identifier of the post to be deleted.
  3. username (string): Login for a Blogger user who has permission to edit the given post (either the user who originally created it or an admin of the blog).
  4. password (string): Password for said username.

API Tags:
Return:  XML-RPC Response


[ Top ]
bloggereditpost  [line 462]

xmlrpcresp bloggereditpost( xmlrpcmsg $m  )

blogger.editPost changes the contents of a given post.

Optionally, will publish the blog the post belongs to after changing the post. (In b2evo, this means the changed post will be moved to published state). On success, it returns a boolean true value. On error, it will return a fault with an error message.

see http://www.blogger.com/developers/api/1_docs/xmlrpc_editPost.html

Parameters:
xmlrpcmsg   $m:  XML-RPC Message
  1. appkey (string): Unique identifier/passcode of the application sending the post. (See access info http://www.blogger.com/developers/api/1_docs/#access .)
  2. postid (string): Unique identifier of the post to be changed.
  3. username (string): Login for a Blogger user who has permission to edit the given post (either the user who originally created it or an admin of the blog).
  4. password (string): Password for said username.
  5. content (string): New content of the post.
  6. publish (boolean): If true, the blog will be published immediately after the post is made. (In b2evo,this means, the new post will be in 'published' state, otherwise it would be in draft state).

API Tags:
Return:  XML-RPC Response

Information Tags:
Todo:  check current status and permission on it

[ Top ]
bloggergetpost  [line 787]

xmlrpcresp bloggergetpost( xmlrpcmsg $m  )

blogger.getPost retieves a given post.

This API call is not documented on http://www.blogger.com/developers/api/1_docs/

Parameters:
xmlrpcmsg   $m:  XML-RPC Message
  1. appkey (string): Unique identifier/passcode of the application sending the post. (See access info http://www.blogger.com/developers/api/1_docs/#access .)
  2. postid (string): Unique identifier of the post to be deleted.
  3. username (string): Login for a Blogger user who has permission to edit the given post (either the user who originally created it or an admin of the blog).
  4. password (string): Password for said username.

API Tags:
Return:  XML-RPC Response


[ Top ]
bloggergetrecentposts  [line 857]

xmlrpcresp bloggergetrecentposts( xmlrpcmsg $m  )

blogger.getRecentPosts retieves X most recent posts.

This API call is not documented on http://www.blogger.com/developers/api/1_docs/

Parameters:
xmlrpcmsg   $m:  XML-RPC Message
  1. appkey (string): Unique identifier/passcode of the application sending the post. (See access info http://www.blogger.com/developers/api/1_docs/#access .)
  2. blogid (string): Unique identifier of the blog the post will be added to. Currently ignored in b2evo, in favor of the category.
  3. username (string): Login for a Blogger user who has permission to edit the given post (either the user who originally created it or an admin of the blog).
  4. password (string): Password for said username.
  5. numposts (integer): number of posts to retrieve.

API Tags:
Return:  XML-RPC Response


[ Top ]
bloggergettemplate  [line 955]

xmlrpcresp bloggergettemplate( xmlrpcmsg $m  )

blogger.getTemplate returns text of the main or archive index template for a given blog.

Currently, in b2evo, this will return the templates of the 'custom' skin.

see http://www.blogger.com/developers/api/1_docs/xmlrpc_getTemplate.html

Parameters:
xmlrpcmsg   $m:  XML-RPC Message
  1. appkey (string): Unique identifier/passcode of the application sending the post. (See access info http://www.blogger.com/developers/api/1_docs/#access .)
  2. blogid (string): Unique identifier of the blog who's template is to be returned.
  3. username (string): Login for a Blogger who has admin permission on given blog.
  4. password (string): Password for said username.
  5. templateType (string): Determines which of the blog's templates will be returned. Currently, either "main" or "archiveIndex".

API Tags:
Return:  XML-RPC Response


[ Top ]
bloggergetuserinfo  [line 735]

xmlrpcresp bloggergetuserinfo( xmlrpcmsg $m  )

blogger.getUserInfo returns returns a struct containing user info.

Data returned: userid, firstname, lastname, nickname, email, and url.

see http://www.blogger.com/developers/api/1_docs/xmlrpc_getUserInfo.html

Parameters:
xmlrpcmsg   $m:  XML-RPC Message
  1. appkey (string): Unique identifier/passcode of the application sending the post. (See access info http://www.blogger.com/developers/api/1_docs/#access .)
  2. username (string): Login for the Blogger user who's blogs will be retrieved.
  3. password (string): Password for said username. (currently not required by b2evo)

API Tags:
Return:  XML-RPC Response, a <struct> containing:
  • userid,
  • firstname,
  • lastname,
  • nickname,
  • email,
  • url


[ Top ]
bloggergetusersblogs  [line 659]

xmlrpcresp bloggergetusersblogs( xmlrpcmsg $m  )

blogger.getUsersBlogs returns information about all the blogs a given user is a member of.

Data is returned as an array of <struct>'s containing the ID (blogid), name (blogName), and URL (url) of each blog.

Non official: Also return a boolean stating wether or not the user can edit th eblog templates (isAdmin).

see http://www.blogger.com/developers/api/1_docs/xmlrpc_getUsersBlogs.html

Parameters:
xmlrpcmsg   $m:  XML-RPC Message
  1. appkey (string): Unique identifier/passcode of the application sending the post. (See access info http://www.blogger.com/developers/api/1_docs/#access .)
  2. username (string): Login for the Blogger user who's blogs will be retrieved.
  3. password (string): Password for said username. (currently not required by b2evo)

API Tags:
Return:  XML-RPC Response, an array of <struct>'s containing for each blog:
  • ID (blogid),
  • name (blogName),
  • URL (url),
  • bool: can user edit template? (isAdmin).


[ Top ]
bloggernewpost  [line 345]

xmlrpcresp bloggernewpost( xmlrpcmsg $m  )

blogger.newPost makes a new post to a designated blog.

BLOGGER API

Optionally, will publish the blog after making the post. (In b2evo, this means the new post will be in 'published' state). On success, it returns the unique ID of the new post (usually a seven-digit number at this time). On error, it will return some error message.

see http://www.blogger.com/developers/api/1_docs/xmlrpc_newPost.html

Parameters:
xmlrpcmsg   $m:  XML-RPC Message
  1. appkey (string): Unique identifier/passcode of the application sending the post. (See access info http://www.blogger.com/developers/api/1_docs/#access .)
  2. blogid (string): Unique identifier of the blog the post will be added to. Currently ignored in b2evo, in favor of the category.
  3. username (string): Login for a Blogger user who has permission to post to the blog.
  4. password (string): Password for said username.
  5. content (string): Contents of the post.
  6. publish (boolean): If true, the blog will be published immediately after the post is made. (In b2evo,this means, the new post will be in 'published' state, otherwise it would be in draft state).

API Tags:
Return:  XML-RPC Response


[ Top ]
bloggersettemplate  [line 1033]

xmlrpcresp bloggersettemplate( xmlrpcmsg $m  )

blogger.setTemplate changes the template for a given blog.

Can change either main or archive index template.

Currently, in b2evo, this will change the templates of the 'custom' skin.

see http://www.blogger.com/developers/api/1_docs/xmlrpc_getTemplate.html

Parameters:
xmlrpcmsg   $m:  XML-RPC Message
  1. appkey (string): Unique identifier/passcode of the application sending the post. (See access info http://www.blogger.com/developers/api/1_docs/#access .)
  2. blogid (string): Unique identifier of the blog who's template is to be returned.
  3. username (string): Login for a Blogger who has admin permission on given blog.
  4. password (string): Password for said username.
  5. template (string): The text for the new template (usually mostly HTML).
  6. templateType (string): Determines which of the blog's templates will be returned. Currently, either "main" or "archiveIndex".

API Tags:
Return:  XML-RPC Response


[ Top ]
logIO  [line 59]

boolean logIO( $io, $msg  )

Used for logging, only if $debug_xmlrpc_logging is true

Parameters:
   $io: 
   $msg: 

API Tags:
Return:  Have we logged?


[ Top ]
metawebloggetrecentposts  [line 1749]

void metawebloggetrecentposts( $m  )
Parameters:
   $m: 


[ Top ]
mt_getcategoryList  [line 2014]

void mt_getcategoryList( $m  )
Parameters:
   $m: 


[ Top ]
mt_getPostCategories  [line 1460]

void mt_getPostCategories( $m  )
Parameters:
   $m: 


[ Top ]
mt_setPostCategories  [line 1391]

void mt_setPostCategories( $m  )
Parameters:
   $m: 


[ Top ]
mweditpost  [line 1546]

void mweditpost( $m  )

mw.EditPost (metaWeblog.editPost)

mw API

Tor - TODO

  • Sort out sql select with blog ID
  • screws up posts with multiple categories partly due to the fact that Movable Type calls to this API are different to Metaweblog API calls when handling categories.

Parameters:
   $m: 


[ Top ]
mwgetcats  [line 1701]

void mwgetcats( $m  )
Parameters:
   $m: 


[ Top ]
mwgetpost  [line 1855]

xmlrpcresp mwgetpost( xmlrpcmsg $m  )

metaweblog.getPost retieves a given post.

This API call is not documented on http://www.blogger.com/developers/api/1_docs/

Parameters:
xmlrpcmsg   $m:  XML-RPC Message
  1. appkey (string): Unique identifier/passcode of the application sending the post. (See access info http://www.blogger.com/developers/api/1_docs/#access .)
  2. postid (string): Unique identifier of the post to be deleted.
  3. username (string): Login for a Blogger user who has permission to edit the given post (either the user who originally created it or an admin of the blog).
  4. password (string): Password for said username.

API Tags:
Return:  XML-RPC Response


[ Top ]
mwnewMediaObj  [line 1130]

void mwnewMediaObj( $m  )
Parameters:
   $m: 


[ Top ]
mwnewpost  [line 1277]

void mwnewpost( $m  )

mw.newPost

mw API Tor 2004

NB! (Tor Feb 2005) status in metaweblog API speak dictates whether static html files are generated or not, so fairly misleading

Parameters:
   $m: 


[ Top ]
starify  [line 85]

string starify( string $string  )

Returns a string replaced by stars, for passwords.

Parameters:
string   $string:  the source string

API Tags:
Return:  same length, but only stars


[ Top ]
strip_all_but_one_link  [line 1094]

void strip_all_but_one_link( $text, $mylink, $log  )

Pingback support function

strip_all_but_one_link(-)

Parameters:
   $text: 
   $mylink: 
   $log: 


[ Top ]
_mw_get_cat_IDs  [line 1916]

array|xmlrpcresp _mw_get_cat_IDs( array $contentstruct, integer $blog_ID, [boolean $empty_struct_ok = false]  )
Parameters:
array   $contentstruct:  struct
integer   $blog_ID:  blog ID
boolean   $empty_struct_ok:  Return empty array (instead of error), if no cats given in struct?

API Tags:
Return:  A list of category IDs or xmlrpcresp in case of error.


[ Top ]


Documentation generated on Tue, 18 Dec 2007 19:09:10 +0100 by phpDocumentor 1.4.0