MyBB Community Forums

Full Version: Finding User Info
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Where could I find the info in red circle in this attached file.
Thanx Smile
Sorry, I don't understand your question?
For Reputation, Look in reputation.php
For Online info, Look below. Its in the functions.php file, but here it is below:

// Determine the status to show for the user (Online/Offline/Away)
		$timecut = time() - $settings['wolcutoff'];
		if($post['lastactive'] > $timecut && ($post['invisible'] != "yes" || $mybbgroup['canviewwolinvis'] == "yes") && $post['lastvisit'] != $post['lastactive'])
		{
			eval("\$onlinestatus = \"".$templates->get("postbit_online")."\";");
		}
		else
		{
			if($post['away'] == "yes" && $settings['allowaway'] != "no")
			{
				eval("\$onlinestatus = \"".$templates->get("postbit_away")."\";");
			}
			else
			{
				eval("\$onlinestatus = \"".$templates->get("postbit_offline")."\";");
			}
		}
Installaboard Wrote:For Online info, Look below. Its in the functions.php file, but here it is below:

Thanx, but I couldn't find functions.php in ACP. Is it really there? Actually I need code snippet of user's status to show it on user's profile.
to get into functions.php you'll need to access the forum directory though FTP and you'll need to dl your functions.php.

./inc/functions.php/

thats where it is located.
I will prefer to have a copy-&-Paste guide to show user status (online/offline) on user profile page. Any help will be highly welcomed Smile
It doesn't look to be taking someone with knowledge more than 5 mintues to explain the proceedure, but perhaps we wanted to show that we are an unhelpful community! I feel sad today Sad
In member.php, find:
	if($customfields)
	{
		eval("\$profilefields = \"".$templates->get("member_profile_customfields")."\";");
	}

Below it add:
		$timecut = time() - $settings['wolcutoff'];
		if($memprofile['lastactive'] > $timecut && ($memprofile['invisible'] != "yes" || $mybbgroup['canviewwolinvis'] == "yes") && $memprofile['lastvisit'] != $memprofile['lastactive'])
		{
			eval("\$onlinestatus = \"".$templates->get("postbit_online")."\";");
		}
		else
		{
			if($post['away'] == "yes" && $settings['allowaway'] != "no")
			{
				eval("\$onlinestatus = \"".$templates->get("postbit_away")."\";");
			}
			else
			{
				eval("\$onlinestatus = \"".$templates->get("postbit_offline")."\";");
			}
		}


Then add $onlinestatus to the member_profile template.

Chris.
Thanks for this. Looks like a great mod for MM's site.
Thanx Chris Smile