You are here

README.txt in Node expire 6.2

Same filename and directory in other branches
  1. 8 README.txt
  2. 5 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 jQuery UI module, the date field will activate a Calendar 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.


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 should the node type that will use
expiration feature. Under "Workflow settings", 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.


CREDITS
=======

Daryl Houston     <daryl@learnhouston.com> (Original author)
Andrew Langland                            (D5-dev and D6-dev rewrite)
Bruno Massa                                (D6 v2 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.

array (
  'rules' =>
  array (
    'rules_6' =>
    array (
      '#type' => 'rule',
      '#set' => 'event_node_expired',
      '#label' => 'Content expired',
      '#active' => 1,
      '#weight' => '0',
      '#status' => 'custom',
      '#conditions' =>
      array (
      ),
      '#actions' =>
      array (
        0 =>
        array (
          '#weight' => 0,
          '#info' =>
          array (
            'label' => 'Unpublish content expired',
            'module' => 'Node',
            'arguments' =>
            array (
              'node' =>
              array (
                'label' => 'Content',
                'type' => 'node',
              ),
            ),
            'base' => 'rules_core_action_execute',
            'action_name' => 'node_unpublish_action',
            'configurable' => false,
            'label callback' => 'rules_core_node_label_callback',
            'label_skeleton' => 'Unpublish @node',
          ),
          '#name' => 'rules_core_node_unpublish_action',
          '#settings' =>
          array (
            'auto_save' => 1,
            '#argument map' =>
            array (
              'node' => 'node',
            ),
          ),
          '#type' => 'action',
        ),
      ),
    ),
  ),
)
--------------------------------------------------------------------------------------------
"Send email remainders every two weeks".

array (
  'rules' =>
  array (
    'rules_11' =>
    array (
      '#type' => 'rule',
      '#set' => 'event_node_expired',
      '#label' => 'Node expire',
      '#active' => 1,
      '#weight' => '0',
      '#categories' =>
      array (
      ),
      '#status' => 'custom',
      '#conditions' =>
      array (
        0 =>
        array (
          '#type' => 'condition',
          '#settings' =>
          array (
            '#argument map' =>
            array (
              'node' => 'node',
            ),
          ),
          '#name' => 'node_expire_rules_expired_check_lastnotify',
          '#info' =>
          array (
            'arguments' =>
            array (
              'node' =>
              array (
                'type' => 'node',
                'label' => 'Content',
              ),
            ),
            'label' => 'Content is expired: Check lastnotify',
            'module' => 'Node',
          ),
          '#weight' => 0,
        ),
      ),
      '#actions' =>
      array (
        0 =>
        array (
          '#weight' => 0,
          '#info' =>
          array (
            'label' => 'Send a mail to a user',
            'arguments' =>
            array (
              'user' =>
              array (
                'type' => 'user',
                'label' => 'Recipient',
              ),
            ),
            'module' => 'System',
            'eval input' =>
            array (
              0 => 'subject',
              1 => 'message',
              2 => 'from',
            ),
          ),
          '#name' => 'rules_action_mail_to_user',
          '#settings' =>
          array (
            'from' => '',
            'subject' => 'Remainder email',
            'message' => 'Email message',
            '#argument map' =>
            array (
              'user' => 'author',
            ),
          ),
          '#type' => 'action',
        ),
        1 =>
        array (
          '#type' => 'action',
          '#settings' =>
          array (
            '#argument map' =>
            array (
              'node' => 'node',
            ),
          ),
          '#name' => 'node_expire_update_lastnotify',
          '#info' =>
          array (
            'arguments' =>
            array (
              'node' =>
              array (
                'type' => 'node',
                'label' => 'content expired',
              ),
            ),
            'label' => 'Update lastnotify',
            'module' => 'Node',
          ),
          '#weight' => 0,
        ),
      ),
      '#version' => 6003,
    ),
  ),
)

File

README.txt
View source
  1. NODE EXPIRE
  2. ===========
  3. This module allows you to set a "timer" into content nodes. When it reaches zero,
  4. you can perform any type of action with the node, such as unpublishing it or
  5. 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 actions
  8. to perform with these nodes.
  9. If using jQuery UI module, the date field will activate a Calendar widget in order
  10. to make the process easier and more fun.
  11. If using Views module, all data will be exported, allowing you to build custom lists.
  12. INSTALL
  13. =======
  14. This module is not (YET at least) compatible with previous versions. So its only
  15. indicated to new sites.
  16. USAGE
  17. =====
  18. The first thing you should do is give the proper permissions: "administer node expire"
  19. will allow you to enable the feature on node types and put a default value. "edit
  20. node expire" will allow you to put the real date on nodes.
  21. Then you should go to admin/content/types and should the node type that will use
  22. expiration feature. Under "Workflow settings", put the default expiration date
  23. using PHP strtotime format.
  24. Now, all users that have "edit node expire" will be able to select a different
  25. expiration date during node creation/editing. If not, the default value will be
  26. used. Note that if the user edit the node, the expiration date will not change.
  27. CREDITS
  28. =======
  29. Daryl Houston (Original author)
  30. Andrew Langland (D5-dev and D6-dev rewrite)
  31. Bruno Massa (D6 v2 rewrite)
  32. RULES MODULE EXAMPLE
  33. ====================
  34. For those people that want to use this module quickly, import the code below on
  35. admin/rules/ie/import and it will automatically configure it to unpublish the
  36. content once it expires. Just paste it and have fun.
  37. array (
  38. 'rules' =>
  39. array (
  40. 'rules_6' =>
  41. array (
  42. '#type' => 'rule',
  43. '#set' => 'event_node_expired',
  44. '#label' => 'Content expired',
  45. '#active' => 1,
  46. '#weight' => '0',
  47. '#status' => 'custom',
  48. '#conditions' =>
  49. array (
  50. ),
  51. '#actions' =>
  52. array (
  53. 0 =>
  54. array (
  55. '#weight' => 0,
  56. '#info' =>
  57. array (
  58. 'label' => 'Unpublish content expired',
  59. 'module' => 'Node',
  60. 'arguments' =>
  61. array (
  62. 'node' =>
  63. array (
  64. 'label' => 'Content',
  65. 'type' => 'node',
  66. ),
  67. ),
  68. 'base' => 'rules_core_action_execute',
  69. 'action_name' => 'node_unpublish_action',
  70. 'configurable' => false,
  71. 'label callback' => 'rules_core_node_label_callback',
  72. 'label_skeleton' => 'Unpublish @node',
  73. ),
  74. '#name' => 'rules_core_node_unpublish_action',
  75. '#settings' =>
  76. array (
  77. 'auto_save' => 1,
  78. '#argument map' =>
  79. array (
  80. 'node' => 'node',
  81. ),
  82. ),
  83. '#type' => 'action',
  84. ),
  85. ),
  86. ),
  87. ),
  88. )
  89. --------------------------------------------------------------------------------------------
  90. "Send email remainders every two weeks".
  91. array (
  92. 'rules' =>
  93. array (
  94. 'rules_11' =>
  95. array (
  96. '#type' => 'rule',
  97. '#set' => 'event_node_expired',
  98. '#label' => 'Node expire',
  99. '#active' => 1,
  100. '#weight' => '0',
  101. '#categories' =>
  102. array (
  103. ),
  104. '#status' => 'custom',
  105. '#conditions' =>
  106. array (
  107. 0 =>
  108. array (
  109. '#type' => 'condition',
  110. '#settings' =>
  111. array (
  112. '#argument map' =>
  113. array (
  114. 'node' => 'node',
  115. ),
  116. ),
  117. '#name' => 'node_expire_rules_expired_check_lastnotify',
  118. '#info' =>
  119. array (
  120. 'arguments' =>
  121. array (
  122. 'node' =>
  123. array (
  124. 'type' => 'node',
  125. 'label' => 'Content',
  126. ),
  127. ),
  128. 'label' => 'Content is expired: Check lastnotify',
  129. 'module' => 'Node',
  130. ),
  131. '#weight' => 0,
  132. ),
  133. ),
  134. '#actions' =>
  135. array (
  136. 0 =>
  137. array (
  138. '#weight' => 0,
  139. '#info' =>
  140. array (
  141. 'label' => 'Send a mail to a user',
  142. 'arguments' =>
  143. array (
  144. 'user' =>
  145. array (
  146. 'type' => 'user',
  147. 'label' => 'Recipient',
  148. ),
  149. ),
  150. 'module' => 'System',
  151. 'eval input' =>
  152. array (
  153. 0 => 'subject',
  154. 1 => 'message',
  155. 2 => 'from',
  156. ),
  157. ),
  158. '#name' => 'rules_action_mail_to_user',
  159. '#settings' =>
  160. array (
  161. 'from' => '',
  162. 'subject' => 'Remainder email',
  163. 'message' => 'Email message',
  164. '#argument map' =>
  165. array (
  166. 'user' => 'author',
  167. ),
  168. ),
  169. '#type' => 'action',
  170. ),
  171. 1 =>
  172. array (
  173. '#type' => 'action',
  174. '#settings' =>
  175. array (
  176. '#argument map' =>
  177. array (
  178. 'node' => 'node',
  179. ),
  180. ),
  181. '#name' => 'node_expire_update_lastnotify',
  182. '#info' =>
  183. array (
  184. 'arguments' =>
  185. array (
  186. 'node' =>
  187. array (
  188. 'type' => 'node',
  189. 'label' => 'content expired',
  190. ),
  191. ),
  192. 'label' => 'Update lastnotify',
  193. 'module' => 'Node',
  194. ),
  195. '#weight' => 0,
  196. ),
  197. ),
  198. '#version' => 6003,
  199. ),
  200. ),
  201. )