Movable Type weblogs.com ping


WEBLOGS.COM XML-RPC PING

This document describes how to modify the Movable Type code to support the new weblogs.com XML-RPC ping interface (http://newhome.weblogs.com/faq). Rather than automatically checking for changes in all registered blogs (the old behavior), weblogs.com now requires that an XML-RPC ping be sent to mark the blog as changed. The modifications described in this document add the XML-RPC ping functionality to Movable Type. This functionality will be incorporated into the next release of MT, but we wanted to add support for the feature as soon as possible.

To add support for the XML-RPC ping, you will need to modify a couple of the Movable Type library modules, as well as uploading a new library module. Your webserver will also need the LWP set of Perl modules installed; these modules are not part of the core Perl installation, but they should be installed on most webservers.

Instructions

The following instructions describe how to add support for performing an XML-RPC ping to weblogs.com whenever you save an entry, or post a new entry, to any of the Movable Type blogs.

Note: all code additions below are relative to the lines of code in the 1.1 version of Movable Type.

  1. Download the new XMLRPC.pm file from the following address:
        http://www.movabletype.org/downloads/XMLRPC.pm

  2. Open an FTP connection to your webserver; then open the directory where you installed Movable Type.

  3. Open the directory lib; then open the directory MT. Upload the file XMLRPC.pm into the MT directory.

  4. Also in the MT directory, open the file ConfigMgr.pm in a text editor. After line 37, add this line:
        $mgr->define('WeblogsPingURL', Default => 'http://rpc.weblogs.com/RPC2');

  5. Save ConfigMgr.pm (and re-upload it to your webserver, if you downloaded it in order to edit it).

  6. Open the directory App.

  7. Open the file CMS.pm in a text editor. After line 858, add these lines:
            require MT::XMLRPC;
            my $res = MT::XMLRPC->weblogs_ping($obj->blog_id) or
                return $app->error("Your post was saved, but the weblogs.com " .
                                   "ping failed: " . MT::XMLRPC->errstr);

  8. Save CMS.pm (and re-upload it to your webserver, if you downloaded it in order to edit it).

  9. That's it! Whenever you save an entry or post a new entry to your blog, a ping will be sent to weblogs.com.

Notes


Copyright © 2001 Ben Trott and Mena Trott. All Rights Reserved.