/[drupal]/contributions/modules/facebook_status/facebook_status.rules_defaults.inc
ViewVC logotype

Contents of /contributions/modules/facebook_status/facebook_status.rules_defaults.inc

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


Revision 1.1 - (show annotations) (download) (as text)
Wed Apr 29 00:23:19 2009 UTC (6 months, 4 weeks ago) by icecreamyou
Branch: MAIN
CVS Tags: DRUPAL-6--2-0-BETA2, DRUPAL-6--2-0-BETA3, HEAD
Branch point for: DRUPAL-6--2
File MIME type: text/x-php
Rules integration, including default rule sets
JS works on user page again
Flag integration including default flags
Twitter integration (two kinds)
Exposed delete method to UI
API change! theme('facebook_status_item') $status param must be object or NULL
New theme function: theme('facebook_status_flag_create', $sid)
1 <?php
2 // $Id$
3
4 /**
5 * @file
6 * Rules integration default configuration.
7 */
8
9 /**
10 * Implementation of hook_rules_defaults().
11 */
12 function facebook_status_rules_defaults() {
13 $config = array(
14 'rules' =>
15 array(
16 'facebook_status_rules_update' =>
17 array(
18 '#type' => 'rule',
19 '#set' => 'event_facebook_status_update',
20 '#label' => 'Submit Facebook-style Status',
21 '#active' => 0,
22 '#weight' => '0',
23 '#categories' =>
24 array(
25 0 => 'facebook_status',
26 ),
27 '#status' => 'default',
28 '#conditions' =>
29 array(
30 ),
31 '#actions' =>
32 array(
33 0 =>
34 array(
35 '#type' => 'action',
36 '#settings' =>
37 array(
38 'severity' => '6',
39 'type' => 'rules',
40 'message' => '<?php echo check_plain($account->name); ?> submitted the status <?php echo $new_status; ?>.',
41 'link' => '/user/<?php echo $account->uid; ?>',
42 '#eval input' =>
43 array(
44 'rules_input_evaluator_php' =>
45 array(
46 'message' =>
47 array(
48 0 => 'account',
49 1 => 'new_status',
50 ),
51 'link' =>
52 array(
53 0 => 'account',
54 ),
55 ),
56 ),
57 ),
58 '#name' => 'rules_action_watchdog',
59 '#info' =>
60 array(
61 'label' => 'Log to watchdog',
62 'module' => 'System',
63 'eval input' =>
64 array(
65 0 => 'type',
66 1 => 'message',
67 2 => 'link',
68 ),
69 ),
70 '#weight' => 0,
71 ),
72 ),
73 ),
74 'facebook_status_rules_delete' =>
75 array(
76 '#type' => 'rule',
77 '#set' => 'event_facebook_status_delete',
78 '#label' => 'Delete Facebook-style Status',
79 '#active' => 1,
80 '#weight' => '0',
81 '#categories' =>
82 array(
83 0 => 'facebook_status',
84 ),
85 '#status' => 'default',
86 '#conditions' =>
87 array(
88 ),
89 '#actions' =>
90 array(
91 0 =>
92 array(
93 '#type' => 'action',
94 '#settings' =>
95 array(
96 'message' => 'Status deleted.',
97 'error' => 0,
98 ),
99 '#name' => 'rules_action_drupal_message',
100 '#info' =>
101 array(
102 'label' => 'Show a configurable message on the site',
103 'module' => 'System',
104 'eval input' =>
105 array(
106 0 => 'message',
107 ),
108 ),
109 '#weight' => 0,
110 ),
111 ),
112 ),
113 ),
114 );
115 return $config;
116 }

  ViewVC Help
Powered by ViewVC 1.1.2