mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Issue #756 - User Profile addon standard for v2 added. Not yet fully implemented.
This commit is contained in:
38
e107_plugins/chatbox_menu/e_user.php
Normal file
38
e107_plugins/chatbox_menu/e_user.php
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* e107 website system
|
||||||
|
*
|
||||||
|
* Copyright (C) 2008-2014 e107 Inc (e107.org)
|
||||||
|
* Released under the terms and conditions of the
|
||||||
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!defined('e107_INIT')) { exit; }
|
||||||
|
|
||||||
|
// v2.x Standard
|
||||||
|
class chatbox_menu_user // plugin-folder + '_user'
|
||||||
|
{
|
||||||
|
|
||||||
|
function profile()
|
||||||
|
{
|
||||||
|
|
||||||
|
if(!$chatposts = e107::getRegistry('total_chatposts'))
|
||||||
|
{
|
||||||
|
$chatposts = 0; // In case plugin not installed
|
||||||
|
if(e107::isInstalled("chatbox_menu"))
|
||||||
|
{
|
||||||
|
$chatposts = e107::getDb()->count("chatbox");
|
||||||
|
}
|
||||||
|
e107::setRegistry('total_chatposts', $chatposts);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$var = array(
|
||||||
|
0 => array('label' => LAN_PLUGIN_CHATBOX_MENU_POST, 'text' => $chatposts)
|
||||||
|
);
|
||||||
|
|
||||||
|
return $var;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
define("LAN_PLUGIN_CHATBOX_MENU_NAME", "Chatbox");
|
define("LAN_PLUGIN_CHATBOX_MENU_NAME", "Chatbox");
|
||||||
define("LAN_PLUGIN_CHATBOX_MENU_DESCRIPTION", "Chatbox Menu");
|
define("LAN_PLUGIN_CHATBOX_MENU_DESCRIPTION", "Chatbox Menu");
|
||||||
|
define("LAN_PLUGIN_CHATBOX_MENU_POSTS", "Chatbox Posts");
|
||||||
|
|
||||||
// Admin Log
|
// Admin Log
|
||||||
//FIXME - Global LANS must begin with LAN_PLUGIN_{FOLDER_NAME}_
|
//FIXME - Global LANS must begin with LAN_PLUGIN_{FOLDER_NAME}_
|
||||||
|
Reference in New Issue
Block a user