Thursday 01 January 2004 10:56:52 am
Hi Willie,
sounds like a reasonable solution for your request.
I think, you should try to NOT change the core files, but just introduce a new workflow, which you should trigger before (or after) viewing content. When we assume, that the user is redirected to some "content" page (which usually is true), you could also handle the login counting in your workflow. You'd probably need to find some way to find out, if you already counted the current login... probably by storing some sessions information.
Pseudo-Code:
1 Check in the for for the latest login of the current user.
2 If there is an entry in the DB, check for the stored session and compare it to the current session
3. If there is no DB entry yet OR the stored session is not the current session, store that login (time) and increase the login counter for the user 4. Store the information: This user has seen this node at this time
Of course the session-checking will be some ugly overhead, but I think, there is no "after-login" trigger, that you could use. Beware: You will create quite some data, so think of ways to analyse and clean your data from time to time. BTW: I'm very much interessted, if you manage to get something going there, as this (user tracking) is of interrest for me, too.
Marco
http://www.hyperroad-design.com
|