1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-18 05:09:05 +01:00

Beginnings of forum notification events

This commit is contained in:
mcfly 2008-12-21 02:46:20 +00:00
parent 5266c6d130
commit 7738166f21
2 changed files with 124 additions and 0 deletions

View File

@ -0,0 +1,89 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2001-2008 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Forum plugin notify configuration
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/e_notify.php,v $
* $Revision: 1.1 $
* $Date: 2008-12-21 02:46:20 $
* $Author: mcfly_e107 $
*
*/
if (!defined('e107_INIT')) { exit; }
if(defined('ADMIN_PAGE') && ADMIN_PAGE === true)
{
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_notify.php');
$config_category = FORUM_NT_1;
$config_events = array(
'forum_nt' => FORUM_NT_NEWTHREAD,
'forum_ntp' => FORUM_NT_NEWTHREAD_PROB,
'forum_thread_del' => FORUM_NT_THREAD_DELETED,
'forum_thread_split' => FORUM_NT_THREAD_SPLIT,
'forum_post_del' => FORUM_NT_POST_DELETED,
'forum_post_rep' => FORUM_NT_POST_REPORTED
);
}
if (!function_exists('notify_forum_nt'))
{
function notify_forum_nt($data)
{
$e107 = e107::getInstance();
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_notify.php');
$message = 'todo';
$e107->notify->send('forum_nt', FORUM_NT_6, $message);
}
}
if (!function_exists('notify_forum_ntp'))
{
function notify_forum_ntp($data)
{
$e107 = e107::getInstance();
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_notify.php');
$message = 'todo';
$e107->notify->send('forum_ntp', FORUM_NT_7, $message);
}
}
if (!function_exists('forum_thread_del'))
{
function forum_thread_del($data)
{
$e107 = e107::getInstance();
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_notify.php');
$message = 'todo';
$e107->notify->send('forum_thread_del', FORUM_NT_8, $message);
}
}
if (!function_exists('forum_thread_split'))
{
function forum_thread_split($data)
{
$e107 = e107::getInstance();
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_notify.php');
$message = 'todo';
$e107->notify->send('forum_thread_split', FORUM_NT_8, $message);
}
}
if (!function_exists('forum_post_rep'))
{
function forum_post_rep($data)
{
$e107 = e107::getInstance();
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_notify.php');
$message = 'todo';
$e107->notify->send('forum_post_rep', FORUM_NT_9, $message);
}
}
?>

View File

@ -0,0 +1,35 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2001-2008 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Forum plugin notify language file
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/languages/English/lan_forum_notify.php,v $
* $Revision: 1.1 $
* $Date: 2008-12-21 02:46:20 $
* $Author: mcfly_e107 $
*
*/
define('FORUM_NT_1', 'Forum Events');
define('FORUM_NT_2', 'Thread');
define('FORUM_NT_3', 'Post');
define('FORUM_NT_4', 'added by');
define('FORUM_NT_5', 'moved by');
define('FORUM_NT_6', 'Forum - Thread created');
define('FORUM_NT_7', 'Forum - Thread created by new user');
define('FORUM_NT_8', 'Forum - Thread deleted');
define('FORUM_NT_9', 'Forum - Thread split');
define('FORUM_NT_10', 'Forum - Post deleted');
define('FORUM_NT_11', 'Forum - Post reported');
define('FORUM_NT_NEWTHREAD', 'New thread created');
define('FORUM_NT_NEWTHREAD_PROB', 'New thread created by probationary member');
define('FORUM_NT_THREAD_DELETED', 'Thread deleted');
define('FORUM_NT_THREAD_SPLIT', 'Thread split');
define('FORUM_NT_POST_DELETED', 'Post deleted');
define('FORUM_NT_POST_REPORTED', 'Post reported');