You are here

README.txt in Node expire 8

Same filename and directory in other branches
  1. 5 README.txt
  2. 6.2 README.txt
  3. 6 README.txt
  4. 7.2 README.txt
  5. 7 README.txt
NODE EXPIRE
===========

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.

All this power is possible due Rules module. On each cron, Node expire scan for
expired content and let Rules module work with it. You can select several
actions to perform with these nodes.

If using Date Popup of Date module, the date field will activate a Date Popup
widget in order to make the process easier and more fun.

If using Views module, all data will be exported, allowing you to build
custom lists.


INSTALL
=======

This module is not (YET at least) compatible with previous versions.
So its only indicated to new sites.

7.x branch is self-compatible and every effort will be made to keep
it in this state.


USAGE
=====

The first thing you should do is give the proper permissions:
"administer node expire" will allow you to enable the feature on node types
and put a default value. "edit node expire" will allow you to put
the real date on nodes.

Then you should go to admin/content/types and configure the node type
that will use expiration feature. Under "Publishing options"
("Workflow settings" in Drupal 6), put the default expiration date
using PHP strtotime format.

Now, all users that have "edit node expire" will be able to select a different
expiration date during node creation/editing. If not, the default value will be
used. Note that if the user edit the node, the expiration date will not change.

In Drupal 7 version some parameters of the module can be configured within 
a configuration section. It is located in "Workflow" area under Rules module 
configuration section.


CREDITS
=======

Daryl Houston     <daryl@learnhouston.com> (Original author)
Andrew Langland                            (D5-dev and D6-dev rewrite)
Bruno Massa                                (D6 v2 rewrite)
Nik Alexandrov                             (D7-dev rewrite)


RULES MODULE EXAMPLE
====================

For those people that want to use this module quickly, import the code below on
admin/rules/ie/import and it will automatically configure it to unpublish the
content once it expires. Just paste it and have fun.

-------------------------------------------------------------------------------
"Content expired unpublish".

{ "rules_content_expired_unpublish" : {
    "LABEL" : "Content expired unpublish",
    "PLUGIN" : "reaction rule",
    "ACTIVE" : false,
    "REQUIRES" : [ "node_expire", "rules" ],
    "ON" : [ "node_expired" ],
    "IF" : [ { "node_expire_rules_expired_check" : { "node" : [ "node" ] } } ],
    "DO" : [ { "node_unpublish" : { "node" : [ "node" ] } } ]
  }
}


RULES MODULE EXTRA EXAMPLES FOR TESTING
=======================================

Below are some more rules, which are handy for testing. By enabling/disabling
those rules you can publish/unpublish or promote/unpromote content
to front page.
Just enable necessary rules, run cron and see the result. It is helpful during 
the tests to turn on an option "Allow expire date in the past" in the module 
configuration section.  


-------------------------------------------------------------------------------
"Content expired publish".

{ "rules_content_expired_publish" : {
    "LABEL" : "Content expired publish",
    "PLUGIN" : "reaction rule",
    "ACTIVE" : false,
    "REQUIRES" : [ "node_expire", "rules" ],
    "ON" : [ "node_expired" ],
    "IF" : [ { "node_expire_rules_expired_check" : { "node" : [ "node" ] } } ],
    "DO" : [ { "node_publish" : { "node" : [ "node" ] } } ]
  }
}


-------------------------------------------------------------------------------
"Content expired remove from front page".

{ "rules_content_expired_remove_from_front_page" : {
    "LABEL" : "Content expired remove from front page",
    "PLUGIN" : "reaction rule",
    "REQUIRES" : [ "node_expire", "rules" ],
    "ON" : [ "node_expired" ],
    "IF" : [ { "node_expire_rules_expired_check" : { "node" : [ "node" ] } } ],
    "DO" : [ { "node_unpromote" : { "node" : [ "node" ] } } ]
  }
}

-------------------------------------------------------------------------------
"Content expired promote to front page".

{ "rules_content_expired_promote_to_front_page" : {
    "LABEL" : "Content expired promote to front page",
    "PLUGIN" : "reaction rule",
    "ACTIVE" : false,
    "REQUIRES" : [ "node_expire", "rules" ],
    "ON" : [ "node_expired" ],
    "IF" : [ { "node_expire_rules_expired_check" : { "node" : [ "node" ] } } ],
    "DO" : [
      { "node_expire_unset_expired" : { "node" : [ "node" ] } },
      { "node_promote" : { "node" : [ "node" ] } }
    ]
  }
}

File

