1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 10:04:35 +02:00

Updated e_notify.php to v2.x spec.

This commit is contained in:
Cameron
2013-06-18 20:21:10 -07:00
parent 0a2c3402d0
commit dbf987298d
6 changed files with 145 additions and 30 deletions

View File

@@ -2,25 +2,19 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/chatbox_menu/e_notify.php,v $
* $Revision$
* $Date$
* $Author$
*/
if (!defined('e107_INIT')) { exit; }
/*
if(defined('ADMIN_PAGE') && ADMIN_PAGE === true)
{
include_lan(e_PLUGIN."chatbox_menu/languages/".e_LANGUAGE."/".e_LANGUAGE.".php");
$config_category = NT_LAN_CB_1;
$config_events = array('cboxpost' => NT_LAN_CB_2);
// $config_category = NT_LAN_CB_1;
// $config_events = array('cboxpost' => NT_LAN_CB_2);
}
@@ -33,4 +27,36 @@ if (!function_exists('notify_cboxpost')) {
$nt -> send('cboxpost', NT_LAN_CB_6, $message);
}
}
*/
// v2.x Standard
class chatbox_menu_notify extends notify // plugin-folder + '_notify'
{
function config()
{
// include_lan(e_PLUGIN."chatbox_menu/languages/".e_LANGUAGE."/".e_LANGUAGE.".php"); Use English_global.php instead.
$config = array();
$config[] = array(
'name' => NT_LAN_CB_2, // "Message posted"
'function' => "cboxpost",
'category' => ''
);
return $config;
}
function cboxpost($data)
{
include_lan(e_PLUGIN."chatbox_menu/languages/".e_LANGUAGE."/".e_LANGUAGE.".php"); // Use English_global.php instead.
$message = NT_LAN_CB_3.': '.USERNAME.' ('.NT_LAN_CB_4.': '.e107::getIPHandler()->ipDecode($data['ip']).' )<br />';
$message .= NT_LAN_CB_5.':<br />'.$data['cmessage'].'<br /><br />';
$this->send('cboxpost', NT_LAN_CB_6, $message);
}
}

View File

@@ -5,6 +5,7 @@ define("LAN_PLUGIN_CHATBOX_MENU_NAME", "Chatbox");
define("LAN_PLUGIN_CHATBOX_MENU_DESCRIPTION", "Chatbox Menu");
// Admin Log
//FIXME - Global LANS must begin with LAN_PLUGIN_{FOLDER_NAME}_
define("LAN_AL_CHBLAN_01","Chatbox settings updated");
define("LAN_AL_CHBLAN_02","Chatbox pruned");
define("LAN_AL_CHBLAN_03","Chatbox posts recalculated");