The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Does $vbulletin->userinfo['lastvisit'] contain the login date/time for the users previous session or is that the start date/time of the current login session?
I want to show users things that have happened on site since they last visited (new members, blog entries etc) so need to know when they last used the site cheers Rich |
#2
|
||||
|
||||
![]()
I don't know the answer, but it's quite easy to find out by yourself :P
|
#3
|
||||
|
||||
![]()
yes did a test - it holds start of this session
was just being lazy ![]() suppose I will have to get the previous value at log in and use that to find all new activity since last visit unless it is already held in some other place? Rich |
#4
|
||||
|
||||
![]()
you could check the user table if anything looks like a date from last login, otherwise I suppose you've to code it yourself. It's not particularly hard.
|
#5
|
||||
|
||||
![]()
Actually the last logged in date seems to behave in a more complex way than I first thought
If you wander around the site a while then close your browser without logging out - I left it for about half an hour after that - then come back to the site and are still logged in (as you clicked 'remember me') then the lastactivity time is copied to the lastvisit time and lastactivity is set to the time you came back to the site. There appears to be some time out setting after which the site assumes you have been away and this is a new 'visit'. This is OK for what I want as lastvisit is set to time of you were last active on the site so I can use it to find the events I am interested in that have occurred since then However if you actually log out and then log back in again the lastvisit date/time is set to the time you just logged in, and the lastactivity is set a very short time (few seconds) after that. So I can't use lastvisit now to find out what has been happening in the members absence. This makes what I am trying to do more complex - any ideas? Maybe I can grab lastactivity when a log in occurs just before it is updated, save that original value in some variable - then if that variable is set (user logged in) use it for lastvisit, if it is not set (user returned to the site) then use $vbulletin->userinfo['lastvisit'] Not sure if that would work out without trying it Rich PS I haven't even looked at what happens when a new member registers! --------------- Added [DATE]1306261630[/DATE] at [TIME]1306261630[/TIME] --------------- Oh don't worry about this - I've decided it isn't really feasible - and I would be better going with a system that shows what's been happening for the previous X days in descending date order. After a certain period the events drop off the list. That's what a rival site is doing Rich |
#6
|
||||
|
||||
![]()
In the top right of the navbar where it says You last visited: it seems to always have the last time I actually visited a site. Such as right now it's 8:07 AM Sunday morning for me, it says my last visit here was 10:43 PM, EST Saturday, which is accurate.
Since I never log out I just leave the page open and do other stuff for hours at a time it seems to be able to know when I've stopped actively browsing the forum and it knows when I start actively browsing again it's a new visit. |
#7
|
|||
|
|||
![]()
Yeah.. It's based on inactivity.
|
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|