1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

Issue #756 - User Profile addon standard for v2 added. Not yet fully implemented.

This commit is contained in:
Cameron 2014-10-03 16:39:21 -07:00
parent e636fba0be
commit a812d452d4
2 changed files with 39 additions and 0 deletions

View 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;
}
}

View File

@ -3,6 +3,7 @@
define("LAN_PLUGIN_CHATBOX_MENU_NAME", "Chatbox");
define("LAN_PLUGIN_CHATBOX_MENU_DESCRIPTION", "Chatbox Menu");
define("LAN_PLUGIN_CHATBOX_MENU_POSTS", "Chatbox Posts");
// Admin Log
//FIXME - Global LANS must begin with LAN_PLUGIN_{FOLDER_NAME}_