Article ordering by popularity/hits

  • Posted by TemplatePlazza (5260) Offline

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.

Joomla doesn't record when certain articles get hits. So you can't get it without additional compoment.

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.

Yes it is designed that way, based on what joomla provided.

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.

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.
2 years 2 months ago #7 by TemplatePlazza
The topic has been marked as resolved.
Please thanks very much for replying. I really appreciate all the help. 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

Btw, ordering by "recently touched first" throws some warning messages
foreach() argument must be of type array|object, bool given in...

Thanks.
2 years 2 months ago #8 by testos
The topic has been marked as resolved.
  • Posted by TemplatePlazza (5260) Offline

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

Please upload the file here then I will try to see how it's working.

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.

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.
2 years 2 months ago #9 by TemplatePlazza
The topic has been marked as resolved.
  • Posted by TemplatePlazza (5260) Offline
Ok I found the installation file on github.
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.
2 years 2 months ago #10 by TemplatePlazza
The topic has been marked as resolved.
Please thanks for taking a look. As I said, you know better. I'm happy with Minifrontpage and will make it work. Thanks once again.
2 years 2 months ago #11 by testos
The topic has been marked as resolved.
  • Posted by TemplatePlazza (5260) Offline
No problem testos. Good luck with your website ;)
2 years 2 months ago #12 by TemplatePlazza
The topic has been marked as resolved.
Powered by Kunena Forum