diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-12-27 12:27:02 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-12-27 12:27:02 +0000 |
commit | f763bb731ea9fe4f6f4d0ebfb9e86cd2a183dbd6 (patch) | |
tree | e48f009b59874db90695d5944563e337baf40a22 | |
parent | 49f4123976bc7b855eee06f9088bbc0e3d8dc941 (diff) | |
download | brdo-f763bb731ea9fe4f6f4d0ebfb9e86cd2a183dbd6.tar.gz brdo-f763bb731ea9fe4f6f4d0ebfb9e86cd2a183dbd6.tar.bz2 |
- Made the ping module ping pingomatic.com, which in turn, will ping all the major ping services.
Less code to ping more services.
-rw-r--r-- | CHANGELOG.txt | 2 | ||||
-rw-r--r-- | modules/ping.module | 68 | ||||
-rw-r--r-- | modules/ping/ping.module | 68 |
3 files changed, 11 insertions, 127 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 65f3ac59c..7be06d3eb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,7 +6,7 @@ Drupal x.x.x, xxxx-xx-xx * improved search indexing. * improved search output. - syndication: - * added support for RSS ping-notifications of http://yahoo.com/. + * made the ping module ping pingomatic.com which, in turn, will ping all the major ping services. - flood control mechanism: * added a mechanism to throttle certain operations. - usability: diff --git a/modules/ping.module b/modules/ping.module index 14310fdc3..eaa74d230 100644 --- a/modules/ping.module +++ b/modules/ping.module @@ -13,15 +13,8 @@ function ping_help($section) { switch ($section) { case 'admin/help#ping': $output .= t(" - <p>Drupal can automatically send notifications (called \"pings\") to the following sites to tell them that your site has changed. To do so, Drupal implements the %weblogs-XML.</p> - <ul> - <li>%weblogs, a web site that tracks and displays links to changed weblogs and news-oriented web sites. Many services use %weblogs to determine if a site has been recently updated.</li> - <li>%weblogs-RSS for RSS, a web site that tracks and displays links to recently changed RSS feeds in XML format.</li> - <li>%blo-gs, a directory of recently updated weblogs and tools for tracking interesting weblogs, in the spirit of services like %weblogs, %blogtracker and %blogrolling. To get your Drupal site listed, %blo-gs must be informed about your site's updates. This is the job of the ping module and when installed, the administrator doesn't have to do anything to participate in the %blo-gs system.</li> - <li>%technorati, a web site that tracks links between websites in real time, and can answer the question 'who linked to me in the last hour?'</li> - <li>%yahoo users can track RSS feeds, so when it is pinged, %yahoo will immediately queue up refreshing your site's RSS feed so that it displays your latest content to its users.</li> - </ul> - <p>The ping feature requires crontab.</p>", array('%weblogs' => '<a href="http://www.weblogs.com/">Weblogs.com</a>', '%weblogs-XML' => '<a href="http://www.xmlrpc.com/weblogsCom/">'. t('XML-RPC interface of weblogs.com') .'</a>', '%weblogs-RSS' => '<a href="http://www.xmlrpc.com/weblogsComForRSS">'. t('Weblogs.Com for RSS') .'</a>', '%weblogs-RSS-changes' => '<a href="http://www.weblogs.com/rssUpdates/changes.xml">'. t('the weblogs.com for RSS') .'</a>', '%blo-gs' => '<a href="http://blo.gs/">blo.gs</a>','%blogtracker' => '<a href="http://www.dansanderson.com/blogtracker">blogtracker</a>', '%blogrolling' => '<a href="http://www.blogrolling.com">blogrolling.com</a>', '%blo-gs-XML' => '<a href="http://blo.gs/ping.php">'. t('XML-RPC interface of blo.gs').'</a>', '%technorati' => '<a href="http://www.technorati.com/">'. t("Technorati"). '</a>', '%yahoo' => '<a href="http://my.yahoo.com/">My Yahoo!</a>')); + <p>Drupal can automatically send notifications (called \"pings\") to the %pingomatic to tell them that your site has changed. In turn pingomatic.com will ping other services like weblogs.com, Technorati, blo.gs, BlogRolling, Feedster.com, Moreover, etc.</p> + <p>The ping feature requires crontab.</p>", array('%pingomatic' => '<a href="http://pingomatic.com/">')); break; case 'admin/modules#description': @@ -60,68 +53,17 @@ function _ping_notify($name, $url) { /** * Implementation of hook_ping(). * - * Notifies weblogs.com, blo.gs, and technorati.com of changes at this site. + * Notifies pingomatic.com, blo.gs, and technorati.com of changes at this site. */ function ping_ping($name = '', $url = '') { $feed = url('node/feed', NULL, NULL, TRUE); - - $client = new xmlrpc_client('/RPC2', 'rpc.weblogs.com', 80); - - $message = new xmlrpcmsg('weblogUpdates.ping', array(new xmlrpcval($name), new xmlrpcval($url))); - - $result = $client->send($message); - - if (!$result || $result->faultCode()) { - watchdog('error', t('Failed to notify weblogs.com (site).')); - } - - unset($client); - - $client = new xmlrpc_client('/RPC2', 'rssrpc.weblogs.com', 80); - - $message = new xmlrpcmsg('rssUpdate', array(new xmlrpcval($name), new xmlrpcval($feed))); - - $result = $client->send($message); - - if (!$result || $result->faultCode()) { - watchdog('error', t('Failed to notify weblogs.com (RSS).')); - } - - unset($client); - - $client = new xmlrpc_client('/', 'ping.blo.gs', 80); - - $message = new xmlrpcmsg('weblogUpdates.extendedPing', array(new xmlrpcval($name), new xmlrpcval($url), new xmlrpcval($url), new xmlrpcval($feed))); - - $result = $client->send($message); - - if (!$result || $result->faultCode()) { - watchdog('error', t('Failed to notify blo.gs.')); - } - - unset($client); - - $client = new xmlrpc_client('/rpc/ping', 'rpc.technorati.com', 80); - + $client = new xmlrpc_client('/', 'rpc.pingomatic.com', 80); $message = new xmlrpcmsg('weblogUpdates.ping', array(new xmlrpcval($name), new xmlrpcval($url))); - - $result = $client->send($message); - - if (!$result || $result->faultCode()) { - watchdog('error', t('Failed to notify technorati.com.')); - } - - unset($client); - - $client = new xmlrpc_client('/RPC2', 'api.my.yahoo.com', 80); - - $message = new xmlrpcmsg('weblogUpdates.ping', array(new xmlrpcval($name), new xmlrpcval($feed))); - $result = $client->send($message); if (!$result || $result->faultCode()) { - watchdog('error', t('Failed to notify yahoo.com.')); + watchdog('error', t('Failed to notify pingomatic.com (site).')); } } diff --git a/modules/ping/ping.module b/modules/ping/ping.module index 14310fdc3..eaa74d230 100644 --- a/modules/ping/ping.module +++ b/modules/ping/ping.module @@ -13,15 +13,8 @@ function ping_help($section) { switch ($section) { case 'admin/help#ping': $output .= t(" - <p>Drupal can automatically send notifications (called \"pings\") to the following sites to tell them that your site has changed. To do so, Drupal implements the %weblogs-XML.</p> - <ul> - <li>%weblogs, a web site that tracks and displays links to changed weblogs and news-oriented web sites. Many services use %weblogs to determine if a site has been recently updated.</li> - <li>%weblogs-RSS for RSS, a web site that tracks and displays links to recently changed RSS feeds in XML format.</li> - <li>%blo-gs, a directory of recently updated weblogs and tools for tracking interesting weblogs, in the spirit of services like %weblogs, %blogtracker and %blogrolling. To get your Drupal site listed, %blo-gs must be informed about your site's updates. This is the job of the ping module and when installed, the administrator doesn't have to do anything to participate in the %blo-gs system.</li> - <li>%technorati, a web site that tracks links between websites in real time, and can answer the question 'who linked to me in the last hour?'</li> - <li>%yahoo users can track RSS feeds, so when it is pinged, %yahoo will immediately queue up refreshing your site's RSS feed so that it displays your latest content to its users.</li> - </ul> - <p>The ping feature requires crontab.</p>", array('%weblogs' => '<a href="http://www.weblogs.com/">Weblogs.com</a>', '%weblogs-XML' => '<a href="http://www.xmlrpc.com/weblogsCom/">'. t('XML-RPC interface of weblogs.com') .'</a>', '%weblogs-RSS' => '<a href="http://www.xmlrpc.com/weblogsComForRSS">'. t('Weblogs.Com for RSS') .'</a>', '%weblogs-RSS-changes' => '<a href="http://www.weblogs.com/rssUpdates/changes.xml">'. t('the weblogs.com for RSS') .'</a>', '%blo-gs' => '<a href="http://blo.gs/">blo.gs</a>','%blogtracker' => '<a href="http://www.dansanderson.com/blogtracker">blogtracker</a>', '%blogrolling' => '<a href="http://www.blogrolling.com">blogrolling.com</a>', '%blo-gs-XML' => '<a href="http://blo.gs/ping.php">'. t('XML-RPC interface of blo.gs').'</a>', '%technorati' => '<a href="http://www.technorati.com/">'. t("Technorati"). '</a>', '%yahoo' => '<a href="http://my.yahoo.com/">My Yahoo!</a>')); + <p>Drupal can automatically send notifications (called \"pings\") to the %pingomatic to tell them that your site has changed. In turn pingomatic.com will ping other services like weblogs.com, Technorati, blo.gs, BlogRolling, Feedster.com, Moreover, etc.</p> + <p>The ping feature requires crontab.</p>", array('%pingomatic' => '<a href="http://pingomatic.com/">')); break; case 'admin/modules#description': @@ -60,68 +53,17 @@ function _ping_notify($name, $url) { /** * Implementation of hook_ping(). * - * Notifies weblogs.com, blo.gs, and technorati.com of changes at this site. + * Notifies pingomatic.com, blo.gs, and technorati.com of changes at this site. */ function ping_ping($name = '', $url = '') { $feed = url('node/feed', NULL, NULL, TRUE); - - $client = new xmlrpc_client('/RPC2', 'rpc.weblogs.com', 80); - - $message = new xmlrpcmsg('weblogUpdates.ping', array(new xmlrpcval($name), new xmlrpcval($url))); - - $result = $client->send($message); - - if (!$result || $result->faultCode()) { - watchdog('error', t('Failed to notify weblogs.com (site).')); - } - - unset($client); - - $client = new xmlrpc_client('/RPC2', 'rssrpc.weblogs.com', 80); - - $message = new xmlrpcmsg('rssUpdate', array(new xmlrpcval($name), new xmlrpcval($feed))); - - $result = $client->send($message); - - if (!$result || $result->faultCode()) { - watchdog('error', t('Failed to notify weblogs.com (RSS).')); - } - - unset($client); - - $client = new xmlrpc_client('/', 'ping.blo.gs', 80); - - $message = new xmlrpcmsg('weblogUpdates.extendedPing', array(new xmlrpcval($name), new xmlrpcval($url), new xmlrpcval($url), new xmlrpcval($feed))); - - $result = $client->send($message); - - if (!$result || $result->faultCode()) { - watchdog('error', t('Failed to notify blo.gs.')); - } - - unset($client); - - $client = new xmlrpc_client('/rpc/ping', 'rpc.technorati.com', 80); - + $client = new xmlrpc_client('/', 'rpc.pingomatic.com', 80); $message = new xmlrpcmsg('weblogUpdates.ping', array(new xmlrpcval($name), new xmlrpcval($url))); - - $result = $client->send($message); - - if (!$result || $result->faultCode()) { - watchdog('error', t('Failed to notify technorati.com.')); - } - - unset($client); - - $client = new xmlrpc_client('/RPC2', 'api.my.yahoo.com', 80); - - $message = new xmlrpcmsg('weblogUpdates.ping', array(new xmlrpcval($name), new xmlrpcval($feed))); - $result = $client->send($message); if (!$result || $result->faultCode()) { - watchdog('error', t('Failed to notify yahoo.com.')); + watchdog('error', t('Failed to notify pingomatic.com (site).')); } } |