Picture ot the day

Llanddcairfyn

Joined: 2008-10-08
Posts: 7
Posted: Fri, 2009-07-03 09:51

By what table/field would I determine the last view of an image?
I found two fields in table Item, but both won't tell me, when the image was actually clicked the last time (the first is the creation date and it seems the other one it the timestamp of the first click on that image)

Login or register to post comments
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 2670
Posted: Fri, 2009-07-03 11:08

GalleryItemAttributesMap::viewCount
That would be last viewed. If you are trying to increment viewcounts by yourself gallery checks if you've viewed in the last day and won't increment if you have.
modules/core/classes/helpers/GalleryItemAttributesHelper_simple.class

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

Login or register to post comments
Llanddcairfyn

Joined: 2008-10-08
Posts: 7
Posted: Fri, 2009-07-03 11:15

As far as I see the field you're naming is the actual Count how many times the images was viewed. what I need would be the timestamp, when the images was clicked most recently.

Login or register to post comments
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 2670
Posted: Fri, 2009-07-03 11:28

Sorry, I'm just reading from the file I referenced

Quote:
/*
* For guests, we don't create a session. So the lastViewed data is not available
* for guests. Thus, rely on HTTP If-Modified-Since for guests which is admittedly
* quite unreliable. Alternatively we could store this data on the client with a
* non-session cookie but sending lastViewed data on each request could take a lot
* of bandwidth.
*/

and

Quote:
/* They viewed it within the last day, so this doesn't count */

So you said

Quote:
the first is the creation date and it seems the other one it the timestamp of the first click on that image

I'm thinking the second may be the one you are looking for. If you are trying to affect a change yourself, you may not be seeing the change

Quote:
/* They viewed it within the last day, so this doesn't count */

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

Login or register to post comments