2/10/2004 ↓

Ping PubSub from your WordPress or Moveable Type blog

If you like this post, please subscribe to our RSS feed to read our new posts every day.

Due to popular demand, here is the function to ping the PubSub RSS crawler from WordPress. (MT follows)
Add this function to your my-hacks.php:

// pings PubSub.com RSS Crawler
function pingPubSub($blog_ID = 1) {
// original function by Dries Buytaert for Drupal
global $blogname,$siteurl,$blogfilename;
if ((!(($blogname==”my weblog”) && ($siteurl==”http://example.com”) && ($blogfilename==”wp.php”))) && (!preg_match(”/localhost\//”,$siteurl))) {
$client = new xmlrpc_client(”/ping”, “xping.pubsub.com”, 80);
$message = new xmlrpcmsg(”weblogUpdates.ping”, array(new xmlrpcval($blogname), new xmlrpcval($siteurl.”/”.$blogfilename)));
$result = $client->send($message);
if (!$result || $result->faultCode()) {
return false;
}
return true;
} else {
return false;
}
}

Find these lines in your post.php (inside wp-admin folder) :
pingWeblogs($blog_ID);
pingBlogs($blog_ID);

And add this right after that:
pingPubSub($blog_ID);

All done and pingin (in WordPress)!

From Moveable Type:
From your main blog admin, click on Weblog config on the left hand column and then preferences on top (next to core setup).
Click on Publicity/Remote Interfaces/Trackback in the main list that shows on the page.
In the text area that follows, add this line:
http://xping.pubsub.com/ping

Thats it!

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Visitors who read this post, also read:

    Friends

    Translate

    Translate to German Translate to Spanish Translate to French Translate to Italian Translate to Portuguese Translate to Japanese Translate to Korean Translate to Russian Translate to Chinese

    Latest Videos

    3 Comments | Leave a comment | Comments RSS

    1. Should that be pingPubSub instead of pingYahoo (in the post.php changes)?

      [Reply]

      Sherri (10 comments.) — 03/5/2004 @ 1:46 pm
    2. Whoops!!
      Fixed! Thanks for the catch Sherri!

      [Reply]

      Mark — 03/5/2004 @ 1:48 pm
    3. I’m new to this, could you tell me why I would need this hack as opposed to just including the ping URI in my update services list on the options->writing page?

      Sorry if this is a stupid question.

      [Reply]

      Dane (1 comments.) — 06/5/2005 @ 8:52 pm

    Leave a comment

    Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    (required)

    (required, will not be published)


    S2