Node expire

Component ID

80689

Component name

Node expire

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

45933

Component created

Component changed

Component body

This module allows you to set a "timer" into content nodes. When it reaches zero, you can perform any type of action with the node, such as unpublishing it or sending an email to the author.

Features

  • Perform custom actions when the nodes expire
  • Granular permissions: let only some users to modify the node expiration date
  • Date field can use jQuery Date Popup widget, if Date module is installed with Date Popup enabled
  • All data exported to Views, if enabled
  • Drupal code compliance

This module requires Rules module.

2016-Feb-21 New functionality!

Node expire patterns module is an addition to Node expire. It is performing multiple various actions with different date/time shift against node expiry date. As in the example:

Publishing an ad use-case.

  • Publish an ad (node) (3 months before expiry).
  • Send 1-st warning email with offering to extend the ad (1 week before expiry).
  • Send 2-nd warning email with offering to extend the ad (2 days before expiry).
  • Unpublish the ad and send confirmation email with offering to extend the ad (on expiry).
  • Send a follow-up email with offering to extend the ad (1 week after expiry).

Announcing an event use-case.

  • Promote an event (node) to front page (2 months before event date - expiry).
  • Send 1-st notification email (2 weeks before expiry).
  • Send 2-nd notification email (3 days before expiry).
  • Send 3-rd notification email (1 day before expiry).
  • Unpublish the event (on expiry).

Creating an appointment use-case.

  • Send 1-st notification email (2 weeks before appointment date/time - expiry).
  • Send 2-nd notification email (3 days before expiry).
  • Send 3-rd notification email (1 day before expiry).
  • Unpublish the appointment (on expiry).

Video

smthomas created a great video introduction to the module on codekarate.com.

Extras

Node expire extras module contains the following extras for Node expire.

  • "Update expiry date" Rules action. Configuration is located at
    "Structure -> Content types -> {Your Content type} -> Publishing options".
  • Tokens support. Tokens [node:expiry] and [node:expired] are available.

7.x-2.x

7.x-2.x branch has the following new features:

  • Expiry date format is configurable. Also it can contain date and time. Configuration is available via Configuration -> Workflow -> Node expire -> Format of expiry date. For example, formats like 10/18/2015 18:22 (m/d/Y H:i) or 25-05-2015 (d-m-Y) can be used. Hence, the branch has fixes for #979800: Date format and #366475: Date and time instead of just date?.
  • Rules module is no longer a requirement. It is possible to configure some basic actions directly without Rules module usage. Just go to admin/structure/types and configure the node type under the Publishing options -> Node expire -> Action to do. Possible actions are:
    • None (do nothing).
    • Invoke Rules event (with Rules module installed).
    • Node publish.
    • Node unpublish.
    • Make node sticky.
    • Make node unsticky.
    • Promote node to front page.
    • Remove node from front page.
  • The module has been completely rewritten in object-oriented Drupal 8 style. This is an intermediate stage for Drupal 8 module version. For Drupal 8 OOP (Object Oriented Programming) style in Drupal 7 version X Autoload module >=7.x-5.0 is required.

7.x-1.x branch can be upgraded to 7.x-2.x, but not vice versa. Shift back is not recommended, because some content type date settings can be lost - in 7.x-2.x they have more advanced format in order to keep date and time.

Please test the 7.x-2.x version on non-production sites first.

Both versions 7.x-1.x and 7.x-2.x are in good shape. 7.x-2.x is in yellow color just for not to force to update people, who are OK with 7.x-1.x. If it's not broke, don't fix it. But all new development is in 7.x-2.x.