Remove standard Joomla module overrides to fix language loading (Cassiopeia approach)
Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
This commit is contained in:
@@ -1,42 +1,13 @@
|
||||
# Standard Joomla & Community Builder Module Mobile Responsive Overrides
|
||||
|
||||
## Overview
|
||||
This directory contains mobile-responsive overrides for standard Joomla and Community Builder modules, designed specifically for the MokoCassiopeia template.
|
||||
This directory contains mobile-responsive overrides for Community Builder modules, designed specifically for the MokoCassiopeia template.
|
||||
|
||||
**Note**: The mod_menu override has been removed to prevent conflicts with Joomla's core menu system. Use Joomla's default menu rendering or apply custom CSS to the `.mod-menu` class for styling.
|
||||
|
||||
## Standard Joomla Modules
|
||||
|
||||
### 1. mod_breadcrumbs
|
||||
Breadcrumb navigation module featuring:
|
||||
- Schema.org structured data
|
||||
- Responsive breadcrumb trail
|
||||
- Home icon support
|
||||
- Active page highlighting
|
||||
- Touch-friendly links
|
||||
|
||||
### 2. mod_login
|
||||
User login form module with:
|
||||
- Login and logout states
|
||||
- Two-factor authentication support
|
||||
- Remember me functionality
|
||||
- Password recovery links
|
||||
- User registration links
|
||||
- Touch-friendly form inputs (48px on mobile)
|
||||
- 16px input font (prevents iOS zoom)
|
||||
|
||||
### 3. mod_articles_latest
|
||||
Latest articles display module offering:
|
||||
- Responsive article cards
|
||||
- Optional metadata display (author, date, category, hits)
|
||||
- Schema.org Article markup
|
||||
- Introtext support
|
||||
- Read more links
|
||||
- Touch-friendly interactions
|
||||
**Important**: Following Cassiopeia template best practices, standard Joomla core modules (mod_breadcrumbs, mod_login, mod_articles_latest, mod_menu) are NOT overridden. These use Joomla's default layouts to ensure proper language loading and compatibility. Apply custom styling via CSS.
|
||||
|
||||
## Community Builder Modules
|
||||
|
||||
### 4. mod_cblogin
|
||||
### 1. mod_cblogin
|
||||
Community Builder login module with:
|
||||
- Avatar display in logged-in state
|
||||
- Profile link button
|
||||
@@ -46,7 +17,7 @@ Community Builder login module with:
|
||||
- Registration link
|
||||
- Pre/post text support
|
||||
|
||||
### 5. mod_comprofilerOnline
|
||||
### 2. mod_comprofilerOnline
|
||||
Community Builder online users module featuring:
|
||||
- Online user count display
|
||||
- Members vs. guests breakdown
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_articles_latest
|
||||
*
|
||||
* @copyright (C) 2025 Moko Consulting <hello@mokoconsulting.tech>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*
|
||||
* Mobile responsive override for mod_articles_latest module
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
// Ensure module language file is loaded
|
||||
$lang = Factory::getLanguage();
|
||||
$lang->load('mod_articles_latest', JPATH_SITE);
|
||||
|
||||
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8');
|
||||
|
||||
// Add responsive wrapper class
|
||||
$wrapperClass = 'mod-articles-latest mod-articles-latest-responsive ' . $moduleclass_sfx;
|
||||
?>
|
||||
|
||||
<div class="<?php echo $wrapperClass; ?>">
|
||||
<?php if (!empty($list)) : ?>
|
||||
<ul class="mod-articles-latest__list">
|
||||
<?php foreach ($list as $item) : ?>
|
||||
<li class="mod-articles-latest__item" itemscope itemtype="https://schema.org/Article">
|
||||
<?php if ($params->get('show_introtext', 0) && !empty($item->introtext)) : ?>
|
||||
<div class="mod-articles-latest__article">
|
||||
<h<?php echo $params->get('item_heading', 4); ?> class="mod-articles-latest__title" itemprop="headline">
|
||||
<?php if ($params->get('link_titles', 1)) : ?>
|
||||
<a href="<?php echo $item->link; ?>" itemprop="url" class="mod-articles-latest__link">
|
||||
<?php echo htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8'); ?>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<?php echo htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8'); ?>
|
||||
<?php endif; ?>
|
||||
</h<?php echo $params->get('item_heading', 4); ?>>
|
||||
|
||||
<?php if ($params->get('show_author', 0) || $params->get('show_date', 0) || $params->get('show_category', 0) || $params->get('show_hits', 0)) : ?>
|
||||
<div class="mod-articles-latest__meta">
|
||||
<?php if ($params->get('show_author', 0)) : ?>
|
||||
<span class="mod-articles-latest__author" itemprop="author" itemscope itemtype="https://schema.org/Person">
|
||||
<span class="icon-user" aria-hidden="true"></span>
|
||||
<span itemprop="name"><?php echo $item->author; ?></span>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_date', 0)) : ?>
|
||||
<span class="mod-articles-latest__date">
|
||||
<span class="icon-calendar" aria-hidden="true"></span>
|
||||
<time datetime="<?php echo HTMLHelper::_('date', $item->publish_up, 'c'); ?>" itemprop="datePublished">
|
||||
<?php echo HTMLHelper::_('date', $item->publish_up, Text::_('DATE_FORMAT_LC3')); ?>
|
||||
</time>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_category', 0)) : ?>
|
||||
<span class="mod-articles-latest__category">
|
||||
<span class="icon-folder" aria-hidden="true"></span>
|
||||
<?php echo $item->displayCategoryTitle; ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('show_hits', 0)) : ?>
|
||||
<span class="mod-articles-latest__hits">
|
||||
<span class="icon-eye" aria-hidden="true"></span>
|
||||
<?php echo $item->displayHits; ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="mod-articles-latest__intro" itemprop="description">
|
||||
<?php echo $item->introtext; ?>
|
||||
</div>
|
||||
|
||||
<?php if ($params->get('readmore', 0)) : ?>
|
||||
<div class="mod-articles-latest__readmore">
|
||||
<a href="<?php echo $item->link; ?>" class="mod-articles-latest__readmore-link btn btn-secondary">
|
||||
<?php echo Text::_('MOD_ARTICLES_LATEST_READMORE'); ?>
|
||||
<span class="icon-chevron-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<a href="<?php echo $item->link; ?>" class="mod-articles-latest__link" itemprop="url">
|
||||
<span itemprop="headline"><?php echo htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8'); ?></span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php else : ?>
|
||||
<div class="mod-articles-latest__empty">
|
||||
<p><?php echo Text::_('MOD_ARTICLES_LATEST_NO_ARTICLES'); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -1 +0,0 @@
|
||||
<!DOCTYPE html><html><head><title></title></head><body></body></html>
|
||||
@@ -1,68 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_breadcrumbs
|
||||
*
|
||||
* @copyright (C) 2025 Moko Consulting <hello@mokoconsulting.tech>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*
|
||||
* Mobile responsive override for mod_breadcrumbs module
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
// Ensure module language file is loaded
|
||||
$lang = Factory::getLanguage();
|
||||
$lang->load('mod_breadcrumbs', JPATH_SITE);
|
||||
|
||||
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8');
|
||||
|
||||
// Add responsive wrapper class
|
||||
$wrapperClass = 'mod-breadcrumbs mod-breadcrumbs-responsive ' . $moduleclass_sfx;
|
||||
?>
|
||||
|
||||
<nav class="<?php echo $wrapperClass; ?>" aria-label="<?php echo Text::_('JGLOBAL_YOU_ARE_HERE'); ?>">
|
||||
<?php if ($params->get('showHereYouAre', 1)) : ?>
|
||||
<span class="mod-breadcrumbs__prefix"><?php echo Text::_('JGLOBAL_YOU_ARE_HERE'); ?>:</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<ol class="mod-breadcrumbs__list" itemscope itemtype="https://schema.org/BreadcrumbList">
|
||||
<?php if ($params->get('showHome', 1)) : ?>
|
||||
<li class="mod-breadcrumbs__item mod-breadcrumbs__item--home" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||
<?php $icon = $params->get('homeIcon', 'icon-home'); ?>
|
||||
<a itemprop="item" href="<?php echo $list[0]->link; ?>" class="mod-breadcrumbs__link">
|
||||
<span class="<?php echo $icon; ?>" aria-hidden="true"></span>
|
||||
<span itemprop="name" class="visually-hidden"><?php echo htmlspecialchars($list[0]->name, ENT_COMPAT, 'UTF-8'); ?></span>
|
||||
</a>
|
||||
<meta itemprop="position" content="1" />
|
||||
</li>
|
||||
<?php $position = 2; ?>
|
||||
<?php else : ?>
|
||||
<?php $position = 1; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$start = $params->get('showHome', 1) ? 1 : 0;
|
||||
$count = count($list);
|
||||
|
||||
for ($i = $start; $i < $count; $i++) :
|
||||
$isLast = ($i === $count - 1);
|
||||
?>
|
||||
<li class="mod-breadcrumbs__item <?php echo $isLast ? 'mod-breadcrumbs__item--active' : ''; ?>" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||
<?php if (!$isLast) : ?>
|
||||
<a itemprop="item" href="<?php echo $list[$i]->link; ?>" class="mod-breadcrumbs__link">
|
||||
<span itemprop="name"><?php echo htmlspecialchars($list[$i]->name, ENT_COMPAT, 'UTF-8'); ?></span>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<span itemprop="name" class="mod-breadcrumbs__current" aria-current="page">
|
||||
<?php echo htmlspecialchars($list[$i]->name, ENT_COMPAT, 'UTF-8'); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<meta itemprop="position" content="<?php echo $position++; ?>" />
|
||||
</li>
|
||||
<?php endfor; ?>
|
||||
</ol>
|
||||
</nav>
|
||||
@@ -1 +0,0 @@
|
||||
<!DOCTYPE html><html><head><title></title></head><body></body></html>
|
||||
@@ -1,173 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Site
|
||||
* @subpackage mod_login
|
||||
*
|
||||
* @copyright (C) 2025 Moko Consulting <hello@mokoconsulting.tech>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*
|
||||
* Mobile responsive override for mod_login module
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
// Ensure module language file is loaded
|
||||
$lang = Factory::getLanguage();
|
||||
$lang->load('mod_login', JPATH_SITE);
|
||||
|
||||
HTMLHelper::_('behavior.keepalive');
|
||||
HTMLHelper::_('bootstrap.tooltip', '.hasTooltip');
|
||||
|
||||
$usersConfig = ComponentHelper::getParams('com_users');
|
||||
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_COMPAT, 'UTF-8');
|
||||
|
||||
// Add responsive wrapper class
|
||||
$wrapperClass = 'mod-login mod-login-responsive ' . $moduleclass_sfx;
|
||||
?>
|
||||
|
||||
<div class="<?php echo $wrapperClass; ?>">
|
||||
<?php if ($type === 'logout') : ?>
|
||||
<form action="<?php echo Route::_('index.php', true); ?>" method="post" id="login-form-<?php echo $module->id; ?>" class="mod-login__form mod-login__form--logout">
|
||||
<?php if ($params->get('greeting', 1)) : ?>
|
||||
<div class="mod-login__greeting">
|
||||
<?php if ($params->get('name', 0) == 0) : ?>
|
||||
<?php echo Text::sprintf('MOD_LOGIN_HINAME', htmlspecialchars($user->get('name'), ENT_COMPAT, 'UTF-8')); ?>
|
||||
<?php else : ?>
|
||||
<?php echo Text::sprintf('MOD_LOGIN_HINAME', htmlspecialchars($user->get('username'), ENT_COMPAT, 'UTF-8')); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="mod-login__actions">
|
||||
<button type="submit" name="Submit" class="mod-login__btn mod-login__btn--logout btn btn-secondary">
|
||||
<span class="icon-sign-out" aria-hidden="true"></span>
|
||||
<?php echo Text::_('JLOGOUT'); ?>
|
||||
</button>
|
||||
<input type="hidden" name="option" value="com_users" />
|
||||
<input type="hidden" name="task" value="user.logout" />
|
||||
<input type="hidden" name="return" value="<?php echo $return; ?>" />
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
</div>
|
||||
</form>
|
||||
<?php else : ?>
|
||||
<form action="<?php echo Route::_('index.php', true); ?>" method="post" id="login-form-<?php echo $module->id; ?>" class="mod-login__form mod-login__form--login">
|
||||
<?php if ($params->get('pretext')) : ?>
|
||||
<div class="mod-login__pretext">
|
||||
<?php echo $params->get('pretext'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="mod-login__fields">
|
||||
<div class="mod-login__field">
|
||||
<label for="modloginusername-<?php echo $module->id; ?>" class="mod-login__label">
|
||||
<?php echo Text::_('MOD_LOGIN_VALUE_USERNAME'); ?>
|
||||
</label>
|
||||
<input
|
||||
id="modloginusername-<?php echo $module->id; ?>"
|
||||
type="text"
|
||||
name="username"
|
||||
class="mod-login__input form-control"
|
||||
placeholder="<?php echo Text::_('MOD_LOGIN_VALUE_USERNAME'); ?>"
|
||||
autocomplete="username"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="mod-login__field">
|
||||
<label for="modloginpass-<?php echo $module->id; ?>" class="mod-login__label">
|
||||
<?php echo Text::_('JGLOBAL_PASSWORD'); ?>
|
||||
</label>
|
||||
<input
|
||||
id="modloginpass-<?php echo $module->id; ?>"
|
||||
type="password"
|
||||
name="password"
|
||||
class="mod-login__input form-control"
|
||||
placeholder="<?php echo Text::_('JGLOBAL_PASSWORD'); ?>"
|
||||
autocomplete="current-password"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<?php if (count($twofactormethods) > 1) : ?>
|
||||
<div class="mod-login__field">
|
||||
<label for="modloginsecretkey-<?php echo $module->id; ?>" class="mod-login__label">
|
||||
<?php echo Text::_('JGLOBAL_SECRETKEY'); ?>
|
||||
</label>
|
||||
<input
|
||||
id="modloginsecretkey-<?php echo $module->id; ?>"
|
||||
type="text"
|
||||
name="secretkey"
|
||||
class="mod-login__input form-control"
|
||||
placeholder="<?php echo Text::_('JGLOBAL_SECRETKEY'); ?>"
|
||||
autocomplete="one-time-code"
|
||||
/>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('useLocale', 0)) : ?>
|
||||
<div class="mod-login__field">
|
||||
<label for="lang-<?php echo $module->id; ?>" class="mod-login__label">
|
||||
<?php echo Text::_('MOD_LOGIN_LANGUAGE'); ?>
|
||||
</label>
|
||||
<?php echo $languages; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('showRememberMe', 1)) : ?>
|
||||
<div class="mod-login__remember">
|
||||
<input
|
||||
id="modloginrememberme-<?php echo $module->id; ?>"
|
||||
type="checkbox"
|
||||
name="remember"
|
||||
class="mod-login__checkbox"
|
||||
value="yes"
|
||||
/>
|
||||
<label for="modloginrememberme-<?php echo $module->id; ?>" class="mod-login__remember-label">
|
||||
<?php echo Text::_('MOD_LOGIN_REMEMBER_ME'); ?>
|
||||
</label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="mod-login__actions">
|
||||
<button type="submit" name="Submit" class="mod-login__btn mod-login__btn--submit btn btn-primary">
|
||||
<span class="icon-sign-in" aria-hidden="true"></span>
|
||||
<?php echo Text::_('JLOGIN'); ?>
|
||||
</button>
|
||||
<input type="hidden" name="option" value="com_users" />
|
||||
<input type="hidden" name="task" value="user.login" />
|
||||
<input type="hidden" name="return" value="<?php echo $return; ?>" />
|
||||
<?php echo HTMLHelper::_('form.token'); ?>
|
||||
</div>
|
||||
|
||||
<?php if ($usersConfig->get('allowUserRegistration')) : ?>
|
||||
<div class="mod-login__links">
|
||||
<a href="<?php echo Route::_('index.php?option=com_users&view=registration'); ?>" class="mod-login__link">
|
||||
<?php echo Text::_('MOD_LOGIN_REGISTER'); ?>
|
||||
<span class="icon-chevron-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
<a href="<?php echo Route::_('index.php?option=com_users&view=reset'); ?>" class="mod-login__link">
|
||||
<?php echo Text::_('MOD_LOGIN_FORGOT_YOUR_PASSWORD'); ?>
|
||||
<span class="icon-chevron-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
<a href="<?php echo Route::_('index.php?option=com_users&view=remind'); ?>" class="mod-login__link">
|
||||
<?php echo Text::_('MOD_LOGIN_FORGOT_YOUR_USERNAME'); ?>
|
||||
<span class="icon-chevron-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($params->get('posttext')) : ?>
|
||||
<div class="mod-login__posttext">
|
||||
<?php echo $params->get('posttext'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -1 +0,0 @@
|
||||
<!DOCTYPE html><html><head><title></title></head><body></body></html>
|
||||
@@ -36,7 +36,7 @@
|
||||
</server>
|
||||
</updateservers>
|
||||
<name>MokoCassiopeia</name>
|
||||
<version>03.08.01</version>
|
||||
<version>03.08.02</version>
|
||||
<creationDate>2026-02-27</creationDate>
|
||||
<author>Jonathan Miller || Moko Consulting</author>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
|
||||
Reference in New Issue
Block a user