1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 01:54:12 +02:00

Closes #756 v2 standards for user profile.

This commit is contained in:
Cameron
2014-10-14 12:51:51 -07:00
parent ca3be14770
commit 69c69f14ae
6 changed files with 99 additions and 42 deletions

View File

@@ -14,7 +14,7 @@ if (!defined('e107_INIT')) { exit; }
class chatbox_menu_user // plugin-folder + '_user'
{
function profile()
function profile($udata)
{
if(!$chatposts = e107::getRegistry('total_chatposts'))
@@ -27,9 +27,11 @@ class chatbox_menu_user // plugin-folder + '_user'
e107::setRegistry('total_chatposts', $chatposts);
}
$perc = ($chatposts > 0) ? round(($udata['user_chats']/$chatposts) * 100, 2) : 0;
$var = array(
0 => array('label' => LAN_PLUGIN_CHATBOX_MENU_POST, 'text' => $chatposts)
0 => array('label' => LAN_PLUGIN_CHATBOX_MENU_POSTS, 'text' => $udata['user_chats']." ( ".$perc."% )")
);
return $var;