summaryrefslogtreecommitdiff
path: root/modules/weblogs.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2002-11-01 09:31:59 +0000
committerDries Buytaert <dries@buytaert.net>2002-11-01 09:31:59 +0000
commit9cb1bc4c22d031be2a36c978e596e6edfaf3b42f (patch)
treeb347b31c0f2aa99331126bde5f89e6ab45470b28 /modules/weblogs.module
parentc9157a233b4c7e08d1d8659125f94ae3cba53786 (diff)
downloadbrdo-9cb1bc4c22d031be2a36c978e596e6edfaf3b42f.tar.gz
brdo-9cb1bc4c22d031be2a36c978e596e6edfaf3b42f.tar.bz2
- Substituted the weblogs module with a more generic ping module. We're
now pinging http://blo.gs/ as well as support the new Weblogs.com RSS format. Thanks Breyten.
Diffstat (limited to 'modules/weblogs.module')
-rw-r--r--modules/weblogs.module45
1 files changed, 0 insertions, 45 deletions
diff --git a/modules/weblogs.module b/modules/weblogs.module
deleted file mode 100644
index 2f27e4978..000000000
--- a/modules/weblogs.module
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-// $Id$
-
-function weblogs_help() {
- $output = "<p><a href=\"http://www.weblogs.com/\">Weblogs.com</a> is a website that tracks and displays links to changed weblogs and news-oriented websites. To get your Drupal site listed, weblogs.com must be informed about your site's updates. This is the job of the weblog module and when installed, the administrator doesn't have to do anything to participate in the <a href=\"http://www.weblogs.com/\">weblogs.com system</a>. The weblog module automatically notifies weblogs.com when your site is updated. To do so, Drupal implements the <a href=\"http://www.xmlrpc.com/weblogsCom/\">XML-RPC interface of weblogs.com</a>. Requires crontab.</p>";
- return $output;
-}
-
-function weblogs_system($field){
- $system["description"] = t("Alerts weblogs.com that your site has been updated.");
- return $system[$field];
-}
-
-function weblogs_cron() {
- 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 moderate = 0 AND (created > '". variable_get("weblogs_cron_last", time()) ."' OR changed > '". variable_get("weblogs_cron_last", time()) ."')"), 1)) {
- weblogs_notify(variable_get("site_name", "") ." - ". variable_get("site_slogan", ""), path_uri());
- }
-
- variable_set("weblogs_cron_last", time());
- }
-}
-
-function weblogs_notify($name, $url) {
- $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", "failed to notify 'weblogs.com' (site)");
- }
-
- $feed = $url . drupal_url(array("mod" => "node", "op" => "feed"), "module");
- $message = new xmlrpcmsg("weblogUpdates.ping", array(new xmlrpcval($name), new xmlrpcval($feed), new xmlrpcval($feed), new xmlrpcval("rss")));
-
- $result = $client->send($message);
-
- if (!$result || $result->faultCode()) {
- watchdog("error", "failed to notify 'weblogs.com' (RSS)");
- }
-}
-
-?>