This Joomla 4 override allows you to display some awesome stats on your site simply with Joomla's mod_stats
module. At the bottom of this article, you can download the files of the override.
Joomla 4 frontend rendering
PhP markup
<?php
/**
* @package Joomla.Site
* @subpackage mod_stats
* @author web-eau.net
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<h3 class="display-4 text-center text-primary pt-5">Awesome stats</h3>
<section id="counter">
<div class="row stats-module<?php echo $moduleclass_sfx; ?>">
<?php foreach ($list as $item) : ?>
<div class="col text-center">
<div class="count">
<p class="number">
<?php
echo number_format($item->data,0,' ',',');
?>
</p>
<h4><?php echo $item->title; ?></h4>
</div>
</div>
<?php endforeach; ?>
</div>
</section>
CSS
#counter {
color: #fff;
display: block;
overflow: hidden;
text-align: center;
padding: 100px 0;
}
#counter .count {
padding: 50px;
background: #d0e0fc;
color: #145889;
text-align: center;
}
.count h4 {
color: #145889;
font-size: 16px;
margin-top: 0;
}
#counter .count .fa {
font-size: 40px;
display: block;
color: #fff;
}
#counter .number {
font-size: 30px;
font-weight: 700;
margin: 0;
}
Download the override
override-awesome-stats-j4.zipInstall the override
Enjoy the override
This Joomla 3 override allows you to display some awesome stats on your site simply with Joomla's mod_stats
module. At the bottom of this article, you can download the files of the override.
Joomla 3 frontend rendering
PhP markup
<?php
/**
* @package Joomla.Site
* @subpackage mod_stats
* @author web-eau.net
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<h3 class="display-4 text-center text-primary pt-5">Awesome stats</h3>
<section id="counter">
<div class="row stats-module<?php echo $moduleclass_sfx; ?>">
<?php foreach ($list as $item) : ?>
<div class="col text-center">
<div class="count">
<p class="number">
<?php
echo number_format($item->data,0,' ',',');
?>
</p>
<h4><?php echo $item->title; ?></h4>
</div>
</div>
<?php endforeach; ?>
</div>
</section>
CSS
#counter {
color: #fff;
display: block;
overflow: hidden;
text-align: center;
padding: 100px 0;
}
#counter .count {
padding: 50px;
background: #d0e0fc;
color: #145889;
text-align: center;
}
.count h4 {
color: #145889;
font-size: 16px;
margin-top: 0;
}
#counter .count .fa {
font-size: 40px;
display: block;
color: #fff;
}
#counter .number {
font-size: 30px;
font-weight: 700;
margin: 0;
}