diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-03-05 20:15:17 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-03-05 20:15:17 +0000 |
commit | e3d2c46f04b2d510e60a3266f2b3bc2e4550eb85 (patch) | |
tree | 1cfc69a63a182f2e60fdbc9c0ea9a1fbafc9bdd5 /modules/weblogs.module | |
parent | f8372fa3067ffb12fbfa944c2f0048646796d4bd (diff) | |
download | brdo-e3d2c46f04b2d510e60a3266f2b3bc2e4550eb85.tar.gz brdo-e3d2c46f04b2d510e60a3266f2b3bc2e4550eb85.tar.bz2 |
- applied search patch.
- added who is online block.
- made weblog module more configurable.
- users may now delete their own accounts (Feature #8)
- users may now request a password using email address *or* username.
formerly required both items to match an account which was onerous.
- the link to request a new password is now presented whenever a user
fails login.
- there is now a confirmation message after submitting edits to your
user information.
- error messages in user.module may now be stylized by themes.
- <hook>_form has a $param setting you can fill with form parameters.
- improved wording for a few config settings.
- fixed various non-coding standard things.
Diffstat (limited to 'modules/weblogs.module')
-rw-r--r-- | modules/weblogs.module | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/modules/weblogs.module b/modules/weblogs.module index c4f06ea3f..3619124bf 100644 --- a/modules/weblogs.module +++ b/modules/weblogs.module @@ -1,6 +1,12 @@ <?php // $Id$ +function weblogs_conf_options() { + $output .= form_select("Weblogs ping", "weblogs_ping", variable_get("weblogs_ping", 0), array("Disabled", "Enabled"), "Enabling Weblogs ping will inform <a href=\"http://www.weblogs.com/\">Weblogs.com</a> when your site updates."); + + return $output; +} + function weblogs_help() { $output .= "<p><a href=\"http://www.weblogs.com/\">Weblogs.com</a> is a website that tracks and displays updates to 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>.</p>"; return $output; @@ -8,11 +14,13 @@ function weblogs_help() { function weblogs_cron() { - 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", "drupal") ." - ". variable_get("site_slogan", ""), path_uri()); - } + if (variable_get("weblogs_ping", 0) && variable_get("site_name", 0) && variable_get("site_url", 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", ""), variable_get("site_url", "")); + } - variable_set("weblogs_cron_last", time()); + variable_set("weblogs_cron_last", time()); + } } function weblogs_notify($name, $url) { |