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

Update "last seen"

Discussion in 'XenForo Development Discussions' started by Lu Jia, Aug 26, 2012.

  1. Lu Jia

    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
     
  2. ragtek

    ragtek Guest

    you need a static method getSessionActivityDetailsForList(array $activities) inside of your controller.
     
  3. Lu Jia

    Lu Jia Active Member

    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?
     

Share This Page