/[drupal]/contributions/modules/node_expire/README.txt
ViewVC logotype

Contents of /contributions/modules/node_expire/README.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.10 - (show annotations) (download)
Sat Jan 31 00:29:59 2009 UTC (9 months, 3 weeks ago) by brmassa
Branch: MAIN
CVS Tags: DRUPAL-6--2-03, HEAD
Changes since 1.9: +62 -1 lines
File MIME type: text/plain
Documentation:
* #365839 by brmassa: Rules example included on README.txt and it can be imported
1 // $Id: README.txt,v 1.9 2009/01/29 19:59:34 brmassa Exp $
2 NODE EXPIRE
3 ===========
4
5 This module allows you to set a "timer" into content nodes. When it reaches zero,
6 you can perform any type of action with the node, such as unpublishing it or
7 sending an email to the author.
8
9 All this power is possible due Rules module. On each cron, Node Expire scan for
10 expired content and let Rules module work with it. You can select several actions
11 to perform with these nodes.
12
13 If using jQuery UI module, the date field will activate a Calendar widget in order
14 to make the process easier and more fun.
15
16 If using Views module, all data will be exported, allowing you to build custom lists.
17
18
19 INSTALL
20 =======
21
22 This module is not (YET at least) compatible with previous versions. So its only
23 indicated to new sites.
24
25
26 USAGE
27 =====
28
29 The first thing you shuold do is give the proper permissions: "administer node expire"
30 will allow you to enable the feature on node types and put a default value. "edit
31 node expire" will allow you to put the real date on nodes.
32
33 Then you should go to admin/content/types and should the node type that will use
34 expiration feature. Under "Workflow settings", put the default expiration date
35 using PHP strtotime format.
36
37 Now, all users that have "edit node expire" will be able to select a diferent
38 expiration date during node creation/editing. If not, the default value will be
39 used. Note that if the user edit the node, the expiration date will not change.
40
41
42 CREDITS
43 =======
44
45 Daryl Houston <daryl@learnhouston.com> (Original author)
46 Andrew Langland (D5-dev and D6-dev rewrite)
47 Bruno Massa (D6 v2 rewrite)
48
49
50 RULES MODULE EXAMPLE
51 ====================
52
53 For those people that want to use this module quickly, import the code below on
54 admin/rules/ie/import and it will automatically configure it to unpublish the
55 content once it expires. Just paste it and have fun.
56
57 array (
58 'rules' =>
59 array (
60 'rules_6' =>
61 array (
62 '#type' => 'rule',
63 '#set' => 'event_node_expired',
64 '#label' => 'Content expired',
65 '#active' => 1,
66 '#weight' => '0',
67 '#status' => 'custom',
68 '#conditions' =>
69 array (
70 ),
71 '#actions' =>
72 array (
73 0 =>
74 array (
75 '#weight' => 0,
76 '#info' =>
77 array (
78 'label' => 'Unpublish content expired',
79 'module' => 'Node',
80 'arguments' =>
81 array (
82 'node' =>
83 array (
84 'label' => 'Content',
85 'type' => 'node',
86 ),
87 ),
88 'base' => 'rules_core_action_execute',
89 'action_name' => 'node_unpublish_action',
90 'configurable' => false,
91 'label callback' => 'rules_core_node_label_callback',
92 'label_skeleton' => 'Unpublish @node',
93 ),
94 '#name' => 'rules_core_node_unpublish_action',
95 '#settings' =>
96 array (
97 'auto_save' => 1,
98 '#argument map' =>
99 array (
100 'node' => 'node',
101 ),
102 ),
103 '#type' => 'action',
104 ),
105 ),
106 ),
107 ),
108 )

  ViewVC Help
Powered by ViewVC 1.1.2