README.txt
View source
  1. NODE EXPIRE
  2. ===========
  3. This module allows you to set a "timer" into content nodes. When it reaches
  4. zero, you can perform any type of action with the node, such as unpublishing
  5. it or sending an email to the author.
  6. All this power is possible due Rules module. On each cron, Node expire scan for
  7. expired content and let Rules module work with it. You can select several
  8. actions to perform with these nodes.
  9. If using Date Popup of Date module, the date field will activate a Date Popup
  10. widget in order to make the process easier and more fun.
  11. If using Views module, all data will be exported, allowing you to build
  12. custom lists.
  13. INSTALL
  14. =======
  15. This module is not (YET at least) compatible with previous versions.
  16. So its only indicated to new sites.
  17. 7.x branch is self-compatible and every effort will be made to keep
  18. it in this state.
  19. USAGE
  20. =====
  21. The first thing you should do is give the proper permissions:
  22. "administer node expire" will allow you to enable the feature on node types
  23. and put a default value. "edit node expire" will allow you to put
  24. the real date on nodes.
  25. Then you should go to admin/content/types and configure the node type
  26. that will use expiration feature. Under "Publishing options"
  27. ("Workflow settings" in Drupal 6), put the default expiration date
  28. using PHP strtotime format.
  29. Now, all users that have "edit node expire" will be able to select a different
  30. expiration date during node creation/editing. If not, the default value will be
  31. used. Note that if the user edit the node, the expiration date will not change.
  32. In Drupal 7 version some parameters of the module can be configured within
  33. a configuration section. It is located in "Workflow" area under Rules module
  34. configuration section.
  35. CREDITS
  36. =======
  37. Daryl Houston (Original author)
  38. Andrew Langland (D5-dev and D6-dev rewrite)
  39. Bruno Massa (D6 v2 rewrite)
  40. Nik Alexandrov (D7-dev rewrite)
  41. RULES MODULE EXAMPLE
  42. ====================
  43. For those people that want to use this module quickly, import the code below on
  44. admin/rules/ie/import and it will automatically configure it to unpublish the
  45. content once it expires. Just paste it and have fun.
  46. -------------------------------------------------------------------------------
  47. "Content expired unpublish".
  48. { "rules_content_expired_unpublish" : {
  49. "LABEL" : "Content expired unpublish",
  50. "PLUGIN" : "reaction rule",
  51. "ACTIVE" : false,
  52. "REQUIRES" : [ "node_expire", "rules" ],
  53. "ON" : [ "node_expired" ],
  54. "IF" : [ { "node_expire_rules_expired_check" : { "node" : [ "node" ] } } ],
  55. "DO" : [ { "node_unpublish" : { "node" : [ "node" ] } } ]
  56. }
  57. }
  58. RULES MODULE EXTRA EXAMPLES FOR TESTING
  59. =======================================
  60. Below are some more rules, which are handy for testing. By enabling/disabling
  61. those rules you can publish/unpublish or promote/unpromote content
  62. to front page.
  63. Just enable necessary rules, run cron and see the result. It is helpful during
  64. the tests to turn on an option "Allow expire date in the past" in the module
  65. configuration section.
  66. -------------------------------------------------------------------------------
  67. "Content expired publish".
  68. { "rules_content_expired_publish" : {
  69. "LABEL" : "Content expired publish",
  70. "PLUGIN" : "reaction rule",
  71. "ACTIVE" : false,
  72. "REQUIRES" : [ "node_expire", "rules" ],
  73. "ON" : [ "node_expired" ],
  74. "IF" : [ { "node_expire_rules_expired_check" : { "node" : [ "node" ] } } ],
  75. "DO" : [ { "node_publish" : { "node" : [ "node" ] } } ]
  76. }
  77. }
  78. -------------------------------------------------------------------------------
  79. "Content expired remove from front page".
  80. { "rules_content_expired_remove_from_front_page" : {
  81. "LABEL" : "Content expired remove from front page",
  82. "PLUGIN" : "reaction rule",
  83. "REQUIRES" : [ "node_expire", "rules" ],
  84. "ON" : [ "node_expired" ],
  85. "IF" : [ { "node_expire_rules_expired_check" : { "node" : [ "node" ] } } ],
  86. "DO" : [ { "node_unpromote" : { "node" : [ "node" ] } } ]
  87. }
  88. }
  89. -------------------------------------------------------------------------------
  90. "Content expired promote to front page".
  91. { "rules_content_expired_promote_to_front_page" : {
  92. "LABEL" : "Content expired promote to front page",
  93. "PLUGIN" : "reaction rule",
  94. "ACTIVE" : false,
  95. "REQUIRES" : [ "node_expire", "rules" ],
  96. "ON" : [ "node_expired" ],
  97. "IF" : [ { "node_expire_rules_expired_check" : { "node" : [ "node" ] } } ],
  98. "DO" : [
  99. { "node_expire_unset_expired" : { "node" : [ "node" ] } },
  100. { "node_promote" : { "node" : [ "node" ] } }
  101. ]
  102. }
  103. }