Update "last seen"

Lu Jia

Active member
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
 
you need a static method getSessionActivityDetailsForList(array $activities) inside of your controller.
 
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?
 
Back
Top Bottom