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:
The code for the widget is here:
And it is invoked on the home page 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,