You are here

README.txt in Node expire 7.2

Same filename and directory in other branches
  1. 8 README.txt
  2. 5 README.txt
  3. 6.2 README.txt
  4. 6 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.

Since 7.x-2.x branch it is also possible to configure some actions directly
without Rules module usage. Just go to 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.

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-1.x branch is self-compatible. It can be upgraded to 7.x-2.x.
Shift back is not recommended, because some content type settings can be lost.


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/structure/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. Since 7.x-2.x branch it is also possible to configure some actions directly
  10. without Rules module usage. Just go to to admin/structure/types and configure
  11. the node type under the Publishing options -> Node expire -> Action to do.
  12. Possible actions are:
  13. - None (do nothing).
  14. - Invoke Rules event (with Rules module installed).
  15. - Node publish.
  16. - Node unpublish.
  17. - Make node sticky.
  18. - Make node unsticky.
  19. - Promote node to front page.
  20. - Remove node from front page.
  21. If using Date Popup of Date module, the date field will activate a Date Popup
  22. widget in order to make the process easier and more fun.
  23. If using Views module, all data will be exported, allowing you to build
  24. custom lists.
  25. INSTALL
  26. =======
  27. This module is not (YET at least) compatible with previous versions.
  28. So its only indicated to new sites.
  29. 7.x-1.x branch is self-compatible. It can be upgraded to 7.x-2.x.
  30. Shift back is not recommended, because some content type settings can be lost.
  31. USAGE
  32. =====
  33. The first thing you should do is give the proper permissions:
  34. "administer node expire" will allow you to enable the feature on node types
  35. and put a default value. "edit node expire" will allow you to put
  36. the real date on nodes.
  37. Then you should go to admin/structure/types and configure the node type
  38. that will use expiration feature. Under "Publishing options"
  39. ("Workflow settings" in Drupal 6), put the default expiration date
  40. using PHP strtotime format.
  41. Now, all users that have "edit node expire" will be able to select a different
  42. expiration date during node creation/editing. If not, the default value will be
  43. used. Note that if the user edit the node, the expiration date will not change.
  44. In Drupal 7 version some parameters of the module can be configured within
  45. a configuration section. It is located in "Workflow" area under Rules module
  46. configuration section.
  47. CREDITS
  48. =======
  49. Daryl Houston (Original author)
  50. Andrew Langland (D5-dev and D6-dev rewrite)
  51. Bruno Massa (D6 v2 rewrite)
  52. Nik Alexandrov (D7-dev rewrite)
  53. RULES MODULE EXAMPLE
  54. ====================
  55. For those people that want to use this module quickly, import the code below on
  56. admin/rules/ie/import and it will automatically configure it to unpublish the
  57. content once it expires. Just paste it and have fun.
  58. -------------------------------------------------------------------------------
  59. "Content expired unpublish".
  60. { "rules_content_expired_unpublish" : {
  61. "LABEL" : "Content expired unpublish",
  62. "PLUGIN" : "reaction rule",
  63. "ACTIVE" : false,
  64. "REQUIRES" : [ "node_expire", "rules" ],
  65. "ON" : [ "node_expired" ],
  66. "IF" : [ { "node_expire_rules_expired_check" : { "node" : [ "node" ] } } ],
  67. "DO" : [ { "node_unpublish" : { "node" : [ "node" ] } } ]
  68. }
  69. }
  70. RULES MODULE EXTRA EXAMPLES FOR TESTING
  71. =======================================
  72. Below are some more rules, which are handy for testing. By enabling/disabling
  73. those rules you can publish/unpublish or promote/unpromote content
  74. to front page.
  75. Just enable necessary rules, run cron and see the result. It is helpful during
  76. the tests to turn on an option "Allow expire date in the past" in the module
  77. configuration section.
  78. -------------------------------------------------------------------------------
  79. "Content expired publish".
  80. { "rules_content_expired_publish" : {
  81. "LABEL" : "Content expired publish",
  82. "PLUGIN" : "reaction rule",
  83. "ACTIVE" : false,
  84. "REQUIRES" : [ "node_expire", "rules" ],
  85. "ON" : [ "node_expired" ],
  86. "IF" : [ { "node_expire_rules_expired_check" : { "node" : [ "node" ] } } ],
  87. "DO" : [ { "node_publish" : { "node" : [ "node" ] } } ]
  88. }
  89. }
  90. -------------------------------------------------------------------------------
  91. "Content expired remove from front page".
  92. { "rules_content_expired_remove_from_front_page" : {
  93. "LABEL" : "Content expired remove from front page",
  94. "PLUGIN" : "reaction rule",
  95. "REQUIRES" : [ "node_expire", "rules" ],
  96. "ON" : [ "node_expired" ],
  97. "IF" : [ { "node_expire_rules_expired_check" : { "node" : [ "node" ] } } ],
  98. "DO" : [ { "node_unpromote" : { "node" : [ "node" ] } } ]
  99. }
  100. }
  101. -------------------------------------------------------------------------------
  102. "Content expired promote to front page".
  103. { "rules_content_expired_promote_to_front_page" : {
  104. "LABEL" : "Content expired promote to front page",
  105. "PLUGIN" : "reaction rule",
  106. "ACTIVE" : false,
  107. "REQUIRES" : [ "node_expire", "rules" ],
  108. "ON" : [ "node_expired" ],
  109. "IF" : [ { "node_expire_rules_expired_check" : { "node" : [ "node" ] } } ],
  110. "DO" : [
  111. { "node_expire_unset_expired" : { "node" : [ "node" ] } },
  112. { "node_promote" : { "node" : [ "node" ] } }
  113. ]
  114. }
  115. }