Hello,
Is it possible to "
display the most popular content" and "
Display the related content" with Modx?
The idea is to have something similar as these examples on the right side of the following site:
http://pitchfork.com/news/35804-silver-jew-david-bermans-book-of-cartoons-revealed/
Thanks for you help.
Mehdi
Scuse my english...I'm swiss
Is it possible to display the most popular content within the last week? ie, the counter restarts each week, and then the popular posts are recalculated. I do not want an old, outdated post from three years ago to be on the popular posts list because it has the most cumulative visits.
-
☆ A M B ☆
- 24,524 Posts
That would require another field in the table for a timestamp, then the query to retrieve the most popular would do some math with the current timestamp.
Ooh...
I’m lacking in the PHP/MySQL skill department. Can you point me to a tutorial that can show me how to do that?
-
☆ A M B ☆
- 24,524 Posts
Not really. The way that the existing Page Hit Counter works is very simple. Ever time the page is requested the count is incremented. This means there is only one entry in the database for each document. If you want to start keeping track of when the document was requested, it would require a completely different way of doing it. Instead of just keeping a simple count, and adding to that count with each request, you would need to have a date/time entry for every request. Imagine a site that gets hundreds or thousands of page requests a day. If you have say 100 pages on your site, instead of 100 entries in the database you could have 100,000 entries every day. That is totally beyond the scope of this plugin and module.