$struct = new xmlrpcval(array("url" => new xmlrpcval(url("blog/$user->uid")), "blogid" => new xmlrpcval($user->uid), "blogName" => new xmlrpcval($user->name . "'s blog at ". variable_get("site_name", "drupal"))),"struct");
$result = db_query_range("SELECT n.*, u.name FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.uid = %d ORDER BY n.nid DESC", $user->uid, 0, $num);
$output .= strtr("<p>%blogger-com, the well-known public weblog service, provides an application programing interface (API) to allow remote procedure calls (RPC) to the Blogger service. Drupal supports this %blogger-api, which means that many remote clients (e.g. %client-radio, %client-blogbuddy, %client-w_bloggar, and %client-textrouter) may post to Drupal. These clients provide a bevy of interesting capabilities like offline composing, spellcheck, and WYSIWYG editing; many folks prefer to blog with a client application over typical web forms. By supporting the Blogger API, Drupal grows grander than a web site engine, it's a <i>content accepting machine</i>™.</p>", array("%blogger-com" => "<a href=\"http://www.blogger.com/\">". t("Blogger") ."</a>", "%blogger-api" => "<a href=\"http://www.blogger.com/developers/api/1_docs/\">". t("Blogger API") ."</a>", "%client-radio" => "<a href=\"http://radio.userland.com/\">". t("Radio") ."</a>", "%client-blogbuddy" => "<a href=\"http://blogbuddy.sourceforge.net/\">". t("BlogBuddy") ."</a>", "%client-w_bloggar" => "<a href=\"http://www.wbloggar.com/\">". t("w.bloggar") ."</a>", "%client-textrouter" => "<a href=\"http://projects.kittle.info/tr/\">". t("TextRouter") ."</a>" ));
$output .= strtr("<p>The %blogger-api uses the %xml-rpc protocol for communicating with the outside world. %xml-rpc, originally developed by Dave Winer of %userland-software, is a simple XML-based RPC specification ideally suited to the web. Drupal also uses %xml-rpc for several other tasks (e.g. notifiying %weblogs-com of blog updates and making/accepting %dist-auth requests)</p>",array("%blogger-api" => "<a href=\"http://www.blogger.com/developers/api/1_docs/\">". t("Blogger API") ."</a>", "%xml-rpc" => "<a href=\"http://www.xmlrpc.com/\">". t("XML-RPC") ."</a>", "%userland-software" => "<a href=\"http://www.userland.com/\">". t("UserLand Software") ."</a>", "%weblogs-com" => "<a href=\"http://www.weblogs.com/\">". t("weblogs.com") ."</a>", "%dist-auth" => l(t("distributed authentication"), "user/help") )) ;
$output .= strtr("<p>A word of warning on the Blogger API: it is <b>unofficial</b>. It exists because Blogger is one of the most popular and the first service to implement an XML-RPC interface. It may not be the best implementation of a distributed weblog API. For a promising candidate, see the %echo-proj.</p>", array("%echo-proj" => "<a href=\"http://www.intertwingly.net/wiki/pie/RoadMap\">". t("Echo project") ."</a>" ));
$output .= "<p>Drupal also supports the following methods. These methods were added after the those listed above and are not documented on the Blogger API web site. Each method is linked to its corresponding blogger-dev mailing list post:</p>";
$output .= strtr("<p>To install the Blogger API module, enable the module on the %mod-config. Also make sure you have your permissions set correctly for accessing the Blogger API, the relevant settings can be found under the %user-management section in the administration pages. Check the checkbox behind the line \"access Blogger API\" for the roles that are allowed to use the Blogger API.</p>", array("%mod-config" => l(t("modules configuration page"), "admin/systems/modules"), "%user-management" => l(t("user management"), "admin/user/permission") ));
$output .= "<p>Once the API is enabled you can download one of the above mentioned Blogger API clients and get blogging.</p>";
$output .= strtr("<p>The Drupal page you need to call in order to connect using the Blogger API is <i>http://server/xmlrpc.php</i> where <i>server</i> is the URL of the site you want to post to. As an example when posting to drupal.org, the account settings for %client-wbloggar would be: host: www.drupal.org (default = plant.blogger.com) and page: xmlrpc.php (default = /api/RPC2).</p>", array("%client-wbloggar" => "<a href=\"http://www.wbloggar.com/\">". t("w.bloggar") ."</a>" ));
$output .= "<p>You can't use remote authentication when posting using a Blogger API enabled client, even when you could use that to authenticate on the site itself. You will have to use the site's local username, enter a password for that account, and then use that combination to post using the Blogger API client.</p>";
$output .= "<h3>Notes and limitations</h3>";
$output .= "<ul><li>The Blogger API contains an AppKey that is discarded in the Drupal Implementation.</li><li>The Blogger API does not allow for a title element. Our work around for this is either to use <title></title> tags in the body of your post or let the module create a title by inspecting the first few lines of the post body.</li><li>The publish parameter is always set to <i>1</i>.</li><li>When using the <i>getUserInfo</i> call, Drupal attempts to generate a first and last name from the Drupal username; no distinction is made internally</li><li><i>GetUsersBlogs</i> only returns one blog because unlike Blogger, Drupal only allows one blog per user.</li></ul>";
break;
case 'admin/system/modules':
$output .= "Enables users to post using tools or applications that support the Blogger API.";