XF 1.5 Last Visited

Amaury

Well-known member
Not really sure if this counts as a styling question; if it does, please move it there.

How easy would it be to implement essentially the same feature vBulletin had? Is the data already there and it just needs to be exposed similar to users viewing this thread or forum via template edits?

Last Visited.webp

In vBulletin, the last visited was based on whatever you had the online status timeout option set to—for argument's sake, let's just say the default 15 minutes. So if your last activity was at 2:56 PM and you came back at 3:28 PM, your last visited would show as 2:56 PM. Then if you came back at 3:47 PM, your last visited would show as 3:28 PM. And so on.

In XenForo, I suspect it would work a bit differently because of the relative times and such. For argument's sake, we'll again say the online status timeout is set to the default 15 minutes. Even after 15 minutes passes and you are removed from the Members Online Now block or the Current Visitors page, your activity still shows as relative until it's been 60 minutes, at which point your last visited would be set. If your last activity was at 3:44 PM and you came back at 4:45 PM, your last visited would show as 3:44 PM. However, if you then came back later at 5:32 PM, your last visited would still show as 3:44 PM because an hour hadn't passed.

If I'm not making any sense, please me know, but hopefully I made some sense in my explanation. I also probably said way more than I needed to, but I suppose too much information is better than not enough, right? :cool:

Anyway, the short version is: Is this possible in XenForo?
 
last_activity is the closest thing that I am aware of:

Code:
{xen:datetime $visitor.last_activity, 'M j, Y @ g:i A'}

(use in templates)

But this is activity that is updated hourly as you say.

vB's last visit time is different.
 
@Jake Bunce, that actually works exactly how I wanted it to! Thanks! :D

Last Visit 1.webp Last Visit 2.webp

Although I did simplify it a bit so the time is relative:

Code:
{xen:datetime $visitor.last_activity}

Now, question: Is this only viewable by registered members? I don't really see guests needing it.
 
Perfect, @Jake Bunce! Good thing I did, anyway, as it was showing as 12/31/1969 for guests! :eek:

One final question: How can I add a browser tooltip when hovering that provides the absolute value like other areas of similar nature, such as the member card?

Browser Tooltip.webp
 
Top Bottom