From 4131b785f7e36862cbcc937c4a395f0bb5fc5874 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 5 Aug 2003 18:33:39 +0000 Subject: - Help system improvements from Michael. --- modules/bloggerapi.module | 56 +++++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 21 deletions(-) (limited to 'modules/bloggerapi.module') diff --git a/modules/bloggerapi.module b/modules/bloggerapi.module index 3fb5d4edc..0535fa21f 100644 --- a/modules/bloggerapi.module +++ b/modules/bloggerapi.module @@ -365,29 +365,43 @@ function bloggerapi_perm() { } function bloggerapi_system($field){ - $system["description"] = t("Enables users to post using tools or applications that support the Blogger API."); - return $system[$field]; + $output = ""; + + if ($field == "description") {$output .= bloggerapi_help("admin/system/modules"); }; + + return $output; } -function bloggerapi_help() { - - $output = "

Introduction

"; - $output .= "

Blogger, 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. Radio, Blogbuddy, w.bloggar, 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 content accepting machine™.

"; - $output .= "

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 ". l("distributed authentication", "user/help") ." requests)

"; - $output .= "

Blogger API implementation

"; - $output .= "

A word of warning on the Blogger API: it is unofficial. It exists because Blogger is one of the most popular services and also they were first to implement an XML-RPC interface to their service. It may not be the best implementation of a distributed weblog API. For a promising candidate, see the Echo project.

"; - $output .= "

Drupal's support for the Blogger API is quite complete. Each method with an asterisk below has been implemented in Drupal.

"; - $output .= "

blogger.newPost()*
blogger.editPost()*
blogger.getUsersBlogs()*
blogger.getUserInfo()*
blogger.getTemplate()
blogger.setTemplate()

"; - $output .= "

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 posts:

"; - $output .= "

blogger.getPost()*
blogger.getRecentPosts()*
blogger.deletePost()*

"; - $output .= "

Installation and usage

"; - $output .= "

To install the Blogger API module, enable the module on the ". l("modules configuration page", "admin/systems/modules") ." Also make sure you have your permissions set correctly for accessing the Blogger API, the relevant settings can be found under the ". l("user management", "admin/user/permission") ." 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.

"; - $output .= "

Once the API is enabled you can download one of the above mentioned Blogger API clients and get blogging.

"; - $output .= "

Setup of the client

"; - $output .= "

The Drupal page you need to call in order to connect using the Blogger API is http://server/xmlrpc.php where server is the URL of the site you want to post to. As an example when posting to drupal.org, the account settings for w.bloggar would be: host: www.drupal.org (default = plant.blogger.com) and page: xmlrpc.php (default = /api/RPC2).

"; - $output .= "

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.

"; - $output .= "

Notes and limitations

"; - $output .= ""; +function bloggerapi_help($section) { + $output = ""; + + switch ($section) { + case 'admin/bloggerapi/help': + case 'admin/help': + $output = "

Introduction

"; + $output .= strtr("

%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 content accepting machine™.

", array("%blogger-com" => l(t("Blogger"), "www.blogger.com", array("location" => "global")), "%blogger-api" => l(t("Blogger API"), "www.blogger.com/developers/api/1_docs/", array("location" => "global")), "%client-radio" => l(t("Radio"), "radio.userland.com", array("location" => "global")), "%client-blogbuddy" => l(t("BlogBuddy"), "blogbuddy.sourceforge.net", array("location" => "global")), "%client-w_bloggar" => l(t("w.bloggar"), "www.wbloggar.com", array("location" => "global")), "%client-textrouter" => l(t("TextRouter"), "projects.kittle.info/tr", array("location" => "global")) )); + $output .= strtr("

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)

",array("%blogger-api" => l(t("Blogger API"), "www.blogger.com/developers/api/1_docs", array("location" => "global")), "%xml-rpc" => l(t("XML-RPC"), "www.xmlrpc.com", array("location" => "global")), "%userland-software" => l(t("UserLand Software"), "www.userland.com", array("location" => "global")), "%weblogs-com" => l(t("weblogs.com"), "www.weblogs.com", array("location" => "global")), "%dist-auth" => l(t("distributed authentication"), "user/help") )) ; + $output .= "

Blogger API implementation

"; + $output .= strtr("

A word of warning on the Blogger API: it is unofficial. 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.

", array("%echo-proj" => l(t("Echo project"), "www.intertwingly.net/wiki/pie/RoadMap", array("location" => "global")) )); + $output .= "

Drupal's support for the Blogger API is quite complete. Each method with an asterisk below has been implemented in Drupal.

"; + $output .= strtr("

%bloggerapi-newpost
%bloggerapi-editpost
%bloggerapi-getuserblogs
%bloggerapi-getuserinfo
%bloggerapi-gettemplate
%bloggerapi-settemplate

", array("%bloggerapi-newpost" => l(t("blogger.newPost()*"), "%blogger-api/xmlrpc_newPost.html", array("location" => "global")), "%bloggerapi-editpost" => l(t("blogger.editPost()*"), "%blogger-api/xmlrpc_editPost.html", array("location" => "global")), "%bloggerapi-getuserblogs" => l(t("blogger.getUsersBlogs()*"), "%blogger-api/xmlrpc_getUserBlogs.html", array("location" => "global")), "%bloggerapi-getuserinfo" => l(t("blogger.getUserInfo()*"), "%blogger-api/xmlrpc_getUserInfo.html", array("location" => "global")), "%bloggerapi-gettemplate" => l(t("blogger.getTemplate()*"), "%blogger-api/xmlrpc_getTemplate.html", array("location" => "global")), "%bloggerapi-settemplate" => l(t("blogger.setTemplate()*"), "%blogger-api/xmlrpc_setTemplate.html", array("location" => "global")) )); + $output = strtr($output, array("%blogger-api" => "www.blogger.com/developers/api/1_docs")); + $output .= "

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:

"; + $output .= strtr("

%mess-296
%mess-225
%mess-147

", array("%mess-296" => l(t("blogger.getPost()*"), "%blogger-dev/296", array("location" => "global")), "%mess-225" => l(t("blogger.getRecentPosts()*"), "%blogger-dev/225", array("location" => "global")), "%mess-147" => l(t("blogger.deletePost()*"), "%blogger-dev/147", array("location" => "global")) )); + $output = strtr($output, array("%blogger-dev" => "groups.yahoo.com/group/bloggerDev/message")); + $output .= "

Installation and usage

"; + $output .= strtr("

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.

", array("%mod-config" => l(t("modules configuration page"), "admin/systems/modules"), "%user-management" => l(t("user management"), "admin/user/permission") )); + $output .= "

Once the API is enabled you can download one of the above mentioned Blogger API clients and get blogging.

"; + $output .= "

Setup of the client

"; + $output .= strtr("

The Drupal page you need to call in order to connect using the Blogger API is http://server/xmlrpc.php where server 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).

", array("%client-wbloggar" => l(t("w.bloggar"), "www.wbloggar.com", array("location" => "global")) )); + $output .= "

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.

"; + $output .= "

Notes and limitations

"; + $output .= ""; + break; + case 'admin/system/modules': + $output .= "Enables users to post using tools or applications that support the Blogger API."; + break; + } return t($output); } -- cgit v1.2.3