Article ordering by popularity/hits
- Posted by TemplatePlazza (5260) Offline
Joomla doesn't record when certain articles get hits. So you can't get it without additional compoment.It would be great if Minifrontpage could go through all the published articles on the website and then select the top 5 articles with the most hits in the last 7 days.
Yes it is designed that way, based on what joomla provided.However, it appears, if you select 1 week, Minifrontpage checks for only the articles created in the last 7 days and then re-arranges them by hits.
The combination of using hits + time range is intended for using in a busy news / portal website, so you can create something like, what news is trending in a day, a week, a month and so on. If your website doesn't update that often then simply use All Time time range, or use a longer custom days such as 900 for 3 years.Another problem with this approach is that, even if you have thousands of articles, but have not created a new article in the last week then the module will be empty. Also, let's say you created 2 new articles 3 months ago, choosing 1 day, 3 days, 1 month, or "custom" days of less than 90, will not work, and even if you choose 3 months, the module will only show 2 articles instead of 5 which doesn't look good.
- Posted by testos (20) Offline
Btw, ordering by "recently touched first" throws some warning messages
foreach() argument must be of type array|object, bool given in...
Thanks.
- Posted by TemplatePlazza (5260) Offline
Please upload the file here then I will try to see how it's working.The site I'm working on right now has been offline for weeks and I was wondering why the module wasn't working. I understand what you are saying. In fact, you know much better than I do. Just that, for years, I used a popular joomla 3 module called "most popular content by date range" which did exactly what I'm talking about. Sadly, the owner abandoned the project. Here is the link: forum.joomla.org/viewtopic.php?t=826201
Yes it's a known issue with the with Joomla 4 (it works properly with J 3) I haven't decided whether to remove it or something else. But you can use option Recently Added First, that will give the same result as 'touched first' option.Hmm it looks like there's an issue with the position Recently Touched First with Joomla 4. Can you use other option instead? maybe Recently Added First, that will give the same result as 'touched first' option.
- Posted by TemplatePlazza (5260) Offline
As I thought, this module installs an additional plugin and creates a new table in the database. So there will be an additional logic over joomla's to track/record the hits between specific date range and then store it on additional table in database. This is something I avoid actually, in purpose of reducing the burden on maintenance, because Minifrontpage is just a module. Adding additional logic over the Joomla logic itself could creates other issues on performance, compatibility and maybe also security issue.