-
Notifications
You must be signed in to change notification settings - Fork 2
/
e_event.php
86 lines (65 loc) · 1.43 KB
/
e_event.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
/*
* Events2Bots
*
* Copyright (C) 2020 - Tijn Kuyper (Moc)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
if (!defined('e107_INIT')) { exit; }
require_once(e_PLUGIN."events2bots/e2b_class.php");
class events2bots_event
{
function config()
{
$event = array();
// User
$event[] = array(
'name' => "user_signup_submitted",
'function' => "init_e2b",
);
$event[] = array(
'name' => "user_signup_activated",
'function' => "init_e2b",
);
// $event[] = array(
// 'name' => "user_xup_signup",
// 'function' => "init_e2b",
// );
// News
$event[] = array(
'name' => "admin_news_created",
'function' => "init_e2b",
);
$event[] = array(
'name' => "admin_news_updated",
'function' => "init_e2b",
);
// Forum
$event[] = array(
'name' => "user_forum_topic_created",
'function' => "init_e2b",
);
// $event[] = array(
// 'name' => "user_forum_topic_updated",
// 'function' => "init_e2b",
// );
$event[] = array(
'name' => "user_forum_post_created",
'function' => "init_e2b",
);
// Chatbox
$event[] = array(
'name' => "user_chatbox_post_created",
'function' => "init_e2b",
);
return $event;
}
// Initialise Events2Bots class
function init_e2b($data, $eventname)
{
$events2bots = new events2bots();
$events2bots->init($eventname, $data);
}
}