• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Update "last seen"

Lu Jia

Active member
#1
Hi,
I need to know how to change/update the user "last seen" message when he's using my addon.
At the moment it will appear this message

Code:
admin was last seen: Viewing unknown page
thanks in advance
 
R

ragtek

Guest
#2
you need a static method getSessionActivityDetailsForList(array $activities) inside of your controller.
 

Lu Jia

Active member
#3
public static function getSessionActivityDetailsForList(array $activities)
{
foreach (
$activities AS $key => $activity)
{
$action = $activity['controller_action'];

switch (
$action)
{
case
'Index':
return new
XenForo_Phrase('viewing...');
case
'Card':
return new
XenForo_Phrase('viewing...');
case
'Add':
return new
XenForo_Phrase('adding...');
case
'Edit':
return new
XenForo_Phrase('editing...');
case
'Delete':
return new
XenForo_Phrase('removing...');
}
}
}



I found this one, btw I haven't understand how it works.
Where can I define the case? from link?