MyBB Community Forums

Full Version: Last posting and last online on member-list?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Can someone tell me how to ad those two things, on the member-list, please? Big Grin
(When the members last have posted, and when he/she last have been online at the forum).
No replies Sad

IS it very difficult to do, or is it just because, I have been unlucky, and no of this forums skilled people have seen my question?
Or maybe I didn’t make myself understandable? Sad

If it is easier to put this information’s on the statistic-page, then that be ok as well.
Open memberlist template

Find (2x)
colspan="6"

Change into
colspan="8"

Find
<td class="tcat"><span class="smalltext"><strong>{$lang->posts}</strong></span></td>

Add below
<td class="tcat"><span class="smalltext"><strong>Last Posting</strong></span></td>
<td class="tcat"><span class="smalltext"><strong>Last Seen</strong></span></td>

Open memberlist_row template

Find
<td class="trow2">{$users['postnum']}</td>

Add below
<td class="trow1">{$users['lastactive']}</td>
<td class="trow2">{$users['lastpost']}</td>

Open memberlist.php

Find
		eval("\$member .= \"".$templates->get("memberlist_row")."\";");	

Add above
		if($users['lastpost'] != 0)
		{
			$users['lastpost'] = my_date($mybb->settings['timeformat'], $users['lastpost'])." ".my_date($mybb->settings['dateformat'], $users['lastpost']);
		}
		else
		{
			$users['lastpost'] = "";
		}
		if($users['lastactive'] != 0)
		{
			$users['lastactive'] = my_date($mybb->settings['timeformat'], $users['lastactive'])." ".my_date($mybb->settings['dateformat'], $users['lastactive']);
		}
		else
		{
			$users['lastactive'] = "";
		}
That did the trick perfectly [Image: a035.gif]

Thanks a lot LeX- [Image: a115.gif]

(the 'last posting'-text was over the 'last seen'-colum, and 'last seen' over 'last posting' but I was able to fix that myself Smile)

One more ting, can you please help me to make it so, that I also can sort the list by 'last seen' and by 'last posting' ? [Image: a055.gif]
I followed to the letter but when I go to click the following screen, the dates are just numbers
in "Usergroups page"
mister_don Wrote:I followed to the letter but when I go to click the following screen, the dates are just numbers
in "Usergroups page"

You did the modification in memberlist.php ? You probably just did the templatechanges; cause those are the timestamps directly from the DB.
in the Members list works well,
But in usergroup page is not working well
That for you need to modify groups.php
Suggere thing you can change because 'I am not very practical?
Open groups.php
Find
	$post = &$users;

Add the same code as in this post below it.
Pages: 1 2