Plugin to register visits to RainLab Blog Blog Publications and create a list of the most visited posts in a period of time
Requirements
RainLab Blog plugin
The following plugin is required
The following themes use this plugin

Multipurpose Theme with PAGE BUILDER - Success
Multipurpose Theme with PAGE BUILDER - Success
Octobercms Multipurpose Theme with easy Page Builder system

Shopaholic Theme with PAGE BUILDER - Agora
Shopaholic Theme with PAGE BUILDER - Agora
Octobercms Ecommerce Theme with Powerful Eshop & Blog Capabilities and an easy Page Builder system.

Modular Theme with PAGE BUILDER - Clear
Modular Theme with PAGE BUILDER - Clear
Octobercms Multipurpose Theme with Powerful Settings and an easy CRUD Generator - Page Builder system

Ultimate Website Builder - CREATOR Theme Bundle
Ultimate Website Builder - CREATOR Theme Bundle
The Ultimate Octobercms Theme Bundle with Advanced Page Builder & Powerful Component Blocks

Purpose
Purpose
A multipurpose and contemporary flat design OctoberCMS theme with rich animations With Native Page Builder

eMarket - Advanced E-Commerce Octobercms theme
eMarket - Advanced E-Commerce Octobercms theme
Premium Ecommerce Octobercms theme based on OFFLINE Mall Plugin
Installing the watcher
IMPORTANT
In order to register the visit to a Publication RegisterVisit
component must be added to Post Page
Create a most visited posts list
Add the TopVisitedComponent
This component has parameters
Most Visited From - The time period to get the most visited publications
- Today
- Current Week
- Last Week
- All the time
Category filter
You can select a category filter, this way you can get the Top 10 from a particular category. If no category is selected, the component will retrieve the top 10 from all your publications
Top
How many publications must be retrieved
Examples
Using these three parameters you can construct different lists. Eg.
- Last week, top 10 from local news
- Today top 5 from all the site
- Top 10 from all the site in all the time
Displaying the results
The TopVisitedComponent
inject the mostVisitedPosts object
Use as you already use the RainLab blog post
{% for post in mostVisitedPosts %} <div class="post"> <div class="postImage"><img alt="" src="{{post.featured_images[0].path}}"></div> <div class="post-content"> <h3>{{post.title}}</h3> <a href="{{post.url}}">Continue reading</a> </div> </div> {% endfor %}
Support and bugs reporting
You can write in the forum or visit me in Github
-
nawt
Found the plugin useful on 26 Sep, 2019
Example for Bootstrap 4 Carousel (With TopVisitedComponent)
<div id="carouselExampleIndicators" class="carousel slide col-lg-6" data-ride="carousel"> <h5 class="text-center"> Top Viewed Post </h5> <ol class="carousel-indicators"> <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li> <li data-target="#carouselExampleIndicators" data-slide-to="1"></li> <li data-target="#carouselExampleIndicators" data-slide-to="2"></li> <li data-target="#carouselExampleIndicators" data-slide-to="3"></li> <li data-target="#carouselExampleIndicators" data-slide-to="4"></li> </ol> <div class="carousel-inner"> {% for post in mostVisitedPosts %} <div class="carousel-item {%if (loop.first)%}active{% endif %}"> <img class="d-block img-fluid img-rounded" style="height:350; width:auto;" src="{{post.featured_images[0].path}}" alt="{{post.title}}"> <div class="carousel-caption d-none d-md-block text-light bg-dark"> <h5>{{post.title}}</h5> <p><a href="{{post.url}}">Devamını Oku...</a></p> </div> </div> {% endfor %} </div> <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev"> <span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a> <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next"> <span class="carousel-control-next-icon" aria-hidden="true"></span> <span class="sr-only">Next</span> </a> </div>
-
Carlos Pinto
Found the plugin useful on 23 Jan, 2018
Absolutely fantastic and easy to implement. Is there a possibility to show the current number of post visits? I want to show something like "this post has been viewed X times"
-
amdad
Found the plugin useful on 7 Feb, 2017
Sweet component!
-
1.0.2 |
Improve a new query to get the top visited post. Same results in 4x faster Aug 09, 2017 |
---|---|
1.0.1 |
First version of MostVisited. Create the Visitis table Feb 03, 2017 |