summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-07-12 14:30:10 +0000
committerDries Buytaert <dries@buytaert.net>2006-07-12 14:30:10 +0000
commit63fbce82b2b24d4c3542373a4c842f2c6399101c (patch)
treef42a87f37b84c69e7de7e984eb87cbec3851988b /modules
parent39d5c86da8628c7a17cd6d7b6830dd7f73a4b345 (diff)
downloadbrdo-63fbce82b2b24d4c3542373a4c842f2c6399101c.tar.gz
brdo-63fbce82b2b24d4c3542373a4c842f2c6399101c.tar.bz2
#64280: Renamed from ping.module to ping/ping.module
Diffstat (limited to 'modules')
-rw-r--r--modules/ping.module68
1 files changed, 0 insertions, 68 deletions
diff --git a/modules/ping.module b/modules/ping.module
deleted file mode 100644
index 258639ef7..000000000
--- a/modules/ping.module
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-// $Id$
-
-/**
- * @file
- * Alerts other sites that your site has been updated.
- */
-
-/**
- * Implementation of hook_help().
- */
-function ping_help($section) {
- switch ($section) {
- case 'admin/help#ping':
- $output = '<p>'. t('The ping module is useful for notifying interested sites that your site has changed. It automatically sends notifications (called "pings") to the <a href="%external-http-pingomatic-com">pingomatic</a> service to tell it that your site has changed. In turn pingomatic will ping other services such as weblogs.com, Technorati, blo.gs, BlogRolling, Feedster.com, Moreover, etc.', array('%external-http-pingomatic-com' => 'http://pingomatic.com/')) .'</p>';
- $output .= '<p>'. t('The ping module requires <code>cron</code> or a similar periodic job scheduler to be enabled.') .'</p>';
- $output .= t('<p>You can:</p>
-<ul>
-<li> enable or disable the ping module at <a href="%admin-modules">administer &gt;&gt; modules</a>.</li>
-<li>run your cron job at your sites <a href="%file-cron">cron page</a>.</li>
-<li>read about <a href="%external-http-drupal-org-node-23714">configuring cron jobs</a>.</li>
-</ul></p>
-', array('%admin-modules' => url('admin/modules'), '%file-cron' => 'cron.php', '%external-http-drupal-org-node-23714' => 'http://drupal.org/node/23714'));
- $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%ping">Ping page</a>.', array('%ping' => 'http://drupal.org/handbook/modules/ping/')) .'</p>';
- return $output;
- case 'admin/modules#description':
- return t('Alerts other sites when your site has been updated.');
- }
-}
-
-/**
- * Implementation of hook_cron().
- *
- * Fire off notifications of updates to remote sites.
- */
-function ping_cron() {
- global $base_url;
-
- if (variable_get('site_name', 0) && variable_get('site_slogan', 0)) {
- if (db_num_rows(db_query("SELECT nid FROM {node} WHERE status = 1 AND (created > '". variable_get('cron_last', time()) ."' OR changed > '". variable_get('cron_last', time()) ."')"))) {
- _ping_notify(variable_get('site_name', '') .' - '. variable_get('site_slogan', ''), $base_url);
- }
- }
-}
-
-/**
- * Call hook_ping() in all modules to notify remote sites that there is
- * new content at this one.
- */
-function _ping_notify($name, $url) {
- module_invoke_all('ping', $name, $url);
-}
-
-/**
- * Implementation of hook_ping().
- *
- * Notifies pingomatic.com, blo.gs, and technorati.com of changes at this site.
- */
-function ping_ping($name = '', $url = '') {
-
- $result = xmlrpc('http://rpc.pingomatic.com', 'weblogUpdates.ping', $name, $url);
-
- if ($result === FALSE) {
- watchdog('directory ping', t('Failed to notify pingomatic.com (site).'), WATCHDOG_WARNING);
- }
-}
-
-