forked from e107inc/guestbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
e_notify.php
55 lines (43 loc) · 1.4 KB
/
e_notify.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
<?php
if (!defined('e107_INIT')) { exit; }
if(e_LANGUAGE != "English" && file_exists(e_PLUGIN . "guestbook/languages/".e_LANGUAGE.".php"))
// OLD Gustbook notify
/*{
include_once(e_PLUGIN."guestbook/languages/".e_LANGUAGE.".php");
}
else
{
include_once(e_PLUGIN."guestbook/languages/English.php");
}
$config_category = GB_LAN_NT_1;
$config_events = array('guestbookpost' => GB_LAN_NT_2);
if (!function_exists('notify_guestbookpost')) {
function notify_guestbookpost($data) {
global $nt;
include_lan(e_PLUGIN."guestbook/languages/".e_LANGUAGE.".php");
$message = GB_LAN_NT_3.': '.$data['name'].' ('.GB_LAN_NT_4.': '.$data['ip'].' )<br />';
$message .= GB_LAN_NT_5.':<br />'.$data['gmessage'].'<br /><br />';
$nt -> send('guestbookpost', GB_LAN_NT_6, $message);
}
}*/
// v2.x Standard
//class guestbook_notify extends notify // plugin-folder + '_notify'
{
function config()
{
$config = array();
$config[] = array(
'name' => GB_LAN_NT_2, // "Message posted"
'function' => "guestbookpost",
'category' => 'GB_LAN_NT_1'
);
return $config;
}
function guestbookpost($data)
{
$message = GB_LAN_NT_3.': '.USERNAME.' ('.LAN_IP.': '.e107::getIPHandler()->ipDecode($data['ip']).' )<br />';
$message .= GB_LAN_NT_5.':<br />'.$data['gmessage'].'<br /><br />';
$this->send('guestbookpost', GB_LAN_NT_6, $message);
}
}
?>