POPULAR THIS WEEK LISTING

24 views
Skip to first unread message

angga adhitya putra

unread,
Jul 21, 2021, 12:19:49 AM7/21/21
to AtoM Users
hi , i am angga
from archive indonesia,

can i ask from which table in the database, to display this POPULAR THIS WEEK LISTING data?

thanku you very much

Dan Gillean

unread,
Jul 23, 2021, 1:40:59 PM7/23/21
to ICA-AtoM Users
Hi Angga, 

I'm pretty sure that there is not a specific database table that is used for the Popular this week widget - instead, it is a PHP function that selects from the standard tables based on a simple page view count.  After some investigation, I have learned that the page view count is coming from the access_log table - see below for more information. 

We have basic information on how the Popular This Week widget works in the User manual, here: 
There is an older thread in the forum that asks a similar question about where the data comes from. We never did post back a full answer from the looks of it - but by doing a bit of searching, I have found this function: 
So it appears that it is using information from the access_log table to help determine basic page view information. The access_log table in AtoM is basically a simple key-value pair of object ID and access date: 

mysql> describe access_log;
+-------------+----------+------+-----+---------+----------------+
| Field       | Type     | Null | Key | Default | Extra          |
+-------------+----------+------+-----+---------+----------------+
| id          | int      | NO   | PRI | NULL    | auto_increment |
| object_id   | int      | NO   | MUL | NULL    |                |
| access_date | datetime | YES  | MUL | NULL    |                |
+-------------+----------+------+-----+---------+----------------+
3 rows in set (0.00 sec)


Also, there are several code snippets in the forum thread I mentioned, showing how you could change this widget to display a list of newest additions. Hopefully by looking at the changes it might help you better understand the current code? See the full thread here: 
I hope this helps! 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/1441b480-1f7a-481e-a374-ad30b3964b87n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages