Great module! I sort of made a similar module after hacking the node expire module but really like what you have done. I think I will scrap mine!

I have just been testing this module and would just like to share my initial findings.

When I receive a Expiration Warning Notification Email I notice it uses the !days - (number of days before it expired). This seems to be the AUTO_EXPIRE_DAYS value as set in the Auto Expire form for each content. If the warning email gets sent say 1 day before the node expires and the node has a 3 day expire period then the email will say something like;

Your page listing 'test' will expire in 3 days.

This can be a little confusing as it is really going to expire in 1 day. I was thinking that maybe the expiration date could be an option to add into the email so it could say something like;

Your page listing 'test' will expire on Fri, 02/11/2007 - 7:15pm

Other than that everything is looking really good at this stage.

Thanks again.

Comments

mariuss’s picture

Assigned: Unassigned » mariuss

Good point, I'll look into it. Thanks.

EvanDonovan’s picture

I took some code from the _auto_expire_expiry function to add the following variables to the _auto_expire_notify_warning function:

function _auto_expire_notify_warning($nid, $title, $type, $days, $subject, $body) {
  $args = array(
    '!type' => $type,
    '!title' => $title,
    '!url' => url('node/' . $nid, NULL, NULL, TRUE),
    '!days' => $days,
	'!date' => format_date(_auto_expire_get_expire($nid)),
	'!interval' => format_interval(_auto_expire_get_expire($nid) - time()),
    '!site' => variable_get('site_name', ''),
    '!siteurl' => url('<front>', NULL, NULL, TRUE),
  );
  
  _auto_expire_notify($nid, 'auto_expire_warning', $subject, $body, $args);
}
EvanDonovan’s picture

Any chance of this or something similar getting committed?

EvanDonovan’s picture

By the way, the D6 port I posted in #313280-13: Port to D6 includes this code.

marcvangend’s picture

Status: Active » Closed (won't fix)

Evan, thanks for your work on this.

I'm focusing on getting the D6 version ready (about time :-)) and I'm marking this as 'won't fix' now. Please re-open this issue (preferably with a patch) if this feature is still needed for Drupal 5.