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
|