This commit is contained in:
2025-05-22 17:21:25 -05:00
parent 190cabfb23
commit 4eb63b1247
136 changed files with 43684 additions and 0 deletions

View File

@@ -0,0 +1,88 @@
<?php
/**
* @package Joomla.Site
* @subpackage Templates.Moko-Cassiopeia
*
* @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
/** @var Joomla\CMS\Document\HtmlDocument $this */
$app = Factory::getApplication();
$wa = $this->getWebAssetManager();
// Color Theme
$paramsColorName = $this->params->get('colorName', 'colors_standard');
$assetColorName = 'theme.' . $paramsColorName;
$wa->registerAndUseStyle($assetColorName, 'media/templates/site/moko-cassiopeia/css/global/' . $paramsColorName . '.css');
// Use a font scheme if set in the template style options
$paramsFontScheme = $this->params->get('useFontScheme', false);
$fontStyles = '';
if ($paramsFontScheme) {
if (stripos($paramsFontScheme, 'https://') === 0) {
$this->getPreloadManager()->preconnect('https://fonts.googleapis.com/', ['crossorigin' => 'anonymous']);
$this->getPreloadManager()->preconnect('https://fonts.gstatic.com/', ['crossorigin' => 'anonymous']);
$this->getPreloadManager()->preload($paramsFontScheme, ['as' => 'style', 'crossorigin' => 'anonymous']);
$wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, [], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'', 'crossorigin' => 'anonymous']);
if (preg_match_all('/family=([^?:]*):/i', $paramsFontScheme, $matches) > 0) {
$fontStyles = '--moko-cassiopeia-font-family-body: "' . str_replace('+', ' ', $matches[1][0]) . '", sans-serif;
--moko-cassiopeia-font-family-headings: "' . str_replace('+', ' ', isset($matches[1][1]) ? $matches[1][1] : $matches[1][0]) . '", sans-serif;
--moko-cassiopeia-font-weight-normal: 400;
--moko-cassiopeia-font-weight-headings: 700;';
}
} else {
$wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, ['version' => 'auto'], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'']);
$this->getPreloadManager()->preload($wa->getAsset('style', 'fontscheme.current')->getUri() . '?' . $this->getMediaVersion(), ['as' => 'style']);
}
}
// Enable assets
$wa->usePreset('template.MOKO-CASSIOPEIA.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'))
->useStyle('template.active.language')
->useStyle('template.user')
->useScript('template.user')
->addInlineStyle(":root {
--hue: 214;
--template-bg-light: #f0f4fb;
--template-text-dark: #495057;
--template-text-light: #ffffff;
--template-link-color: #2a69b8;
--template-special-color: #001B4C;
$fontStyles
}");
// Override 'template.active' asset to set correct ltr/rtl dependency
$wa->registerStyle('template.active', '', [], [], ['template.MOKO-CASSIOPEIA.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')]);
// Browsers support SVG favicons
$this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon.svg', '', [], true, 1), 'icon', 'rel', ['type' => 'image/svg+xml']);
$this->addHeadLink(HTMLHelper::_('image', 'favicon.ico', '', [], true, 1), 'alternate icon', 'rel', ['type' => 'image/vnd.microsoft.icon']);
$this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon-pinned.svg', '', [], true, 1), 'mask-icon', 'rel', ['color' => '#000']);
// Defer font awesome
$wa->getAsset('style', 'fontawesome')->setAttribute('rel', 'lazy-stylesheet');
?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<jdoc:include type="metas" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<jdoc:include type="styles" />
<jdoc:include type="scripts" />
</head>
<body class="<?php echo $this->direction === 'rtl' ? 'rtl' : ''; ?>">
<jdoc:include type="message" />
<jdoc:include type="component" />
</body>
</html>

View File

@@ -0,0 +1,11 @@
<?php
function console_log($output, $with_script_tags = true) {
$js_code = 'console.log(' . json_encode($output, JSON_HEX_TAG) .
');';
if ($with_script_tags) {
$js_code = '<script>' . $js_code . '</script>';
}
echo $js_code;
}
?>
Custom code included here

View File

@@ -0,0 +1,226 @@
<?php
/**
* @package Joomla.Site
* @subpackage Templates.Moko-Cassiopeia
*
* @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\Document\ErrorDocument $this */
$app = Factory::getApplication();
$input = $app->getInput();
$wa = $this->getWebAssetManager();
// Browsers support SVG favicons
$this->addHeadLink(HTMLHelper::_('image', '../media/templates/site/moko-cassiopeia/images/favicon/favicon.svg', '', [], true, 1), 'icon', 'rel', ['type' => 'image/svg+xml']);
$this->addHeadLink(HTMLHelper::_('image', '../media/templates/site/moko-cassiopeia/images/favicon/favicon.ico', '', [], true, 1), 'alternate icon', 'rel', ['type' => 'image/vnd.microsoft.icon']);
$this->addHeadLink(HTMLHelper::_('image', '../media/templates/site/moko-cassiopeia/images/favicon/favicon.svg', '', [], true, 1), 'mask-icon', 'rel', ['color' => '#fff']);
//add Bootsrap 5 Support
HTMLHelper::_('bootstrap.alert');
HTMLHelper::_('bootstrap.button');
HTMLHelper::_('bootstrap.carousel');
HTMLHelper::_('bootstrap.collapse');
HTMLHelper::_('bootstrap.dropdown');
HTMLHelper::_('bootstrap.modal');
HTMLHelper::_('bootstrap.offcanvas');
HTMLHelper::_('bootstrap.popover');
HTMLHelper::_('bootstrap.scrollspy');
HTMLHelper::_('bootstrap.tab');
HTMLHelper::_('bootstrap.tooltip');
HTMLHelper::_('bootstrap.toast');
// Detecting Active Variables
$option = $input->getCmd('option', '');
$view = $input->getCmd('view', '');
$layout = $input->getCmd('layout', '');
$task = $input->getCmd('task', '');
$itemid = $input->getCmd('Itemid', '');
$sitename = htmlspecialchars($app->get('sitename'), ENT_QUOTES, 'UTF-8');
$menu = $app->getMenu()->getActive();
$pageclass = $menu !== null ? $menu->getParams()->get('pageclass_sfx', '') : '';
// Template path
$templatePath = 'media/templates/site/moko-cassiopeia';
// Color Theme
$paramsColorName = $this->params->get('colorName', 'colors_standard');
$assetColorName = 'theme.' . $paramsColorName;
$wa->registerAndUseStyle($assetColorName, $templatePath . '/css/global/' . $paramsColorName . '.css');
// Use a font scheme if set in the template style options
$paramsFontScheme = $this->params->get('useFontScheme', false);
$fontStyles = '';
if ($paramsFontScheme) {
if (stripos($paramsFontScheme, 'https://') === 0) {
$this->getPreloadManager()->preconnect('https://fonts.googleapis.com/', ['crossorigin' => 'anonymous']);
$this->getPreloadManager()->preconnect('https://fonts.gstatic.com/', ['crossorigin' => 'anonymous']);
$this->getPreloadManager()->preload($paramsFontScheme, ['as' => 'style', 'crossorigin' => 'anonymous']);
$wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, [], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'', 'crossorigin' => 'anonymous']);
if (preg_match_all('/family=([^?:]*):/i', $paramsFontScheme, $matches) > 0) {
$fontStyles = '--moko-cassiopeia-font-family-body: "' . str_replace('+', ' ', $matches[1][0]) . '", sans-serif;
--moko-cassiopeia-font-family-headings: "' . str_replace('+', ' ', isset($matches[1][1]) ? $matches[1][1] : $matches[1][0]) . '", sans-serif;
--moko-cassiopeia-font-weight-normal: 400;
--moko-cassiopeia-font-weight-headings: 700;';
}
} else {
$wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, ['version' => 'auto'], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'']);
$this->getPreloadManager()->preload($wa->getAsset('style', 'fontscheme.current')->getUri() . '?' . $this->getMediaVersion(), ['as' => 'style']);
}
}
// Enable assets
$wa->usePreset('template.MOKO-CASSIOPEIA.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'))
->useStyle('template.active.language')
->useStyle('template.user')
->useScript('template.user')
->addInlineStyle(":root {
--hue: 214;
--template-bg-light: #f0f4fb;
--template-text-dark: #495057;
--template-text-light: #ffffff;
--template-link-color: #2a69b8;
--template-special-color: #001B4C;
$fontStyles
}");
// Override 'template.active' asset to set correct ltr/rtl dependency
$wa->registerStyle('template.active', '', [], [], ['template.MOKO-CASSIOPEIA.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')]);
// Browsers support SVG favicons
$this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon.svg', '', [], true, 1), 'icon', 'rel', ['type' => 'image/svg+xml']);
$this->addHeadLink(HTMLHelper::_('image', 'favicon.ico', '', [], true, 1), 'alternate icon', 'rel', ['type' => 'image/vnd.microsoft.icon']);
$this->addHeadLink(HTMLHelper::_('image', 'joomla-favicon-pinned.svg', '', [], true, 1), 'mask-icon', 'rel', ['color' => '#000']);
// Logo file or site title param
if ($this->params->get('logoFile')) {
$logo = HTMLHelper::_('image', Uri::root(false) . htmlspecialchars($this->params->get('logoFile'), ENT_QUOTES), $sitename, ['loading' => 'eager', 'decoding' => 'async'], false, 0);
} elseif ($this->params->get('siteTitle')) {
$logo = '<span title="' . $sitename . '">' . htmlspecialchars($this->params->get('siteTitle'), ENT_COMPAT, 'UTF-8') . '</span>';
} else {
$logo = HTMLHelper::_('image', 'logo.svg', $sitename, ['class' => 'logo d-inline-block', 'loading' => 'eager', 'decoding' => 'async'], true, 0);
}
// Container
$wrapper = $this->params->get('fluidContainer') ? 'wrapper-fluid' : 'wrapper-static';
$this->setMetaData('viewport', 'width=device-width, initial-scale=1');
// Defer font awesome
$wa->getAsset('style', 'fontawesome')->setAttribute('rel', 'lazy-stylesheet');
?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<jdoc:include type="metas" />
<jdoc:include type="styles" />
<jdoc:include type="scripts" />
</head>
<body class="site error_site <?php echo $option
. ' ' . $wrapper
. ' view-' . $view
. ($layout ? ' layout-' . $layout : ' no-layout')
. ($task ? ' task-' . $task : ' no-task')
. ($itemid ? ' itemid-' . $itemid : '')
. ' ' . $pageclass;
echo ($this->direction == 'rtl' ? ' rtl' : '');
?>">
<header class="header container-header full-width">
<?php if ($this->params->get('brand', 1)) : ?>
<div class="grid-child">
<div class="navbar-brand">
<a class="brand-logo" href="<?php echo $this->baseurl; ?>/">
<?php echo $logo; ?>
</a>
<?php if ($this->params->get('siteDescription')) : ?>
<div class="site-description"><?php echo htmlspecialchars($this->params->get('siteDescription')); ?></div>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<?php if ($this->countModules('menu') || $this->countModules('search')) : ?>
<div class="grid-child container-nav">
<?php if ($this->countModules('menu')) : ?>
<jdoc:include type="modules" name="menu" style="none" />
<?php endif; ?>
<?php if ($this->countModules('search')) : ?>
<div class="container-search">
<jdoc:include type="modules" name="search" style="none" />
</div>
<?php endif; ?>
</div>
<?php endif; ?>
</header>
<div class="site-grid">
<div class="grid-child container-component">
<h1 class="page-header"><?php echo Text::_('JERROR_LAYOUT_PAGE_NOT_FOUND'); ?></h1>
<div class="card">
<div class="card-body">
<jdoc:include type="message" />
<p><strong><?php echo Text::_('JERROR_LAYOUT_ERROR_HAS_OCCURRED_WHILE_PROCESSING_YOUR_REQUEST'); ?></strong></p>
<p><?php echo Text::_('JERROR_LAYOUT_NOT_ABLE_TO_VISIT'); ?></p>
<ul>
<li><?php echo Text::_('JERROR_LAYOUT_AN_OUT_OF_DATE_BOOKMARK_FAVOURITE'); ?></li>
<li><?php echo Text::_('JERROR_LAYOUT_MIS_TYPED_ADDRESS'); ?></li>
<li><?php echo Text::_('JERROR_LAYOUT_SEARCH_ENGINE_OUT_OF_DATE_LISTING'); ?></li>
<li><?php echo Text::_('JERROR_LAYOUT_YOU_HAVE_NO_ACCESS_TO_THIS_PAGE'); ?></li>
</ul>
<p><?php echo Text::_('JERROR_LAYOUT_GO_TO_THE_HOME_PAGE'); ?></p>
<p><a href="<?php echo $this->baseurl; ?>/index.php" class="btn btn-secondary"><span class="icon-home" aria-hidden="true"></span> <?php echo Text::_('JERROR_LAYOUT_HOME_PAGE'); ?></a></p>
<hr>
<p><?php echo Text::_('JERROR_LAYOUT_PLEASE_CONTACT_THE_SYSTEM_ADMINISTRATOR'); ?></p>
<blockquote>
<span class="badge bg-secondary"><?php echo $this->error->getCode(); ?></span> <?php echo htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8'); ?>
</blockquote>
<?php if ($this->debug) : ?>
<div>
<?php echo $this->renderBacktrace(); ?>
<?php // Check if there are more Exceptions and render their data as well ?>
<?php if ($this->error->getPrevious()) : ?>
<?php $loop = true; ?>
<?php // Reference $this->_error here and in the loop as setError() assigns errors to this property and we need this for the backtrace to work correctly ?>
<?php // Make the first assignment to setError() outside the loop so the loop does not skip Exceptions ?>
<?php $this->setError($this->_error->getPrevious()); ?>
<?php while ($loop === true) : ?>
<p><strong><?php echo Text::_('JERROR_LAYOUT_PREVIOUS_ERROR'); ?></strong></p>
<p><?php echo htmlspecialchars($this->_error->getMessage(), ENT_QUOTES, 'UTF-8'); ?></p>
<?php echo $this->renderBacktrace(); ?>
<?php $loop = $this->setError($this->_error->getPrevious()); ?>
<?php endwhile; ?>
<?php // Reset the main error object to the base error ?>
<?php $this->setError($this->error); ?>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php if ($this->countModules('footer')) : ?>
<footer class="container-footer footer full-width">
<div class="grid-child">
<jdoc:include type="modules" name="footer" style="none" />
</div>
</footer>
<?php endif; ?>
<jdoc:include type="modules" name="debug" style="none" />
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,178 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
use Joomla\Component\Contact\Site\Helper\RouteHelper;
$tparams = $this->item->params;
$canDo = ContentHelper::getActions('com_contact', 'category', $this->item->catid);
$canEdit = $canDo->get('core.edit') || ($canDo->get('core.edit.own') && $this->item->created_by === Factory::getUser()->id);
$htag = $tparams->get('show_page_heading') ? 'h2' : 'h1';
?>
<div class="com-contact contact" itemscope itemtype="https://schema.org/Person">
<?php if ($canEdit) : ?>
<div class="icons">
<div class="text-end">
<div>
<?php echo HTMLHelper::_('contacticon.edit', $this->item, $tparams); ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if ($tparams->get('show_page_heading')) : ?>
<h1>
<?php echo $this->escape($tparams->get('page_heading')); ?>
</h1>
<?php endif; ?>
<?php if ($this->item->name && $tparams->get('show_name')) : ?>
<div class="page-header">
<<?php echo $htag; ?>>
<?php if ($this->item->published == 0) : ?>
<span class="badge bg-warning text-light"><?php echo Text::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
<span class="contact-name" itemprop="name"><?php echo $this->item->name; ?></span>
</<?php echo $htag; ?>>
</div>
<?php endif; ?>
<div class="row gy-4 mb-4">
<div class="col-md-6">
<?php $show_contact_category = $tparams->get('show_contact_category'); ?>
<?php if ($show_contact_category === 'show_no_link') : ?>
<h3>
<span class="contact-category"><?php echo $this->item->category_title; ?></span>
</h3>
<?php elseif ($show_contact_category === 'show_with_link') : ?>
<?php $contactLink = RouteHelper::getCategoryRoute($this->item->catid, $this->item->language); ?>
<h3>
<span class="contact-category"><a href="<?php echo $contactLink; ?>">
<?php echo $this->escape($this->item->category_title); ?></a>
</span>
</h3>
<?php endif; ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php if ($tparams->get('show_contact_list') && count($this->contacts) > 1) : ?>
<form action="#" method="get" name="selectForm" id="selectForm">
<label for="select_contact"><?php echo Text::_('COM_CONTACT_SELECT_CONTACT'); ?></label>
<?php echo HTMLHelper::_(
'select.genericlist',
$this->contacts,
'select_contact',
'class="form-select" onchange="document.location.href = this.value"',
'link',
'name',
$this->item->link
);
?>
</form>
<?php endif; ?>
<?php if ($tparams->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<div class="com-contact__tags">
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
</div>
<?php endif; ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ($this->params->get('show_info', 1)) : ?>
<div class="com-contact__container">
<?php echo '<h3>' . Text::_('COM_CONTACT_DETAILS') . '</h3>'; ?>
<?php if ($this->item->image && $tparams->get('show_image')) : ?>
<div class="com-contact__thumbnail thumbnail">
<?php echo LayoutHelper::render(
'joomla.html.image',
[
'src' => $this->item->image,
'alt' => $this->item->name,
'itemprop' => 'image',
]
); ?>
</div>
<?php endif; ?>
<?php if ($this->item->con_position && $tparams->get('show_position')) : ?>
<dl class="com-contact__position contact-position dl-horizontal">
<dt><?php echo Text::_('COM_CONTACT_POSITION'); ?>:</dt>
<dd itemprop="jobTitle">
<?php echo $this->item->con_position; ?>
</dd>
</dl>
<?php endif; ?>
<div class="com-contact__info">
<?php echo $this->loadTemplate('address'); ?>
<?php if ($tparams->get('allow_vcard')) : ?>
<?php echo Text::_('COM_CONTACT_DOWNLOAD_INFORMATION_AS'); ?>
<a href="<?php echo Route::_('index.php?option=com_contact&view=contact&catid=' . $this->item->catslug . '&id=' . $this->item->slug . '&format=vcf'); ?>">
<?php echo Text::_('COM_CONTACT_VCARD'); ?></a>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<?php if ($tparams->get('show_links')) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($tparams->get('show_articles') && $this->item->user_id && $this->item->articles) : ?>
<?php echo '<h3>' . Text::_('JGLOBAL_ARTICLES') . '</h3>'; ?>
<?php echo $this->loadTemplate('articles'); ?>
<?php endif; ?>
<?php if ($tparams->get('show_profile') && $this->item->user_id && PluginHelper::isEnabled('user', 'profile')) : ?>
<?php echo '<h3>' . Text::_('COM_CONTACT_PROFILE') . '</h3>'; ?>
<?php echo $this->loadTemplate('profile'); ?>
<?php endif; ?>
<?php if ($tparams->get('show_user_custom_fields') && $this->contactUser) : ?>
<?php echo $this->loadTemplate('user_custom_fields'); ?>
<?php endif; ?>
</div>
<div class="col-md-6">
<?php if ($tparams->get('show_email_form') && ($this->item->email_to || $this->item->user_id)) : ?>
<?php echo '<h3>' . Text::_('COM_CONTACT_EMAIL_FORM') . '</h3>'; ?>
<?php echo $this->loadTemplate('form'); ?>
<?php endif; ?>
</div>
</div>
<?php if ($this->item->misc && $tparams->get('show_misc')) : ?>
<?php echo '<h3>' . Text::_('COM_CONTACT_OTHER_INFORMATION') . '</h3>'; ?>
<div class="com-contact__miscinfo contact-miscinfo">
<div class="contact-misc">
<?php echo $this->item->misc; ?>
</div>
</div>
<?php endif; ?>
<?php echo $this->item->event->afterDisplayContent; ?>
</div>

View File

@@ -0,0 +1,144 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\RouteHelper;
// Create shortcuts to some parameters.
$params = $this->item->params;
$canEdit = $params->get('access-edit');
$user = Factory::getUser();
$info = $params->get('info_block_position', 0);
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('Y-m-d H:i:s');
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
?>
<div class="com-content-article item-page<?php echo $this->pageclass_sfx; ?>" itemscope itemtype="https://schema.org/Article">
<meta itemprop="inLanguage" content="<?php echo ($this->item->language === '*') ? Factory::getApplication()->get('language') : $this->item->language; ?>">
<?php if ($this->params->get('show_page_heading')) : ?>
<div class="page-header">
<h1> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1>
</div>
<?php endif;
if (!empty($this->item->pagination) && !$this->item->paginationposition && $this->item->paginationrelative) {
echo $this->item->pagination;
}
?>
<?php $useDefList = $params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|| $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam; ?>
<?php if ($params->get('show_title')) : ?>
<div class="page-header">
<<?php echo $htag; ?> itemprop="headline">
<?php echo $this->escape($this->item->title); ?>
</<?php echo $htag; ?>>
<?php if ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED) : ?>
<span class="badge bg-warning text-light"><?php echo Text::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
<?php if ($isNotPublishedYet) : ?>
<span class="badge bg-warning text-light"><?php echo Text::_('JNOTPUBLISHEDYET'); ?></span>
<?php endif; ?>
<?php if ($isExpired) : ?>
<span class="badge bg-warning text-light"><?php echo Text::_('JEXPIRED'); ?></span>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterTitle" ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'above']); ?>
<?php endif; ?>
<?php if ($info == 0 && $params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay" ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php if ((int) $params->get('urls_position', 0) === 0) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($params->get('access-view')) : ?>
<?php echo LayoutHelper::render('joomla.content.full_image', $this->item); ?>
<?php
if (!empty($this->item->pagination) && !$this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
endif;
?>
<?php if (isset($this->item->toc)) :
echo $this->item->toc;
endif; ?>
<div itemprop="articleBody" class="com-content-article__body">
<?php echo $this->item->text; ?>
</div>
<?php if ($info == 1 || $info == 2) : ?>
<?php if ($useDefList) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'below']); ?>
<?php endif; ?>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && !$this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php if ((int) $params->get('urls_position', 0) === 1) : ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php // Optional teaser intro text for guests ?>
<?php elseif ($params->get('show_noauth') == true && $user->get('guest')) : ?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<?php echo HTMLHelper::_('content.prepare', $this->item->introtext); ?>
<?php // Optional link to let them register to see the whole article. ?>
<?php if ($params->get('show_readmore') && $this->item->fulltext != null) : ?>
<?php $menu = Factory::getApplication()->getMenu(); ?>
<?php $active = $menu->getActive(); ?>
<?php $itemId = $active->id; ?>
<?php $link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false)); ?>
<?php $link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language))); ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php endif; ?>
<?php
if (!empty($this->item->pagination) && $this->item->paginationposition && $this->item->paginationrelative) :
echo $this->item->pagination;
?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
<?php echo $this->item->event->afterDisplayContent; ?>
</div>

View File

@@ -0,0 +1,94 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
* @copyright (C) 2025 Jonathan Miler || Moko Consulting <https://mokoconsulting.tech>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
// Create shortcut
$urls = json_decode($this->item->urls);
// Create shortcuts to some parameters.
$params = $this->item->params;
if ($urls && (!empty($urls->urla) || !empty($urls->urlb) || !empty($urls->urlc))) :
?>
<div class="com-content-article__links content-links">
<ul class="com-content-article__links content-list">
<?php
$urlarray = [
[$urls->urla, $urls->urlatext, $urls->targeta, 'a'],
[$urls->urlb, $urls->urlbtext, $urls->targetb, 'b'],
[$urls->urlc, $urls->urlctext, $urls->targetc, 'c']
];
foreach ($urlarray as $url) :
$link = $url[0];
$label = $url[1];
$target = $url[2];
$id = $url[3];
if (! $link) :
continue;
endif;
// If no label is present, take the link
$label = $label ?: $link;
// If no target is present, use the default
$target = $target ?: $params->get('target' . $id);
?>
<li class="com-content-article__link content-links-<?php echo $id; ?>">
<?php
// Compute the correct link
switch ($target) {
case 1:
// Open in a new window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" target="_blank" rel="nofollow noopener noreferrer">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600';
echo "<a href=\"" . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . "\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\" rel=\"noopener noreferrer\">" .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . '</a>';
break;
case 3:
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="noopener noreferrer" data-bs-toggle="modal" data-bs-target="#linkModal">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
echo HTMLHelper::_(
'bootstrap.renderModal',
'linkModal',
[
'url' => $link,
'title' => $label,
'height' => '100%',
'width' => '100%',
'modalWidth' => '500',
'bodyHeight' => '500',
'footer' => '<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-hidden="true">'
. \Joomla\CMS\Language\Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
]
);
break;
default:
// Open in parent window
echo '<a href="' . htmlspecialchars($link, ENT_COMPAT, 'UTF-8') . '" rel="nofollow">' .
htmlspecialchars($label, ENT_COMPAT, 'UTF-8') . ' </a>';
break;
}
?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,31 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
// Add strings for translations in Javascript.
Text::script('JGLOBAL_EXPAND_CATEGORIES');
Text::script('JGLOBAL_COLLAPSE_CATEGORIES');
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->getRegistry()->addExtensionRegistryFile('com_categories');
$wa->usePreset('com_categories.shared-categories-accordion');
?>
<div class="com-content-categories categories-list">
<?php
echo LayoutHelper::render('joomla.content.categories_default', $this);
echo $this->loadTemplate('items');
?>
</div>

View File

@@ -0,0 +1,75 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
if ($this->maxLevelcat != 0 && count($this->items[$this->parent->id]) > 0) :
?>
<div class="com-content-categories__items">
<?php foreach ($this->items[$this->parent->id] as $id => $item) : ?>
<?php if ($this->params->get('show_empty_categories_cat') || $item->numitems || count($item->getChildren())) : ?>
<div class="com-content-categories__item">
<div class="com-content-categories__item-title-wrapper">
<div class="com-content-categories__item-title">
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($item->id, $item->language)); ?>">
<?php echo $this->escape($item->title); ?></a>
<?php if ($this->params->get('show_cat_num_articles_cat') == 1) :?>
<span class="badge bg-info">
<?php echo Text::_('COM_CONTENT_NUM_ITEMS'); ?>&nbsp;
<?php echo $item->numitems; ?>
</span>
<?php endif; ?>
</div>
<?php if (count($item->getChildren()) > 0 && $this->maxLevelcat > 1) : ?>
<button
type="button"
id="category-btn-<?php echo $item->id; ?>"
data-category-id="<?php echo $item->id; ?>"
class="btn btn-secondary btn-sm"
aria-expanded="false"
aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"
>
<span class="icon-plus" aria-hidden="true"></span>
</button>
<?php endif; ?>
</div>
<?php if ($this->params->get('show_description_image') && $item->getParams()->get('image')) : ?>
<?php echo HTMLHelper::_('image', $item->getParams()->get('image'), $item->getParams()->get('image_alt')); ?>
<?php endif; ?>
<?php if ($this->params->get('show_subcat_desc_cat') == 1) : ?>
<?php if ($item->description) : ?>
<div class="com-content-categories__description category-desc">
<?php echo HTMLHelper::_('content.prepare', $item->description, '', 'com_content.categories'); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if (count($item->getChildren()) > 0 && $this->maxLevelcat > 1) : ?>
<div class="com-content-categories__children" id="category-<?php echo $item->id; ?>" hidden="">
<?php
$this->items[$item->id] = $item->getChildren();
$this->parent = $item;
$this->maxLevelcat--;
echo $this->loadTemplate('items');
$this->parent = $item->getParent();
$this->maxLevelcat++;
?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,141 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Layout\LayoutHelper;
$app = Factory::getApplication();
$this->category->text = $this->category->description;
$app->triggerEvent('onContentPrepare', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$this->category->description = $this->category->text;
$results = $app->triggerEvent('onContentAfterTitle', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$afterDisplayTitle = trim(implode("\n", $results));
$results = $app->triggerEvent('onContentBeforeDisplay', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$beforeDisplayContent = trim(implode("\n", $results));
$results = $app->triggerEvent('onContentAfterDisplay', [$this->category->extension . '.categories', &$this->category, &$this->params, 0]);
$afterDisplayContent = trim(implode("\n", $results));
$htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
?>
<div class="com-content-category-blog blog" itemscope itemtype="https://schema.org/Blog">
<?php if ($this->params->get('show_page_heading')) : ?>
<div class="page-header">
<h1> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1>
</div>
<?php endif; ?>
<?php if ($this->params->get('show_category_title', 1)) : ?>
<<?php echo $htag; ?>>
<?php echo $this->category->title; ?>
</<?php echo $htag; ?>>
<?php endif; ?>
<?php echo $afterDisplayTitle; ?>
<?php if ($this->params->get('show_cat_tags', 1) && !empty($this->category->tags->itemTags)) : ?>
<?php $this->category->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->category->tagLayout->render($this->category->tags->itemTags); ?>
<?php endif; ?>
<?php if ($beforeDisplayContent || $afterDisplayContent || $this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
<div class="category-desc clearfix">
<?php if ($this->params->get('show_description_image') && $this->category->getParams()->get('image')) : ?>
<?php echo LayoutHelper::render(
'joomla.html.image',
[
'src' => $this->category->getParams()->get('image'),
'alt' => empty($this->category->getParams()->get('image_alt')) && empty($this->category->getParams()->get('image_alt_empty')) ? false : $this->category->getParams()->get('image_alt'),
]
); ?>
<?php endif; ?>
<?php echo $beforeDisplayContent; ?>
<?php if ($this->params->get('show_description') && $this->category->description) : ?>
<?php echo HTMLHelper::_('content.prepare', $this->category->description, '', 'com_content.category'); ?>
<?php endif; ?>
<?php echo $afterDisplayContent; ?>
</div>
<?php endif; ?>
<?php if (empty($this->lead_items) && empty($this->link_items) && empty($this->intro_items)) : ?>
<?php if ($this->params->get('show_no_articles', 1)) : ?>
<div class="alert alert-info">
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
<?php echo Text::_('COM_CONTENT_NO_ARTICLES'); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if (!empty($this->lead_items)) : ?>
<div class="com-content-category-blog__items blog-items items-leading <?php echo $this->params->get('blog_class_leading'); ?>">
<?php foreach ($this->lead_items as &$item) : ?>
<div class="com-content-category-blog__item blog-item" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<?php
$this->item = &$item;
echo $this->loadTemplate('item');
?>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if (!empty($this->intro_items)) : ?>
<?php $blogClass = $this->params->get('blog_class', ''); ?>
<?php if ((int) $this->params->get('num_columns') > 1) : ?>
<?php $blogClass .= (int) $this->params->get('multi_column_order', 0) === 0 ? ' masonry-' : ' columns-'; ?>
<?php $blogClass .= (int) $this->params->get('num_columns'); ?>
<?php endif; ?>
<div class="com-content-category-blog__items blog-items <?php echo $blogClass; ?>">
<?php foreach ($this->intro_items as $key => &$item) : ?>
<div class="com-content-category-blog__item blog-item"
itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<?php
$this->item = & $item;
echo $this->loadTemplate('item');
?>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if (!empty($this->link_items)) : ?>
<div class="items-more">
<?php echo $this->loadTemplate('links'); ?>
</div>
<?php endif; ?>
<?php if ($this->maxLevel != 0 && !empty($this->children[$this->category->id])) : ?>
<div class="com-content-category-blog__children cat-children">
<?php if ($this->params->get('show_category_heading_title_text', 1) == 1) : ?>
<h3> <?php echo Text::_('JGLOBAL_SUBCATEGORIES'); ?> </h3>
<?php endif; ?>
<?php echo $this->loadTemplate('children'); ?> </div>
<?php endif; ?>
<?php if (($this->params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?>
<div class="com-content-category-blog__navigation w-100">
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
<p class="com-content-category-blog__counter counter float-end pt-3 pe-2">
<?php echo $this->pagination->getPagesCounter(); ?>
</p>
<?php endif; ?>
<div class="com-content-category-blog__pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
</div>
<?php endif; ?>
</div>

View File

@@ -0,0 +1,84 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
$lang = Factory::getLanguage();
$user = Factory::getUser();
$groups = $user->getAuthorisedViewLevels();
if ($this->maxLevel != 0 && count($this->children[$this->category->id]) > 0) : ?>
<?php foreach ($this->children[$this->category->id] as $id => $child) : ?>
<?php // Check whether category access level allows access to subcategories. ?>
<?php if (in_array($child->access, $groups)) : ?>
<?php if ($this->params->get('show_empty_categories') || $child->numitems || count($child->getChildren())) : ?>
<div class="com-content-category-blog__child">
<?php if ($lang->isRtl()) : ?>
<h3 class="page-header item-title">
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info tip">
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php else : ?>
<h3 class="page-header item-title"><a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info">
<?php echo Text::_('COM_CONTENT_NUM_ITEMS'); ?>&nbsp;
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php endif; ?>
<?php if ($this->params->get('show_subcat_desc') == 1) : ?>
<?php if ($child->description) : ?>
<div class="com-content-category-blog__description category-desc">
<?php echo HTMLHelper::_('content.prepare', $child->description, '', 'com_content.category'); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->maxLevel > 1 && count($child->getChildren()) > 0) : ?>
<div class="com-content-category-blog__children collapse fade" id="category-<?php echo $child->id; ?>">
<?php
$this->children[$child->id] = $child->getChildren();
$this->category = $child;
$this->maxLevel--;
echo $this->loadTemplate('children');
$this->category = $child->getParent();
$this->maxLevel++;
?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif;

View File

@@ -0,0 +1,100 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\RouteHelper;
// Create a shortcut for params.
$params = $this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $params->get('info_block_position', 0);
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('Y-m-d H:i:s');
$isUnpublished = ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $this->item->publish_up > $currentDate)
|| ($this->item->publish_down < $currentDate && $this->item->publish_down !== null);
?>
<section id="<?php echo $this->item->alias;?>">
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<div class="item-content">
<?php if ($isUnpublished) : ?>
<div class="system-unpublished">
<?php endif; ?>
<?php echo LayoutHelper::render('joomla.content.blog_style_default_item_title', $this->item); ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<?php // @todo Not that elegant would be nice to group the params ?>
<?php $useDefList = ($params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|| $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam); ?>
<?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'above']); ?>
<?php endif; ?>
<?php if ($info == 0 && $params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<?php echo LayoutHelper::render('joomla.content.tags', $this->item->tags->itemTags); ?>
<?php endif; ?>
<?php if (!$params->get('show_intro')) : ?>
<?php // Content is generated by content plugin event "onContentAfterTitle" ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay" ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php echo $this->item->introtext; ?>
<?php if ($info == 1 || $info == 2) : ?>
<?php if ($useDefList) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'below']); ?>
<?php endif; ?>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<?php echo LayoutHelper::render('joomla.content.tags', $this->item->tags->itemTags); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($params->get('show_readmore') && $this->item->readmore) :
if ($params->get('access-view')) :
$link = Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language));
else :
$menu = Factory::getApplication()->getMenu();
$active = $menu->getActive();
$itemId = $active->id;
$link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false));
$link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)));
endif; ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php if ($isUnpublished) : ?>
</div>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
<?php echo $this->item->event->afterDisplayContent; ?>
</div>
</section>

View File

@@ -0,0 +1,25 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
?>
<ol class="com-content-blog__links">
<?php foreach ($this->link_items as $item) : ?>
<li class="com-content-blog__link">
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($item->slug, $item->catid, $item->language)); ?>">
<?php echo $item->title; ?></a>
</li>
<?php endforeach; ?>
</ol>

View File

@@ -0,0 +1,23 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Layout\LayoutHelper;
?>
<div class="com-content-category category-list">
<?php
$this->subtemplatename = 'articles';
echo LayoutHelper::render('joomla.content.category_default', $this);
?>
</div>

View File

@@ -0,0 +1,347 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\AssociationHelper;
use Joomla\Component\Content\Site\Helper\RouteHelper;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('com_content.articles-list');
// Create some shortcuts.
$n = count($this->items);
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
$langFilter = false;
// Tags filtering based on language filter
if (($this->params->get('filter_field') === 'tag') && (Multilanguage::isEnabled())) {
$tagfilter = ComponentHelper::getParams('com_tags')->get('tag_list_language_filter');
switch ($tagfilter) {
case 'current_language':
$langFilter = Factory::getApplication()->getLanguage()->getTag();
break;
case 'all':
$langFilter = false;
break;
default:
$langFilter = $tagfilter;
}
}
// Check for at least one editable article
$isEditable = false;
if (!empty($this->items)) {
foreach ($this->items as $article) {
if ($article->params->get('access-edit')) {
$isEditable = true;
break;
}
}
}
$currentDate = Factory::getDate()->format('Y-m-d H:i:s');
?>
<form action="<?php echo htmlspecialchars(Uri::getInstance()->toString()); ?>" method="post" name="adminForm" id="adminForm" class="com-content-category__articles">
<?php if ($this->params->get('filter_field') !== 'hide') : ?>
<div class="com-content__filter btn-group">
<?php if ($this->params->get('filter_field') === 'tag') : ?>
<span class="visually-hidden">
<label class="filter-search-lbl" for="filter-search">
<?php echo Text::_('JOPTION_SELECT_TAG'); ?>
</label>
</span>
<select name="filter_tag" id="filter-search" class="form-select" onchange="document.adminForm.submit();" >
<option value=""><?php echo Text::_('JOPTION_SELECT_TAG'); ?></option>
<?php echo HTMLHelper::_('select.options', HTMLHelper::_('tag.options', ['filter.published' => [1], 'filter.language' => $langFilter], true), 'value', 'text', $this->state->get('filter.tag')); ?>
</select>
<?php elseif ($this->params->get('filter_field') === 'month') : ?>
<span class="visually-hidden">
<label class="filter-search-lbl" for="filter-search">
<?php echo Text::_('JOPTION_SELECT_MONTH'); ?>
</label>
</span>
<select name="filter-search" id="filter-search" class="form-select" onchange="document.adminForm.submit();">
<option value=""><?php echo Text::_('JOPTION_SELECT_MONTH'); ?></option>
<?php echo HTMLHelper::_('select.options', HTMLHelper::_('content.months', $this->state), 'value', 'text', $this->state->get('list.filter')); ?>
</select>
<?php else : ?>
<label class="filter-search-lbl visually-hidden" for="filter-search">
<?php echo Text::_('COM_CONTENT_' . $this->params->get('filter_field') . '_FILTER_LABEL'); ?>
</label>
<input type="text" name="filter-search" id="filter-search" value="<?php echo $this->escape($this->state->get('list.filter')); ?>" class="inputbox" onchange="document.adminForm.submit();" placeholder="<?php echo Text::_('COM_CONTENT_' . $this->params->get('filter_field') . '_FILTER_LABEL'); ?>">
<?php endif; ?>
<?php if ($this->params->get('filter_field') !== 'tag' && $this->params->get('filter_field') !== 'month') : ?>
<button type="submit" name="filter_submit" class="btn btn-primary"><?php echo Text::_('JGLOBAL_FILTER_BUTTON'); ?></button>
<?php endif; ?>
<button type="reset" name="filter-clear-button" class="btn btn-secondary"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
</div>
<?php endif; ?>
<?php if ($this->params->get('show_pagination_limit')) : ?>
<div class="com-content-category__pagination btn-group float-end">
<label for="limit" class="visually-hidden">
<?php echo Text::_('JGLOBAL_DISPLAY_NUM'); ?>
</label>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
<?php endif; ?>
<?php if (empty($this->items)) : ?>
<?php if ($this->params->get('show_no_articles', 1)) : ?>
<div class="alert alert-info">
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
<?php echo Text::_('COM_CONTENT_NO_ARTICLES'); ?>
</div>
<?php endif; ?>
<?php else : ?>
<table class="com-content-category__table category table table-striped table-bordered table-hover">
<caption class="visually-hidden">
<?php echo Text::_('COM_CONTENT_ARTICLES_TABLE_CAPTION'); ?>
</caption>
<thead<?php echo $this->params->get('show_headings', '1') ? '' : ' class="visually-hidden"'; ?>>
<tr>
<th scope="col" id="categorylist_header_title">
<?php echo HTMLHelper::_('grid.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder, null, 'asc', '', 'adminForm'); ?>
</th>
<?php if ($date = $this->params->get('list_show_date')) : ?>
<th scope="col" id="categorylist_header_date">
<?php if ($date === 'created') : ?>
<?php echo HTMLHelper::_('grid.sort', 'COM_CONTENT_' . $date . '_DATE', 'a.created', $listDirn, $listOrder); ?>
<?php elseif ($date === 'modified') : ?>
<?php echo HTMLHelper::_('grid.sort', 'COM_CONTENT_' . $date . '_DATE', 'a.modified', $listDirn, $listOrder); ?>
<?php elseif ($date === 'published') : ?>
<?php echo HTMLHelper::_('grid.sort', 'COM_CONTENT_' . $date . '_DATE', 'a.publish_up', $listDirn, $listOrder); ?>
<?php endif; ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('list_show_author')) : ?>
<th scope="col" id="categorylist_header_author">
<?php echo HTMLHelper::_('grid.sort', 'JAUTHOR', 'author', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('list_show_hits')) : ?>
<th scope="col" id="categorylist_header_hits">
<?php echo HTMLHelper::_('grid.sort', 'JGLOBAL_HITS', 'a.hits', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('list_show_votes', 0) && $this->vote) : ?>
<th scope="col" id="categorylist_header_votes">
<?php echo HTMLHelper::_('grid.sort', 'COM_CONTENT_VOTES', 'rating_count', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('list_show_ratings', 0) && $this->vote) : ?>
<th scope="col" id="categorylist_header_ratings">
<?php echo HTMLHelper::_('grid.sort', 'COM_CONTENT_RATINGS', 'rating', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<?php if ($isEditable) : ?>
<th scope="col" id="categorylist_header_edit"><?php echo Text::_('COM_CONTENT_EDIT_ITEM'); ?></th>
<?php endif; ?>
</tr>
</thead>
<tbody>
<?php foreach ($this->items as $i => $article) : ?>
<?php if ($this->items[$i]->state == ContentComponent::CONDITION_UNPUBLISHED) : ?>
<tr class="system-unpublished cat-list-row<?php echo $i % 2; ?>">
<?php else : ?>
<tr class="cat-list-row<?php echo $i % 2; ?>" >
<?php endif; ?>
<th class="list-title" scope="row">
<?php if (in_array($article->access, $this->user->getAuthorisedViewLevels())) : ?>
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($article->slug, $article->catid, $article->language)); ?>">
<?php echo $this->escape($article->title); ?>
</a>
<?php if (Associations::isEnabled() && $this->params->get('show_associations')) : ?>
<div class="cat-list-association">
<?php $associations = AssociationHelper::displayAssociations($article->id); ?>
<?php foreach ($associations as $association) : ?>
<?php if ($this->params->get('flags', 1) && $association['language']->image) : ?>
<?php $flag = HTMLHelper::_('image', 'mod_languages/' . $association['language']->image . '.gif', $association['language']->title_native, ['title' => $association['language']->title_native], true); ?>
<a href="<?php echo Route::_($association['item']); ?>"><?php echo $flag; ?></a>
<?php else : ?>
<?php $class = 'btn btn-secondary btn-sm btn-' . strtolower($association['language']->lang_code); ?>
<a class="<?php echo $class; ?>" title="<?php echo $association['language']->title_native; ?>" href="<?php echo Route::_($association['item']); ?>"><?php echo $association['language']->lang_code; ?>
<span class="visually-hidden"><?php echo $association['language']->title_native; ?></span>
</a>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php else : ?>
<?php
echo $this->escape($article->title) . ' : ';
$itemId = Factory::getApplication()->getMenu()->getActive()->id;
$link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false));
$link->setVar('return', base64_encode(RouteHelper::getArticleRoute($article->slug, $article->catid, $article->language)));
?>
<a href="<?php echo $link; ?>" class="register">
<?php echo Text::_('COM_CONTENT_REGISTER_TO_READ_MORE'); ?>
</a>
<?php if (Associations::isEnabled() && $this->params->get('show_associations')) : ?>
<div class="cat-list-association">
<?php $associations = AssociationHelper::displayAssociations($article->id); ?>
<?php foreach ($associations as $association) : ?>
<?php if ($this->params->get('flags', 1)) : ?>
<?php $flag = HTMLHelper::_('image', 'mod_languages/' . $association['language']->image . '.gif', $association['language']->title_native, ['title' => $association['language']->title_native], true); ?>
<a href="<?php echo Route::_($association['item']); ?>"><?php echo $flag; ?></a>
<?php else : ?>
<?php $class = 'btn btn-secondary btn-sm btn-' . strtolower($association['language']->lang_code); ?>
<a class="<?php echo $class; ?>" title="<?php echo $association['language']->title_native; ?>" href="<?php echo Route::_($association['item']); ?>"><?php echo $association['language']->lang_code; ?>
<span class="visually-hidden"><?php echo $association['language']->title_native; ?></span>
</a>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($article->state == ContentComponent::CONDITION_UNPUBLISHED) : ?>
<div>
<span class="list-published badge bg-warning text-light">
<?php echo Text::_('JUNPUBLISHED'); ?>
</span>
</div>
<?php endif; ?>
<?php if ($article->publish_up > $currentDate) : ?>
<div>
<span class="list-published badge bg-warning text-light">
<?php echo Text::_('JNOTPUBLISHEDYET'); ?>
</span>
</div>
<?php endif; ?>
<?php if (!is_null($article->publish_down) && $article->publish_down < $currentDate) : ?>
<div>
<span class="list-published badge bg-warning text-light">
<?php echo Text::_('JEXPIRED'); ?>
</span>
</div>
<?php endif; ?>
</th>
<?php if ($this->params->get('list_show_date')) : ?>
<td class="list-date small">
<?php
echo HTMLHelper::_(
'date',
$article->displayDate,
$this->escape($this->params->get('date_format', Text::_('DATE_FORMAT_LC3')))
); ?>
</td>
<?php endif; ?>
<?php if ($this->params->get('list_show_author', 1)) : ?>
<td class="list-author">
<?php if (!empty($article->author) || !empty($article->created_by_alias)) : ?>
<?php $author = $article->author ?>
<?php $author = $article->created_by_alias ?: $author; ?>
<?php if (!empty($article->contact_link) && $this->params->get('link_author') == true) : ?>
<?php if ($this->params->get('show_headings')) : ?>
<?php echo HTMLHelper::_('link', $article->contact_link, $author); ?>
<?php else : ?>
<?php echo Text::sprintf('COM_CONTENT_WRITTEN_BY', HTMLHelper::_('link', $article->contact_link, $author)); ?>
<?php endif; ?>
<?php else : ?>
<?php if ($this->params->get('show_headings')) : ?>
<?php echo $author; ?>
<?php else : ?>
<?php echo Text::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
</td>
<?php endif; ?>
<?php if ($this->params->get('list_show_hits', 1)) : ?>
<td class="list-hits">
<span class="badge bg-info">
<?php if ($this->params->get('show_headings')) : ?>
<?php echo $article->hits; ?>
<?php else : ?>
<?php echo Text::sprintf('JGLOBAL_HITS_COUNT', $article->hits); ?>
<?php endif; ?>
</span>
</td>
<?php endif; ?>
<?php if ($this->params->get('list_show_votes', 0) && $this->vote) : ?>
<td class="list-votes">
<span class="badge bg-success">
<?php if ($this->params->get('show_headings')) : ?>
<?php echo $article->rating_count; ?>
<?php else : ?>
<?php echo Text::sprintf('COM_CONTENT_VOTES_COUNT', $article->rating_count); ?>
<?php endif; ?>
</span>
</td>
<?php endif; ?>
<?php if ($this->params->get('list_show_ratings', 0) && $this->vote) : ?>
<td class="list-ratings">
<span class="badge bg-warning text-light">
<?php if ($this->params->get('show_headings')) : ?>
<?php echo $article->rating; ?>
<?php else : ?>
<?php echo Text::sprintf('COM_CONTENT_RATINGS_COUNT', $article->rating); ?>
<?php endif; ?>
</span>
</td>
<?php endif; ?>
<?php if ($isEditable) : ?>
<td class="list-edit">
<?php if ($article->params->get('access-edit')) : ?>
<?php echo HTMLHelper::_('contenticon.edit', $article, $article->params); ?>
<?php endif; ?>
</td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<?php // Code to add a link to submit an article. ?>
<?php if ($this->category->getParams()->get('access-create')) : ?>
<?php echo HTMLHelper::_('contenticon.create', $this->category, $this->category->params); ?>
<?php endif; ?>
<?php // Add pagination links ?>
<?php if (!empty($this->items)) : ?>
<?php if (($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?>
<div class="com-content-category__navigation w-100">
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
<p class="com-content-category__counter counter float-end pt-3 pe-2">
<?php echo $this->pagination->getPagesCounter(); ?>
</p>
<?php endif; ?>
<div class="com-content-category__pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<div>
<input type="hidden" name="filter_order" value="">
<input type="hidden" name="filter_order_Dir" value="">
<input type="hidden" name="limitstart" value="">
<input type="hidden" name="task" value="">
</div>
</form>

View File

@@ -0,0 +1,83 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
$lang = Factory::getLanguage();
$user = Factory::getUser();
$groups = $user->getAuthorisedViewLevels();
?>
<?php if (count($this->children[$this->category->id]) > 0) : ?>
<?php foreach ($this->children[$this->category->id] as $id => $child) : ?>
<?php // Check whether category access level allows access to subcategories. ?>
<?php if (in_array($child->access, $groups)) : ?>
<?php if ($this->params->get('show_empty_categories') || $child->getNumItems(true) || count($child->getChildren())) : ?>
<div class="com-content-category__children">
<?php if ($lang->isRtl()) : ?>
<h3 class="page-header item-title">
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info tip hasTooltip" title="<?php echo HTMLHelper::_('tooltipText', 'COM_CONTENT_NUM_ITEMS'); ?>">
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if (count($child->getChildren()) > 0 && $this->maxLevel > 1) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php else : ?>
<h3 class="page-header item-title"><a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>">
<?php echo $this->escape($child->title); ?></a>
<?php if ($this->params->get('show_cat_num_articles', 1)) : ?>
<span class="badge bg-info tip hasTooltip" title="<?php echo HTMLHelper::_('tooltipText', 'COM_CONTENT_NUM_ITEMS'); ?>">
<?php echo $child->getNumItems(true); ?>
</span>
<?php endif; ?>
<?php if (count($child->getChildren()) > 0 && $this->maxLevel > 1) : ?>
<a href="#category-<?php echo $child->id; ?>" data-bs-toggle="collapse" class="btn btn-sm float-end" aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"><span class="icon-plus" aria-hidden="true"></span></a>
<?php endif; ?>
</h3>
<?php endif; ?>
<?php if ($this->params->get('show_subcat_desc') == 1) : ?>
<?php if ($child->description) : ?>
<div class="category-desc">
<?php echo HTMLHelper::_('content.prepare', $child->description, '', 'com_content.category'); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if (count($child->getChildren()) > 0 && $this->maxLevel > 1) : ?>
<div class="collapse fade" id="category-<?php echo $child->id; ?>">
<?php
$this->children[$child->id] = $child->getChildren();
$this->category = $child;
$this->maxLevel--;
echo $this->loadTemplate('children');
$this->category = $child->getParent();
$this->maxLevel++;
?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@@ -0,0 +1,73 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<div class="blog-featured" itemscope itemtype="https://schema.org/Blog">
<?php if ($this->params->get('show_page_heading') != 0) : ?>
<div class="page-header">
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
</div>
<?php endif; ?>
<?php if (!empty($this->lead_items)) : ?>
<div class="blog-items items-leading <?php echo $this->params->get('blog_class_leading'); ?>">
<?php foreach ($this->lead_items as &$item) : ?>
<div class="blog-item"
itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<?php
$this->item = & $item;
echo $this->loadTemplate('item');
?>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if (!empty($this->intro_items)) : ?>
<?php $blogClass = $this->params->get('blog_class', ''); ?>
<?php if ((int) $this->params->get('num_columns') > 1) : ?>
<?php $blogClass .= (int) $this->params->get('multi_column_order', 0) === 0 ? ' masonry-' : ' columns-'; ?>
<?php $blogClass .= (int) $this->params->get('num_columns'); ?>
<?php endif; ?>
<div class="blog-items <?php echo $blogClass; ?>">
<?php foreach ($this->intro_items as $key => &$item) : ?>
<div class="blog-item"
itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<?php
$this->item = & $item;
echo $this->loadTemplate('item');
?>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if (!empty($this->link_items)) : ?>
<div class="items-more">
<?php echo $this->loadTemplate('links'); ?>
</div>
<?php endif; ?>
<?php if ($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2 && $this->pagination->pagesTotal > 1)) : ?>
<div class="w-100">
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
<p class="counter float-end pt-3 pe-2">
<?php echo $this->pagination->getPagesCounter(); ?>
</p>
<?php endif; ?>
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
<?php endif; ?>
</div>

View File

@@ -0,0 +1,119 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\RouteHelper;
// Create a shortcut for params.
$params = &$this->item->params;
$canEdit = $this->item->params->get('access-edit');
$info = $this->item->params->get('info_block_position', 0);
// Check if associations are implemented. If they are, define the parameter.
$assocParam = (Associations::isEnabled() && $params->get('show_associations'));
$currentDate = Factory::getDate()->format('Y-m-d H:i:s');
$isExpired = !is_null($this->item->publish_down) && $this->item->publish_down < $currentDate;
$isNotPublishedYet = $this->item->publish_up > $currentDate;
$isUnpublished = $this->item->state == ContentComponent::CONDITION_UNPUBLISHED || $isNotPublishedYet || $isExpired;
?>
<?php echo LayoutHelper::render('joomla.content.intro_image', $this->item); ?>
<div class="item-content">
<?php if ($isUnpublished) : ?>
<div class="system-unpublished">
<?php endif; ?>
<?php if ($params->get('show_title')) : ?>
<h2 class="item-title" itemprop="headline">
<?php if ($params->get('link_titles') && $params->get('access-view')) : ?>
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)); ?>" itemprop="url">
<?php echo $this->escape($this->item->title); ?>
</a>
<?php else : ?>
<?php echo $this->escape($this->item->title); ?>
<?php endif; ?>
</h2>
<?php endif; ?>
<?php if ($this->item->state == ContentComponent::CONDITION_UNPUBLISHED) : ?>
<span class="badge bg-warning text-light"><?php echo Text::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
<?php if ($isNotPublishedYet) : ?>
<span class="badge bg-warning text-light"><?php echo Text::_('JNOTPUBLISHEDYET'); ?></span>
<?php endif; ?>
<?php if ($isExpired) : ?>
<span class="badge bg-warning text-light"><?php echo Text::_('JEXPIRED'); ?></span>
<?php endif; ?>
<?php if ($canEdit) : ?>
<?php echo LayoutHelper::render('joomla.content.icons', ['params' => $params, 'item' => $this->item]); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterTitle" ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php // @todo Not that elegant would be nice to group the params ?>
<?php $useDefList = ($params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|| $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') || $assocParam); ?>
<?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'above']); ?>
<?php endif; ?>
<?php if ($info == 0 && $params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<?php echo LayoutHelper::render('joomla.content.tags', $this->item->tags->itemTags); ?>
<?php endif; ?>
<?php // Content is generated by content plugin event "onContentBeforeDisplay" ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php echo $this->item->introtext; ?>
<?php if ($info == 1 || $info == 2) : ?>
<?php if ($useDefList) : ?>
<?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $this->item, 'params' => $params, 'position' => 'below']); ?>
<?php endif; ?>
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<?php echo LayoutHelper::render('joomla.content.tags', $this->item->tags->itemTags); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($params->get('show_readmore') && $this->item->readmore) :
if ($params->get('access-view')) :
$link = Route::_(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language));
else :
$menu = Factory::getApplication()->getMenu();
$active = $menu->getActive();
$itemId = $active->id;
$link = new Uri(Route::_('index.php?option=com_users&view=login&Itemid=' . $itemId, false));
$link->setVar('return', base64_encode(RouteHelper::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language)));
endif; ?>
<?php echo LayoutHelper::render('joomla.content.readmore', ['item' => $this->item, 'params' => $params, 'link' => $link]); ?>
<?php endif; ?>
<?php if ($isUnpublished) : ?>
</div>
<?php endif; ?>
</div>
<?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
<?php echo $this->item->event->afterDisplayContent; ?>

View File

@@ -0,0 +1,24 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_content
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Router\Route;
use Joomla\Component\Content\Site\Helper\RouteHelper;
?>
<ol class="com-content-blog__links">
<?php foreach ($this->link_items as $item) : ?>
<li class="com-content-blog__link">
<a href="<?php echo Route::_(RouteHelper::getArticleRoute($item->slug, $item->catid, $item->language)); ?>">
<?php echo $item->title; ?></a>
</li>
<?php endforeach; ?>
</ol>

View File

@@ -0,0 +1,193 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
/**
* Layout variables
*
* @var array $items
* @var MPFInput $input
* @var MPFConfig $config
* @var int $Itemid
* @var int $categoryId
* @var OSMembershipHelperBootstrap $bootstrapHelper
*/
$rootUri = Uri::root(true);
$subscribedPlanIds = OSMembershipHelperSubscription::getSubscribedPlans();
if (!isset($categoryId))
{
$categoryId = 0;
}
$rowFluidClass = $bootstrapHelper->getClassMapping('row-fluid');
$span7Class = $bootstrapHelper->getClassMapping('span7');
$span5class = $bootstrapHelper->getClassMapping('span5');
$imgClass = $bootstrapHelper->getClassMapping('img-polaroid');
$btnClass = $bootstrapHelper->getClassMapping('btn');
$btnPrimaryClass = $bootstrapHelper->getClassMapping('btn btn-primary');
$clearfixClass = $bootstrapHelper->getClassMapping('clearfix');
$defaultItemId = $Itemid;
for ($i = 0 , $n = count($items) ; $i < $n ; $i++)
{
$item = $items[$i];
$Itemid = OSMembershipHelperRoute::getPlanMenuId($item->id, $item->category_id, $defaultItemId);
if ($item->thumb)
{
$imgSrc = $rootUri . '/media/com_osmembership/' . $item->thumb;
}
if ($item->category_id)
{
$url = Route::_('index.php?option=com_osmembership&view=plan&catid=' . $item->category_id . '&id=' . $item->id . '&Itemid=' . $Itemid);
}
else
{
$url = Route::_('index.php?option=com_osmembership&view=plan&id=' . $item->id . '&Itemid=' . $Itemid);
}
if ($config->use_https)
{
$signUpUrl = Route::_(OSMembershipHelperRoute::getSignupRoute($item->id, $Itemid), false, 1);
}
else
{
$signUpUrl = Route::_(OSMembershipHelperRoute::getSignupRoute($item->id, $Itemid));
}
$symbol = $item->currency_symbol ?: $item->currency;
?>
<div class="osm-item-wrapper <?php echo $clearfixClass; ?>">
<div class="osm-item-heading-box <?php echo $clearfixClass; ?>">
<h3 class="osm-item-title">
<a href="<?php echo $url; ?>" title="<?php echo $item->title; ?>">
<?php echo $item->title; ?>
</a>
</h3>
</div>
<div class="osm-item-description <?php echo $clearfixClass; ?>">
<div class="<?php echo $rowFluidClass; ?>">
<div class="osm-description-details <?php echo $span7Class; ?>">
<?php
if ($item->thumb)
{
?>
<img src="<?php echo $imgSrc; ?>" alt="<?php echo $item->title; ?>" class="osm-thumb-left <?php echo $imgClass; ?>"/>
<?php
}
if ($item->short_description)
{
echo $item->short_description;
}
else
{
echo $item->description;
}
?>
</div>
<div class="<?php echo $span5class; ?>">
<?php echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/plan_information.php', ['item' => $item]); ?>
</div>
</div>
<div class="osm-taskbar <?php echo $clearfixClass; ?>">
<ul>
<?php
$actions = OSMembershipHelperSubscription::getAllowedActions($item);
if (count($actions))
{
$language = Factory::getApplication()->getLanguage();
if (in_array('subscribe', $actions))
{
if ($language->hasKey('OSM_SIGNUP_PLAN_' . $item->id))
{
$signUpLanguageItem = 'OSM_SIGNUP_PLAN_' . $item->id;
}
else
{
$signUpLanguageItem = 'OSM_SIGNUP';
}
if ($language->hasKey('OSM_RENEW_PLAN_' . $item->id))
{
$renewLanguageItem = 'OSM_RENEW_PLAN_' . $item->id;
}
else
{
$renewLanguageItem = 'OSM_RENEW';
}
?>
<li>
<a href="<?php echo $signUpUrl; ?>" class="<?php echo $btnPrimaryClass; ?>">
<?php echo in_array($item->id, $subscribedPlanIds) ? Text::_($renewLanguageItem) : Text::_($signUpLanguageItem); ?>
</a>
</li>
<?php
}
if (in_array('upgrade', $actions))
{
if ($language->hasKey('OSM_UPGRADE_PLAN_' . $item->id))
{
$upgradeLanguageItem = 'OSM_UPGRADE_PLAN_' . $item->id;
}
else
{
$upgradeLanguageItem = 'OSM_UPGRADE';
}
if (count($item->upgrade_rules) > 1)
{
$link = Route::_('index.php?option=com_osmembership&view=upgrademembership&to_plan_id=' . $item->id . '&Itemid=' . OSMembershipHelperRoute::findView('upgrademembership', $Itemid));
}
else
{
$upgradeOptionId = $item->upgrade_rules[0]->id;
$link = Route::_('index.php?option=com_osmembership&task=register.process_upgrade_membership&upgrade_option_id=' . $upgradeOptionId . '&Itemid=' . $Itemid);
}
?>
<li>
<a href="<?php echo $link; ?>" class="<?php echo $btnPrimaryClass; ?>">
<?php echo Text::_($upgradeLanguageItem); ?>
</a>
</li>
<?php
}
}
if (empty($config->hide_details_button))
{
?>
<li>
<a href="<?php echo $url; ?>" class="<?php echo $btnClass; ?>">
<?php echo Text::_('OSM_DETAILS'); ?>
</a>
</li>
<?php
}
?>
</ul>
</div>
</div>
</div>
<?php
}

View File

@@ -0,0 +1,33 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
/**
* Layout variables
*
* @var string $selector
* @var string $title
*/
defined('_JEXEC') or die;
Factory::getApplication()
->getDocument()
->getWebAssetManager()
->useScript('core');
Text::script('JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST');
$message = "alert(Joomla.JText._('JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST'));";
?>
<button type="button" data-toggle="modal" onclick="if (document.adminForm.boxchecked.value==0){<?php echo $message; ?>}else{jQuery( '#<?php echo $selector; ?>' ).modal('show'); return true;}" class="btn btn-small">
<span class="icon-checkbox-partial" aria-hidden="true"></span>
<?php echo $title; ?>
</button>

View File

@@ -0,0 +1,22 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2010 - 2022 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
/**
* Layout variables
*
* @var string $selector
* @var string $title
*/
?>
<button type="button" data-toggle="modal" onclick="jQuery( '#<?php echo $selector; ?>' ).modal('show'); return true;" class="btn btn-small">
<span class="icon-checkbox-partial" aria-hidden="true"></span>
<?php echo $title; ?>
</button>

View File

@@ -0,0 +1,54 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
/**
* Layout variables
*
* @var array $items
* @var MPFConfig $config
* @var int $categoryId
* @var int $Itemid
*/
$bootstrapHelper = OSMembershipHelperBootstrap::getInstance();
$clearfixClass = $bootstrapHelper->getClassMapping('clearfix');
for ($i = 0 , $n = count($items) ; $i < $n ; $i++)
{
$item = $items[$i];
$link = Route::_(OSMembershipHelperRoute::getCategoryRoute($item->id, $Itemid));
?>
<div class="osm-item-wrapper clearfix">
<div class="osm-item-heading-box">
<h3 class="osm-item-title">
<a href="<?php echo $link; ?>" class="osm-item-title-link">
<?php echo $item->title;?>
</a>
<span class="<?php echo $bootstrapHelper->getClassMapping('badge badge-info'); ?>"><?php echo $item->total_plans ;?> <?php echo $item->total_plans > 1 ? Text::_('OSM_PLANS') : Text::_('OSM_PLAN') ; ?></span>
</h3>
</div>
<?php
if($item->description)
{
?>
<div class="osm-item-description <?php echo $clearfixClass; ?>">
<?php echo HTMLHelper::_('content.prepare', $item->description);?>
</div>
<?php
}
?>
</div>
<?php
}

View File

@@ -0,0 +1,218 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
/**
* Layout variables
*
* @var array $items
* @var int $categoryId
* @var MPFInput $input
* @var MPFConfig $config
* @var OSMembershipHelperBootstrap $bootstrapHelper
* @var \Joomla\Registry\Registry $params
* @var int $Itemid
*/
Factory::getApplication()
->getDocument()
->getWebAssetManager()
->useScript('core');
$rootUri = Uri::root(true);
$minHeight = 130;
if (isset($params))
{
$minHeight = (int) $params->get('min_height', 130) ?: 130;
}
OSMembershipHelperJquery::responsiveEqualHeight('.osm-item-description-text', $minHeight);
$subscribedPlanIds = OSMembershipHelperSubscription::getSubscribedPlans();
if (isset($input) && $input->getInt('number_columns'))
{
$numberColumns = $input->getInt('number_columns');
}
elseif (!empty($config->number_columns))
{
$numberColumns = $config->number_columns;
}
else
{
$numberColumns = 3;
}
if (!isset($categoryId))
{
$categoryId = 0;
}
$span = intval(12 / $numberColumns);
$btnClass = $bootstrapHelper->getClassMapping('btn');
$btnPrimaryClass = $bootstrapHelper->getClassMapping('btn btn-primary');
$imgClass = $bootstrapHelper->getClassMapping('img-polaroid');
$spanClass = $bootstrapHelper->getClassMapping('span' . $span);
$rowFluidClearfixClass = $bootstrapHelper->getClassMapping('row-fluid clearfix');
$clearFixClass = $bootstrapHelper->getClassMapping('clearfix');
?>
<div class="<?php echo $rowFluidClearfixClass; ?>">
<?php
$i = 0;
$numberPlans = count($items);
$defaultItemId = $Itemid;
foreach ($items as $item)
{
$i++;
$Itemid = OSMembershipHelperRoute::getPlanMenuId($item->id, $item->category_id, $defaultItemId);
if ($item->thumb)
{
$imgSrc = $rootUri . '/media/com_osmembership/' . $item->thumb;
}
$url = Route::_('index.php?option=com_osmembership&view=plan&catid=' . $item->category_id . '&id=' . $item->id . '&Itemid=' . $Itemid);
if ($config->use_https)
{
$signUpUrl = Route::_(OSMembershipHelperRoute::getSignupRoute($item->id, $Itemid), false, 1);
}
else
{
$signUpUrl = Route::_(OSMembershipHelperRoute::getSignupRoute($item->id, $Itemid));
}
?>
<div class="osm-item-wrapper <?php echo $spanClass; ?>">
<div class="osm-item-heading-box <?php echo $clearFixClass; ?>">
<h2 class="osm-item-title">
<a href="<?php echo $url; ?>" title="<?php echo $item->title; ?>">
<?php echo $item->title; ?>
</a>
</h2>
</div>
<div class="osm-item-description <?php echo $clearFixClass; ?>">
<?php
if ($item->thumb)
{
?>
<a href="<?php echo $url; ?>" title="<?php echo $item->title; ?>">
<img src="<?php echo $imgSrc; ?>" class="osm-thumb-left <?php echo $imgClass; ?>" />
</a>
<?php
}
if (!$item->short_description)
{
$item->short_description = $item->description;
}
?>
<div class="osm-item-description-text"><?php echo $item->short_description; ?></div>
<div class="osm-taskbar <?php echo $clearFixClass; ?>">
<ul>
<?php
$actions = OSMembershipHelperSubscription::getAllowedActions($item);
if (count($actions))
{
$language = Factory::getApplication()->getLanguage();
if (in_array('subscribe', $actions))
{
if ($language->hasKey('OSM_SIGNUP_PLAN_' . $item->id))
{
$signUpLanguageItem = 'OSM_SIGNUP_PLAN_' . $item->id;
}
else
{
$signUpLanguageItem = 'OSM_SIGNUP';
}
if ($language->hasKey('OSM_RENEW_PLAN_' . $item->id))
{
$renewLanguageItem = 'OSM_RENEW_PLAN_' . $item->id;
}
else
{
$renewLanguageItem = 'OSM_RENEW';
}
?>
<li>
<a href="<?php echo $signUpUrl; ?>" class="<?php echo $btnPrimaryClass; ?>">
<?php echo in_array($item->id, $subscribedPlanIds) ? Text::_($renewLanguageItem) : Text::_($signUpLanguageItem); ?>
</a>
</li>
<?php
}
if (in_array('upgrade', $actions))
{
if ($language->hasKey('OSM_UPGRADE_PLAN_' . $item->id))
{
$upgradeLanguageItem = 'OSM_UPGRADE_PLAN_' . $item->id;
}
else
{
$upgradeLanguageItem = 'OSM_UPGRADE';
}
if (count($item->upgrade_rules) > 1)
{
$link = Route::_('index.php?option=com_osmembership&view=upgrademembership&to_plan_id=' . $item->id . '&Itemid=' . OSMembershipHelperRoute::findView('upgrademembership', $Itemid));
}
else
{
$upgradeOptionId = $item->upgrade_rules[0]->id;
$link = Route::_('index.php?option=com_osmembership&task=register.process_upgrade_membership&upgrade_option_id=' . $upgradeOptionId . '&Itemid=' . $Itemid);
}
?>
<li>
<a href="<?php echo $link; ?>" class="<?php echo $btnPrimaryClass; ?>">
<?php echo Text::_($upgradeLanguageItem); ?>
</a>
</li>
<?php
}
}
if (empty($config->hide_details_button))
{
?>
<li>
<a href="<?php echo $url; ?>" class="<?php echo $btnClass; ?>">
<?php echo Text::_('OSM_DETAILS'); ?>
</a>
</li>
<?php
}
?>
</ul>
</div>
</div>
</div>
<?php
if ($i % $numberColumns == 0 && $i < $numberPlans)
{
?>
</div>
<div class="<?php echo $rowFluidClearfixClass; ?>">
<?php
}
}
?>
</div>

View File

@@ -0,0 +1,229 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
/**
* Layout variables
*
* @var array $items
* @var int $categoryId
* @var MPFInput $input
* @var MPFConfig $config
* @var OSMembershipHelperBootstrap $bootstrapHelper
* @var \Joomla\Registry\Registry $params
* @var int $Itemid
*/
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
$rootUri = Uri::root(true);
$subscribedPlanIds = OSMembershipHelperSubscription::getSubscribedPlans();
if (!isset($categoryId))
{
$categoryId = 0;
}
$rowFluidClass = $bootstrapHelper->getClassMapping('row-fluid');
$imgClass = $bootstrapHelper->getClassMapping('img-polaroid');
$btnClass = $bootstrapHelper->getClassMapping('btn');
$btnPrimaryClass = $bootstrapHelper->getClassMapping('btn btn-primary');
$clearfixClass = $bootstrapHelper->getClassMapping('clearfix');
$defaultItemId = $Itemid;
if (isset($params))
{
$showPlanInformation = $params->get('show_plan_information', 1);
$planInformationPosition = $params->get('plan_information_position', 0);
}
else
{
$showPlanInformation = 1;
$planInformationPosition = 0;
}
if ($showPlanInformation && $planInformationPosition == 0)
{
$leftClass = $bootstrapHelper->getClassMapping('span7');
$rightClass = $bootstrapHelper->getClassMapping('span5');
}
else
{
$leftClass = $bootstrapHelper->getClassMapping('clearfix');
$rightClass = $bootstrapHelper->getClassMapping('clearfix');
}
for ($i = 0 , $n = count($items) ; $i < $n ; $i++)
{
$item = $items[$i];
$Itemid = OSMembershipHelperRoute::getPlanMenuId($item->id, $item->category_id, $defaultItemId);
if ($item->thumb)
{
$imgSrc = $rootUri . '/media/com_osmembership/' . $item->thumb;
}
if ($item->category_id)
{
$url = Route::_('index.php?option=com_osmembership&view=plan&catid=' . $item->category_id . '&id=' . $item->id . '&Itemid=' . $Itemid);
}
else
{
$url = Route::_('index.php?option=com_osmembership&view=plan&id=' . $item->id . '&Itemid=' . $Itemid);
}
if ($config->use_https)
{
$signUpUrl = Route::_(OSMembershipHelperRoute::getSignupRoute($item->id, $Itemid), false, 1);
}
else
{
$signUpUrl = Route::_(OSMembershipHelperRoute::getSignupRoute($item->id, $Itemid));
}
?>
<div class="osm-item-wrapper <?php echo $clearfixClass; ?>">
<div class="osm-item-heading-box <?php echo $clearfixClass; ?>">
<h2 class="osm-item-title">
<a href="<?php echo $url; ?>" title="<?php echo $item->title; ?>">
<?php echo $item->title; ?>
</a>
</h2>
</div>
<div class="osm-item-description <?php echo $clearfixClass; ?>">
<div class="<?php echo $rowFluidClass; ?>">
<?php
if ($showPlanInformation && $planInformationPosition == 1)
{
?>
<div class="<?php echo $rightClass; ?>">
<?php echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/plan_information.php', ['item' => $item]); ?>
</div>
<?php
}
?>
<div class="osm-description-details <?php echo $leftClass; ?>">
<?php
if ($item->thumb)
{
?>
<img src="<?php echo $imgSrc; ?>" alt="<?php echo $item->title; ?>" class="osm-thumb-left <?php echo $imgClass; ?>"/>
<?php
}
if ($item->short_description)
{
echo $item->short_description;
}
else
{
echo $item->description;
}
?>
</div>
<?php
if ($showPlanInformation && in_array($planInformationPosition, [0, 2]))
{
?>
<div class="<?php echo $rightClass; ?>">
<?php echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/plan_information.php', ['item' => $item]); ?>
</div>
<?php
}
?>
</div>
<div class="osm-taskbar <?php echo $clearfixClass; ?>">
<ul>
<?php
$actions = OSMembershipHelperSubscription::getAllowedActions($item);
if (count($actions))
{
$language = Factory::getApplication()->getLanguage();
if (in_array('subscribe', $actions))
{
if ($language->hasKey('OSM_SIGNUP_PLAN_' . $item->id))
{
$signUpLanguageItem = 'OSM_SIGNUP_PLAN_' . $item->id;
}
else
{
$signUpLanguageItem = 'OSM_SIGNUP';
}
if ($language->hasKey('OSM_RENEW_PLAN_' . $item->id))
{
$renewLanguageItem = 'OSM_RENEW_PLAN_' . $item->id;
}
else
{
$renewLanguageItem = 'OSM_RENEW';
}
?>
<li>
<a href="<?php echo $signUpUrl; ?>" class="<?php echo $btnPrimaryClass; ?>">
<?php echo in_array($item->id, $subscribedPlanIds) ? Text::_($renewLanguageItem) : Text::_($signUpLanguageItem); ?>
</a>
</li>
<?php
}
if (in_array('upgrade', $actions))
{
if ($language->hasKey('OSM_UPGRADE_PLAN_' . $item->id))
{
$upgradeLanguageItem = 'OSM_UPGRADE_PLAN_' . $item->id;
}
else
{
$upgradeLanguageItem = 'OSM_UPGRADE';
}
if (count($item->upgrade_rules) > 1)
{
$link = Route::_('index.php?option=com_osmembership&view=upgrademembership&to_plan_id=' . $item->id . '&Itemid=' . OSMembershipHelperRoute::findView('upgrademembership', $Itemid));
}
else
{
$upgradeOptionId = $item->upgrade_rules[0]->id;
$link = Route::_('index.php?option=com_osmembership&task=register.process_upgrade_membership&upgrade_option_id=' . $upgradeOptionId . '&Itemid=' . $Itemid);
}
?>
<li>
<a href="<?php echo $link; ?>" class="<?php echo $btnPrimaryClass; ?>">
<?php echo Text::_($upgradeLanguageItem); ?>
</a>
</li>
<?php
}
}
if (empty($config->hide_details_button))
{
?>
<li>
<a href="<?php echo $url; ?>" class="<?php echo $btnClass; ?>">
<?php echo Text::_('OSM_DETAILS'); ?>
</a>
</li>
<?php
}
?>
</ul>
</div>
</div>
</div>
<?php
}

View File

@@ -0,0 +1,25 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
/**
* Layout variables
*
* @var array $rowMembers
*/
$names = [];
foreach ($rowMembers as $rowMember)
{
$names[] = trim($rowMember->first_name . ' ' . $rowMember->last_name);
}
echo implode("\r\n", $names);

View File

@@ -0,0 +1,34 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
/**
* Layout variables
*
* @var string $redirectHeading
* @var string $url
* @var bool $newWindow
* @var array $data
*/
?>
<div class="payment-heading"><?php echo $redirectHeading; ?></div>
<form method="post" action="<?php echo $url; ?>" name="payment_form"
id="payment_form"<?php if ($newWindow) echo ' target="_blank"'; ?>>
<?php
foreach ($data as $key => $val)
{
echo '<input type="hidden" name="' . $key . '" value="' . $val . '" />';
echo "\n";
}
?>
<script type="text/javascript">
document.payment_form.submit();
</script>
</form>

View File

@@ -0,0 +1,44 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
/**
* Layout variables
*
* @var stdClass $item
*/
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
try
{
$form = Form::getInstance('plan_fields', JPATH_ROOT . '/components/com_osmembership/fields.xml', [], false, '//config');
}
catch (Exception $e)
{
return;
}
foreach ($form->getFieldset('basic') as $field)
{
if ($field->getAttribute('hide'))
{
continue;
}
?>
<tr class="osm-plan-property">
<td class="osm-plan-property-label">
<?php echo Text::_($field->getAttribute('label')); ?>:
</td>
<td class="osm-plan-property-value">
<?php echo $item->fieldsData->get($field->getAttribute('name')); ?>
</td>
</tr>
<?php
}

View File

@@ -0,0 +1,127 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
/**
* Layout variables
*
* @var stdClass $item
*/
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
$bootstrapHelper = OSMembershipHelperBootstrap::getInstance();
$config = OSMembershipHelper::getConfig();
$symbol = $item->currency_symbol ?: $item->currency;
?>
<table class="<?php echo $bootstrapHelper->getClassMapping('table table-striped table-bordered'); ?>">
<?php
if ($item->setup_fee > 0)
{
?>
<tr class="osm-plan-property">
<td class="osm-plan-property-label">
<?php echo Text::_('OSM_SETUP_FEE'); ?>:
</td>
<td class="osm-plan-property-value">
<?php echo OSMembershipHelper::formatCurrency($item->setup_fee, $config, $symbol); ?>
</td>
</tr>
<?php
}
if ($item->recurring_subscription && $item->trial_duration)
{
?>
<tr class="osm-plan-property">
<td class="osm-plan-property-label">
<?php echo Text::_('OSM_TRIAL_DURATION'); ?>:
</td>
<td class="osm-plan-property-value">
<?php
if ($item->lifetime_membership)
{
echo Text::_('OSM_LIFETIME');
}
else
{
echo OSMembershipHelperSubscription::getDurationText($item->trial_duration, $item->trial_duration_unit);
}
?>
</td>
</tr>
<tr class="osm-plan-property">
<td class="osm-plan-property-label">
<?php echo Text::_('OSM_TRIAL_PRICE'); ?>:
</td>
<td class="osm-plan-property-value">
<?php
if ($item->trial_amount > 0)
{
echo OSMembershipHelper::formatCurrency($item->trial_amount, $config, $symbol);
}
else
{
echo Text::_('OSM_FREE');
}
?>
</td>
</tr>
<?php
}
if (!((int) $item->expired_date))
{
?>
<tr class="osm-plan-property">
<td class="osm-plan-property-label">
<?php echo Text::_('OSM_DURATION'); ?>:
</td>
<td class="osm-plan-property-value">
<?php
if ($item->lifetime_membership)
{
echo Text::_('OSM_LIFETIME');
}
else
{
echo OSMembershipHelperSubscription::getDurationText($item->subscription_length, $item->subscription_length_unit);
}
?>
</td>
</tr>
<?php
}
?>
<tr class="osm-plan-property">
<td class="osm-plan-property-label">
<?php echo Text::_('OSM_PRICE'); ?>:
</td>
<td class="osm-plan-property-value">
<?php
if ($item->price > 0)
{
echo OSMembershipHelper::formatCurrency($item->price, $config, $symbol);
}
else
{
echo Text::_('OSM_FREE');
}
?>
</td>
</tr>
<?php
if (file_exists(JPATH_ROOT . '/components/com_osmembership/fields.xml')
&& filesize(JPATH_ROOT . '/components/com_osmembership/fields.xml'))
{
echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/plan_custom_fields.php', ['item' => $item]);
}
?>
</table>

View File

@@ -0,0 +1,68 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
/**
* Layout variables
*
* @var stdClass $item
*/
$config = OSMembershipHelper::getConfig();
$dec_point = $config->dec_point ?? '.';
$thousands_sep = $config->thousands_sep ?? ',';
if ($item->lifetime_membership)
{
$subscriptionLengthText = Text::_('OSM_LIFETIME');
}
else
{
$subscriptionLengthText = OSMembershipHelperSubscription::getDurationText($item->subscription_length, $item->subscription_length_unit, false);
}
if ($item->price > 0)
{
$priceParts = explode('.', $item->price);
if ($priceParts[1] == '00' || $config->decimals === '0')
{
$numberDecimals = 0;
}
else
{
$numberDecimals = 2;
}
$symbol = $item->currency_symbol ?: $item->currency;
if (!$symbol)
{
$symbol = $config->currency_symbol;
}
if ($config->currency_position == 0)
{
echo $symbol . number_format($item->price, $numberDecimals, $dec_point, $thousands_sep) . ($subscriptionLengthText ? "<sub>/$subscriptionLengthText</sub>" : '');
}
else
{
echo number_format($item->price, $numberDecimals, $dec_point, $thousands_sep) . $symbol . ($subscriptionLengthText ? "<sub>/$subscriptionLengthText</sub>" : '');
}
}
else
{
echo Text::_('OSM_FREE') . ($subscriptionLengthText ? "<sub> /$subscriptionLengthText</sub>" : '');
}

View File

@@ -0,0 +1,236 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
/**
* Layout variables
*
* @var array $items
* @var MPFInput $input
* @var MPFConfig $config
* @var int $Itemid
* @var int $categoryId
* @var OSMembershipHelperBootstrap $bootstrapHelper
*/
$rootUri = Uri::root(true);
$subscribedPlanIds = OSMembershipHelperSubscription::getSubscribedPlans();
if (empty($params))
{
$params = Factory::getApplication()->getParams();
}
if (isset($input) && $input->getInt('recommended_plan_id'))
{
$recommendedPlanId = $input->getInt('recommended_plan_id');
}
else
{
$recommendedPlanId = (int) $params->get('recommended_campaign_id');
}
$standardPlanBackgroundColor = $params->get('standard_plan_color', '#00B69C');
$recommendedPlanBackgroundColor = $params->get('recommended_plan_color', '#bF75500');
$showDetailsButton = $params->get('show_details_button', 0);
if (isset($input) && $input->getInt('number_columns'))
{
$numberColumns = $input->getInt('number_columns');
}
elseif (isset($config->number_columns))
{
$numberColumns = $config->number_columns;
}
else
{
$numberColumns = 3;
}
$numberColumns = min($numberColumns, 5);
if (!isset($categoryId))
{
$categoryId = 0;
}
$span = intval(12 / $numberColumns);
$imgClass = $bootstrapHelper->getClassMapping('img-polaroid');
$spanClass = $bootstrapHelper->getClassMapping('span' . $span);
$i = 0;
$numberPlans = count($items);
$defaultItemId = $Itemid;
$rootUri = Uri::root(true);
foreach ($items as $item)
{
$Itemid = OSMembershipHelperRoute::getPlanMenuId($item->id, $item->category_id, $defaultItemId);
if ($item->thumb)
{
$imgSrc = $rootUri . '/media/com_osmembership/' . $item->thumb;
}
$url = Route::_('index.php?option=com_osmembership&view=plan&catid=' . $item->category_id . '&id=' . $item->id . '&Itemid=' . $Itemid);
if ($config->use_https)
{
$signUpUrl = Route::_(OSMembershipHelperRoute::getSignupRoute($item->id, $Itemid), false, 1);
}
else
{
$signUpUrl = Route::_(OSMembershipHelperRoute::getSignupRoute($item->id, $Itemid));
}
if (!$item->short_description)
{
$item->short_description = $item->description;
}
if ($item->id == $recommendedPlanId)
{
$recommended = true;
$backgroundColor = $recommendedPlanBackgroundColor;
}
else
{
$recommended = false;
$backgroundColor = $standardPlanBackgroundColor;
}
if ($i % $numberColumns == 0)
{
?>
<div class="<?php echo $bootstrapHelper->getClassMapping('row-fluid clearfix'); ?> osm-pricing-table-circle">
<?php
}
?>
<div class="<?php echo $spanClass; ?>">
<div class="osm-plan osm-plan-<?php echo $item->id; ?>">
<div class="osm-plan-header" style="background-color: <?php echo $backgroundColor; ?>">
<h2 class="osm-plan-title">
<?php echo $item->title; ?>
</h2>
<div class="osm-plan-price" style="background-color: <?php echo $backgroundColor; ?>">
<p class="price">
<?php echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/priceduration.php', ['item' => $item]); ?>
</p>
</div>
</div>
<div class="osm-plan-short-description">
<?php echo $item->short_description;?>
</div>
<ul class="osm-signup-container">
<?php
$actions = OSMembershipHelperSubscription::getAllowedActions($item);
if(count($actions))
{
$language = Factory::getApplication()->getLanguage();
if (in_array('subscribe', $actions))
{
if ($language->hasKey('OSM_SIGNUP_PLAN_' . $item->id))
{
$signUpLanguageItem = 'OSM_SIGNUP_PLAN_' . $item->id;
}
else
{
$signUpLanguageItem = 'OSM_SIGNUP';
}
if ($language->hasKey('OSM_RENEW_PLAN_' . $item->id))
{
$renewLanguageItem = 'OSM_RENEW_PLAN_' . $item->id;
}
else
{
$renewLanguageItem = 'OSM_RENEW';
}
?>
<li>
<a href="<?php echo $signUpUrl; ?>" class="btn-signup" style="background-color: <?php echo $backgroundColor; ?>">
<?php echo in_array($item->id, $subscribedPlanIds) ? Text::_($renewLanguageItem) : Text::_($signUpLanguageItem); ?>
</a>
</li>
<?php
}
if (in_array('upgrade', $actions))
{
if ($language->hasKey('OSM_UPGRADE_PLAN_' . $item->id))
{
$upgradeLanguageItem = 'OSM_UPGRADE_PLAN_' . $item->id;
}
else
{
$upgradeLanguageItem = 'OSM_UPGRADE';
}
if (count($item->upgrade_rules) > 1)
{
$link = Route::_('index.php?option=com_osmembership&view=upgrademembership&to_plan_id=' . $item->id . '&Itemid=' . OSMembershipHelperRoute::findView('upgrademembership', $Itemid));
}
else
{
$upgradeOptionId = $item->upgrade_rules[0]->id;
$link = Route::_('index.php?option=com_osmembership&task=register.process_upgrade_membership&upgrade_option_id=' . $upgradeOptionId . '&Itemid=' . $Itemid);
}
?>
<li>
<a href="<?php echo $link; ?>" class="btn-signup" style="background-color: <?php echo $backgroundColor; ?>">
<?php echo Text::_($upgradeLanguageItem); ?>
</a>
</li>
<?php
}
}
if ($showDetailsButton)
{
?>
<li>
<a href="<?php echo $url; ?>" class="btn-signup" style="background-color: <?php echo $backgroundColor; ?>">
<?php echo Text::_('OSM_DETAILS'); ?>
</a>
</li>
<?php
}
?>
</ul>
</div>
</div>
<?php
if (($i + 1) % $numberColumns == 0)
{
?>
</div>
<?php
}
$i++;
}
if ($i % $numberColumns != 0)
{
echo '</div>' ;
}
?>
<style type="text/css">
.osm-pricing-table-circle .osm-plan:hover .osm-plan-price {
background-color: <?php echo $recommendedPlanBackgroundColor; ?>!important;
}
</style>

View File

@@ -0,0 +1,231 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
/**
* Layout variables
*
* @var array $items
* @var MPFInput $input
* @var MPFConfig $config
* @var int $Itemid
* @var int $categoryId
* @var OSMembershipHelperBootstrap $bootstrapHelper
*/
// Load equals height script
$rootUri = Uri::root(true);
$subscribedPlanIds = OSMembershipHelperSubscription::getSubscribedPlans();
if (empty($params))
{
$params = Factory::getApplication()->getParams();
}
if (isset($input) && $input->getInt('recommended_plan_id'))
{
$recommendedPlanId = $input->getInt('recommended_plan_id');
}
else
{
$recommendedPlanId = (int) $params->get('recommended_campaign_id');
}
$standardPlanBackgroundColor = $params->get('standard_plan_color', '#00B69C');
$recommendedPlanBackgroundColor = $params->get('recommended_plan_color', '#F75500');
$showDetailsButton = $params->get('show_details_button', 0);
if (isset($input) && $input->getInt('number_columns'))
{
$numberColumns = $input->getInt('number_columns');
}
elseif (isset($config->number_columns))
{
$numberColumns = $config->number_columns;
}
else
{
$numberColumns = 3;
}
$numberColumns = min($numberColumns, 5);
if (!isset($categoryId))
{
$categoryId = 0;
}
$span = intval(12 / $numberColumns);
$imgClass = $bootstrapHelper->getClassMapping('img-polaroid');
$spanClass = $bootstrapHelper->getClassMapping('span' . $span);
$i = 0;
$numberPlans = count($items);
$defaultItemId = $Itemid;
$rootUri = Uri::root(true);
foreach ($items as $item)
{
$Itemid = OSMembershipHelperRoute::getPlanMenuId($item->id, $item->category_id, $defaultItemId);
if ($item->thumb)
{
$imgSrc = $rootUri . '/media/com_osmembership/' . $item->thumb;
}
$url = Route::_('index.php?option=com_osmembership&view=plan&catid=' . $item->category_id . '&id=' . $item->id . '&Itemid=' . $Itemid);
if ($config->use_https)
{
$signUpUrl = Route::_(OSMembershipHelperRoute::getSignupRoute($item->id, $Itemid), false, 1);
}
else
{
$signUpUrl = Route::_(OSMembershipHelperRoute::getSignupRoute($item->id, $Itemid));
}
if (!$item->short_description)
{
$item->short_description = $item->description;
}
if ($item->id == $recommendedPlanId)
{
$recommended = true;
$backgroundColor = $recommendedPlanBackgroundColor;
}
else
{
$recommended = false;
$backgroundColor = $standardPlanBackgroundColor;
}
if ($i % $numberColumns == 0)
{
?>
<div class="<?php echo $bootstrapHelper->getClassMapping('row-fluid clearfix'); ?> osm-pricing-table-flat">
<?php
}
?>
<div class="<?php echo $spanClass; ?>">
<div class="osm-plan osm-plan-<?php echo $item->id; ?>" style="background-color: <?php echo $backgroundColor; ?>">
<div class="osm-plan-header">
<h2 class="osm-plan-title">
<?php echo $item->title; ?>
</h2>
</div>
<div class="osm-plan-price">
<p class="price">
<?php echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/priceduration.php', ['item' => $item]); ?>
</p>
</div>
<div class="osm-plan-short-description">
<?php echo $item->short_description;?>
</div>
<ul class="osm-signup-container">
<?php
$actions = OSMembershipHelperSubscription::getAllowedActions($item);
if (count($actions))
{
$language = Factory::getApplication()->getLanguage();
if (in_array('subscribe', $actions))
{
if ($language->hasKey('OSM_SIGNUP_PLAN_' . $item->id))
{
$signUpLanguageItem = 'OSM_SIGNUP_PLAN_' . $item->id;
}
else
{
$signUpLanguageItem = 'OSM_SIGNUP';
}
if ($language->hasKey('OSM_RENEW_PLAN_' . $item->id))
{
$renewLanguageItem = 'OSM_RENEW_PLAN_' . $item->id;
}
else
{
$renewLanguageItem = 'OSM_RENEW';
}
?>
<li>
<a href="<?php echo $signUpUrl; ?>" class="btn-signup">
<?php echo in_array($item->id, $subscribedPlanIds) ? Text::_($renewLanguageItem) : Text::_($signUpLanguageItem); ?>
</a>
</li>
<?php
}
if (in_array('upgrade', $actions))
{
if ($language->hasKey('OSM_UPGRADE_PLAN_' . $item->id))
{
$upgradeLanguageItem = 'OSM_UPGRADE_PLAN_' . $item->id;
}
else
{
$upgradeLanguageItem = 'OSM_UPGRADE';
}
if (count($item->upgrade_rules) > 1)
{
$link = Route::_('index.php?option=com_osmembership&view=upgrademembership&to_plan_id=' . $item->id . '&Itemid=' . OSMembershipHelperRoute::findView('upgrademembership', $Itemid));
}
else
{
$upgradeOptionId = $item->upgrade_rules[0]->id;
$link = Route::_('index.php?option=com_osmembership&task=register.process_upgrade_membership&upgrade_option_id=' . $upgradeOptionId . '&Itemid=' . $Itemid);
}
?>
<li>
<a href="<?php echo $link; ?>" class="btn-signup">
<?php echo Text::_($upgradeLanguageItem); ?>
</a>
</li>
<?php
}
}
if ($showDetailsButton)
{
?>
<li>
<a href="<?php echo $url; ?>" class="btn-signup oms-btn-details">
<?php echo Text::_('OSM_DETAILS'); ?>
</a>
</li>
<?php
}
?>
</ul>
</div>
</div>
<?php
if (($i + 1) % $numberColumns == 0)
{
?>
</div>
<?php
}
$i++;
}
if ($i % $numberColumns != 0)
{
echo '</div>' ;
}

View File

@@ -0,0 +1,259 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
/**
* Layout variables
*
* @var array $items
* @var MPFInput $input
* @var MPFConfig $config
* @var int $Itemid
* @var int $categoryId
* @var OSMembershipHelperBootstrap $bootstrapHelper
*/
$subscribedPlanIds = OSMembershipHelperSubscription::getSubscribedPlans();
if (empty($params))
{
$params = Factory::getApplication()->getParams();
}
// Background color settings
$badgeBgColor = $params->get('recommended_badge_background_color');
$headerBgColor = $params->get('header_background_color');
$priceBgColor = $params->get('price_background_color');
$recommendedPriceBgColor = $params->get('recommended_plan_price_background_color');
if (isset($input) && $input->getInt('recommended_plan_id'))
{
$recommendedPlanId = $input->getInt('recommended_plan_id');
}
else
{
$recommendedPlanId = (int) $params->get('recommended_campaign_id');
}
$showDetailsButton = $params->get('show_details_button', 0);
if (isset($input) && $input->getInt('number_columns'))
{
$numberColumns = $input->getInt('number_columns');
}
elseif (isset($config->number_columns))
{
$numberColumns = $config->number_columns ;
}
else
{
$numberColumns = 3 ;
}
$numberColumns = min($numberColumns, 4);
if (!isset($categoryId))
{
$categoryId = 0;
}
$span = intval(12 / $numberColumns);
$btnClass = $bootstrapHelper->getClassMapping('btn');
$btnPrimaryClass = $bootstrapHelper->getClassMapping('btn btn-primary');
$imgClass = $bootstrapHelper->getClassMapping('img-polaroid');
$spanClass = $bootstrapHelper->getClassMapping('span' . $span);
$rootUri = Uri::root(true);
$i = 0;
$numberPlans = count($items);
$defaultItemId = $Itemid;
foreach ($items as $item)
{
$Itemid = OSMembershipHelperRoute::getPlanMenuId($item->id, $item->category_id, $defaultItemId);
if ($item->thumb)
{
$imgSrc = $rootUri . '/media/com_osmembership/' . $item->thumb;
}
$url = Route::_('index.php?option=com_osmembership&view=plan&catid=' . $item->category_id . '&id=' . $item->id . '&Itemid=' . $Itemid);
if ($config->use_https)
{
$signUpUrl = Route::_(OSMembershipHelperRoute::getSignupRoute($item->id, $Itemid), false, 1);
}
else
{
$signUpUrl = Route::_(OSMembershipHelperRoute::getSignupRoute($item->id, $Itemid));
}
if (!$item->short_description)
{
$item->short_description = $item->description;
}
if ($item->id == $recommendedPlanId)
{
$recommended = true;
}
else
{
$recommended = false;
}
if ($recommended && $recommendedPriceBgColor)
{
$planPriceBackgroundColor = $recommendedPriceBgColor;
}
elseif ($priceBgColor)
{
$planPriceBackgroundColor = $priceBgColor;
}
else
{
$planPriceBackgroundColor = '';
}
if ($i % $numberColumns == 0)
{
?>
<div class="<?php echo $bootstrapHelper->getClassMapping('row-fluid clearfix'); ?> osm-pricing-table">
<?php
}
?>
<div class="<?php echo $spanClass; ?>">
<div class="osm-plan<?php if ($recommended) echo ' osm-plan-recommended'; ?> osm-plan-<?php echo $item->id; ?>">
<?php
if ($recommended)
{
?>
<p class="plan-recommended"<?php if ($badgeBgColor) echo ' style=" background-color:' . $badgeBgColor . '";'; ?>><?php echo Text::_('OSM_RECOMMENDED'); ?></p>
<?php
}
?>
<div class="osm-plan-header"<?php if ($headerBgColor) echo ' style=" background-color:' . $headerBgColor . '";'; ?>>
<h2 class="osm-plan-title">
<?php echo $item->title; ?>
</h2>
</div>
<div class="osm-plan-price"<?php if ($planPriceBackgroundColor) echo ' style=" background-color:' . $planPriceBackgroundColor . '";'; ?>>
<h2>
<p class="price">
<?php echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/priceduration.php', ['item' => $item]); ?>
</p>
</h2>
</div>
<div class="osm-plan-short-description">
<?php echo $item->short_description;?>
</div>
<?php
$actions = OSMembershipHelperSubscription::getAllowedActions($item);
if (count($actions) || $showDetailsButton)
{
$language = Factory::getApplication()->getLanguage();
?>
<ul class="osm-signup-container">
<?php
if (in_array('subscribe', $actions))
{
if ($language->hasKey('OSM_SIGNUP_PLAN_' . $item->id))
{
$signUpLanguageItem = 'OSM_SIGNUP_PLAN_' . $item->id;
}
else
{
$signUpLanguageItem = 'OSM_SIGNUP';
}
if ($language->hasKey('OSM_RENEW_PLAN_' . $item->id))
{
$renewLanguageItem = 'OSM_RENEW_PLAN_' . $item->id;
}
else
{
$renewLanguageItem = 'OSM_RENEW';
}
?>
<li>
<a href="<?php echo $signUpUrl; ?>" class="<?php echo $btnPrimaryClass; ?> btn-singup">
<?php echo in_array($item->id, $subscribedPlanIds) ? Text::_($renewLanguageItem) : Text::_($signUpLanguageItem); ?>
</a>
</li>
<?php
}
if (in_array('upgrade', $actions))
{
if ($language->hasKey('OSM_UPGRADE_PLAN_' . $item->id))
{
$upgradeLanguageItem = 'OSM_UPGRADE_PLAN_' . $item->id;
}
else
{
$upgradeLanguageItem = 'OSM_UPGRADE';
}
if (count($item->upgrade_rules) > 1)
{
$link = Route::_('index.php?option=com_osmembership&view=upgrademembership&to_plan_id=' . $item->id . '&Itemid=' . OSMembershipHelperRoute::findView('upgrademembership', $Itemid));
}
else
{
$upgradeOptionId = $item->upgrade_rules[0]->id;
$link = Route::_('index.php?option=com_osmembership&task=register.process_upgrade_membership&upgrade_option_id=' . $upgradeOptionId . '&Itemid=' . $Itemid);
}
?>
<li>
<a href="<?php echo $link; ?>" class="<?php echo $btnPrimaryClass; ?> btn-singup">
<?php echo Text::_($upgradeLanguageItem); ?>
</a>
</li>
<?php
}
if ($showDetailsButton)
{
?>
<li>
<a href="<?php echo $url; ?>" class="<?php echo $btnClass; ?>">
<?php echo Text::_('OSM_DETAILS'); ?>
</a>
</li>
<?php
}
?>
</ul>
<?php
}
?>
</div>
</div>
<?php
if (($i + 1) % $numberColumns == 0)
{
?>
</div>
<?php
}
$i++;
}
if ($i % $numberColumns != 0)
{
echo '</div>' ;
}

View File

@@ -0,0 +1,127 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
?>
<ul class="osm-renew-options">
<?php
$userId = Factory::getApplication()->getIdentity()->id;
$renewOptionCount = 0;
$fieldSuffix = OSMembershipHelper::getFieldSuffix();
foreach ($this->planIds as $planId)
{
$plan = $this->plans[$planId];
$taxRate = 0;
if ($this->config->show_price_including_tax && !$this->config->setup_price_including_tax)
{
$taxRate = OSMembershipHelper::calculateMaxTaxRate($planId);
}
$symbol = $plan->currency_symbol ?: $plan->currency;
$renewOptions = $this->renewOptions[$planId] ?? [];
if (count($renewOptions))
{
foreach ($renewOptions as $renewOption)
{
$checked = '';
if ($renewOptionCount == 0)
{
$checked = ' checked="checked" ';
}
$renewOptionCount++;
$renewOptionLengthText = OSMembershipHelperSubscription::getDurationText($renewOption->renew_option_length, $renewOption->renew_option_length_unit);
$renewOptionText = Text::sprintf('OSM_RENEW_OPTION_TEXT', $plan->title, $renewOptionLengthText, OSMembershipHelper::formatCurrency($renewOption->price * (1 + $taxRate / 100), $this->config, $symbol));
if (strpos($renewOptionText, '[EXPIRED_DATE]'))
{
$expiredDate = OSMembershipHelperSubscription::getPlanExpiredDate($planId);
if ($expiredDate)
{
$expiredDate = HTMLHelper::_('date', $expiredDate, $this->config->date_format);
}
$renewOptionText = str_replace('[EXPIRED_DATE]', $expiredDate, $renewOptionText);
}
?>
<li class="osm-renew-option">
<input type="radio" class="validate[required]<?php echo $this->bootstrapHelper->getFrameworkClass('uk-radio', 1); ?>" id="renew_option_id_<?php echo $renewOptionCount; ?>" name="renew_option_id" value="<?php echo $planId . '|' . $renewOption->id; ?>" <?php echo $checked; ?> />
<label for="renew_option_id_<?php echo $renewOptionCount; ?>"><?php echo $renewOptionText; ?></label>
</li>
<?php
}
}
else
{
$checked = '';
if ($renewOptionCount == 0)
{
$checked = ' checked="checked" ';
}
$renewOptionCount++;
$subscriptionLengthText = OSMembershipHelperSubscription::getDurationText($plan->subscription_length, $plan->subscription_length_unit);
$renewalDiscountRule = OSMembershipHelperSubscription::getRenewalDiscount($userId, $planId);
if ($renewalDiscountRule)
{
if ($renewalDiscountRule->discount_type == 0)
{
$plan->price = round($plan->price * (1 - $renewalDiscountRule->discount_amount / 100), 2);
}
else
{
$plan->price = $plan->price - $renewalDiscountRule->discount_amount;
}
if ($plan->price < 0)
{
$plan->price = 0;
}
}
$renewOptionText = Text::sprintf('OSM_RENEW_OPTION_TEXT', $plan->title, $subscriptionLengthText, OSMembershipHelper::formatCurrency($plan->price * (1 + $taxRate / 100), $this->config, $symbol));
if (strpos($renewOptionText, '[EXPIRED_DATE]'))
{
$expiredDate = OSMembershipHelperSubscription::getPlanExpiredDate($plan->id);
if ($expiredDate)
{
$expiredDate = HTMLHelper::_('date', $expiredDate, $this->config->date_format);
}
$renewOptionText = str_replace('[EXPIRED_DATE]', $expiredDate, $renewOptionText);
}
?>
<li class="osm-renew-option">
<input type="radio" class="validate[required]<?php echo $this->bootstrapHelper->getFrameworkClass('uk-radio', 1); ?>" id="renew_option_id_<?php echo $renewOptionCount; ?>" name="renew_option_id" value="<?php echo $planId;?>" <?php echo $checked; ?>/>
<label for="renew_option_id_<?php echo $renewOptionCount; ?>"><?php echo $renewOptionText; ?></label>
</li>
<?php
}
}
?>
</ul>
<div class="form-actions">
<input type="submit" class="<?php echo $this->bootstrapHelper->getClassMapping('btn btn-primary'); ?>" value="<?php echo Text::_('OSM_PROCESS_RENEW'); ?>"/>
</div>

View File

@@ -0,0 +1,29 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
/**
* Layout variables
*
* @var string $introText
* @var string $msg
* @var string $context
* @var stdClass $row
*/
if (isset($introText))
{
echo '<div class="intro-text">' . $introText . '</div>';
}
?>
<div class="text-info">
<?php echo $msg; ?>
</div>

View File

@@ -0,0 +1,174 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
/**
* Layout variables
*
* @var bool $showPagination
* @var \Joomla\CMS\Pagination\Pagination $pagination
*/
/* @var \Joomla\Database\DatabaseDriver $db */
$db = Factory::getContainer()->get('db');
$query = $db->getQuery(true)
->select('COUNT(*)')
->from('#__osmembership_plugins')
->where('published = 1')
->where('name NOT LIKE "os_offline%"');
$db->setQuery($query);
$hasOnlinePaymentPlugin = $db->loadResult() > 0;
$makePaymentItemid = OSMembershipHelperRoute::getViewRoute('payment', $this->Itemid);
$cols = 5;
$bootstrapHelper = OSMembershipHelperBootstrap::getInstance();
$centerClass = $bootstrapHelper->getClassMapping('center');
$hiddenPhoneClass = $bootstrapHelper->getClassMapping('hidden-phone');
?>
<table class="<?php echo $bootstrapHelper->getClassMapping('table table-striped table-bordered') ?>">
<thead>
<tr>
<th>
<?php echo Text::_('OSM_PLAN') ?>
</th>
<th class="<?php echo $centerClass; ?>">
<?php echo Text::_('OSM_SUBSCRIPTION_DATE') ; ?>
</th>
<th class="<?php echo $centerClass; ?>">
<?php echo Text::_('OSM_ACTIVATE_TIME') ; ?>
</th>
<th style="text-align: right;" class="<?php echo $hiddenPhoneClass; ?>">
<?php echo Text::_('OSM_GROSS_AMOUNT') ; ?>
</th>
<th class="<?php echo $hiddenPhoneClass; ?>">
<?php echo Text::_('OSM_SUBSCRIPTION_STATUS'); ?>
</th>
<?php
if ($this->config->activate_invoice_feature)
{
$cols++ ;
?>
<th class="<?php echo $hiddenPhoneClass . ' ' . $centerClass; ?>">
<?php echo Text::_('OSM_INVOICE_NUMBER') ; ?>
</th>
<?php
}
?>
</tr>
</thead>
<tbody>
<?php
$k = 0 ;
for ($i = 0 , $n = count($this->items) ; $i < $n ; $i++) {
$row = $this->items[$i];
$k = 1 - $k;
$link = Route::_('index.php?option=com_osmembership&view=subscription&id=' . $row->id . '&Itemid=' . $this->Itemid);
$symbol = $row->currency_symbol ?: $row->currency;
?>
<tr>
<td>
<a href="<?php echo $link; ?>"><?php echo $row->plan_title; ?></a>
</td>
<td class="<?php echo $centerClass; ?>">
<?php echo HTMLHelper::_('date', $row->created_date, $this->config->date_format); ?>
</td>
<td class="<?php echo $centerClass; ?>">
<strong><?php echo HTMLHelper::_('date', $row->from_date, $this->config->date_format); ?></strong> <?php echo Text::_('OSM_TO'); ?>
<strong>
<?php
if ($row->lifetime_membership || $row->to_date == '2099-12-31 23:59:59')
{
echo Text::_('OSM_LIFETIME');
}
else
{
echo HTMLHelper::_('date', $row->to_date, $this->config->date_format);
}
?>
</strong>
</td>
<td style="text-align: right;" class="<?php echo $hiddenPhoneClass; ?>">
<?php echo OSMembershipHelper::formatCurrency($row->gross_amount, $this->config, $symbol)?>
</td>
<td class="<?php echo $hiddenPhoneClass; ?>">
<?php
switch ($row->published)
{
case 0 :
echo Text::_('OSM_PENDING');
if ($this->config->enable_subscription_payment && $row->gross_amount > 0 && $hasOnlinePaymentPlugin)
{
?>
<br /><a class="<?php echo $bootstrapHelper->getClassMapping('btn btn-primary'); ?>" href="<?php echo Route::_('index.php?option=com_osmembership&view=payment&transaction_id=' . $row->transaction_id . '&Itemid=' . $makePaymentItemid); ?>"><?php echo Text::_('OSM_MAKE_PAYMENT'); ?></a>
<?php
}
break;
case 1 :
echo Text::_('OSM_ACTIVE');
break;
case 2 :
echo Text::_('OSM_EXPIRED');
break;
case 3 :
echo Text::_('OSM_CANCELLED_PENDING');
break;
case 4 :
echo Text::_('OSM_CANCELLED_REFUNDED');
break;
}
?>
</td>
<?php
if ($this->config->activate_invoice_feature)
{
?>
<td class="<?php echo $hiddenPhoneClass . ' ' . $centerClass; ?>">
<?php
if ($row->invoice_number)
{
?>
<a href="<?php echo Route::_('index.php?option=com_osmembership&task=download_invoice&id=' . $row->id); ?>" title="<?php echo Text::_('OSM_DOWNLOAD'); ?>"><?php echo OSMembershipHelper::formatInvoiceNumber($row, $this->config); ?></a>
<?php
}
?>
</td>
<?php
}
?>
</tr>
<?php
}
?>
</tbody>
<?php
if ($showPagination && ($pagination->total > $pagination->limit))
{
?>
<tfoot>
<tr>
<td colspan="<?php echo $cols; ?>">
<div class="pagination"><?php echo $this->pagination->getListFooter(); ?></div>
</td>
</tr>
</tfoot>
<?php
}
?>
</table>

View File

@@ -0,0 +1,104 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
/**
* Layout variables
*
* @var array $rows
* @var array $fields
*/
$config = OSMembershipHelper::getConfig();
$i = 1;
?>
<p style="padding-bottom: 20px; text-align: center;">
<h1><?php echo Text::_('OSM_SUBSCRIPTIONS_LIST'); ?></h1>
</p>
<table border="1" width="100%" cellspacing="0" cellpadding="2" style="margin-top: 100px;">
<thead>
<tr>
<th width="3%" height="20" style="text-align: center;">
No
</th>
<th height="20" width="8%">
<?php echo Text::_('OSM_FIRSTNAME'); ?>
</th height="20">
<th height="20" width="10%">
<?php echo Text::_('OSM_LASTNAME'); ?>
</th height="20">
<th height="20" width="20%">
<?php echo Text::_('OSM_PLAN'); ?>
</th>
<th height="20" width="17%" style="text-align: center">
<?php echo Text::_('OSM_START_DATE') . ' / ' . Text::_('OSM_END_DATE'); ?>
</th>
<th height="20" width="16%">
<?php echo Text::_('OSM_EMAIL'); ?>
</th>
<th height="20" width="9%" style="text-align: center;">
<?php echo Text::_('OSM_CREATED_DATE'); ?>
</th>
<th width="6%" height="20" style="text-align: right;">
<?php echo Text::_('OSM_GROSS_AMOUNT'); ?>
</th>
<th width="8%" height="20">
<?php echo Text::_('OSM_SUBSCRIPTION_STATUS'); ?>
</th>
<th width="3%" height="20" style="text-align: center;">
<?php echo Text::_('OSM_ID'); ?>
</th>
</tr>
</thead>
<tbody>
<?php
foreach ($rows as $row)
{
?>
<tr>
<td width="3%" style="text-align: center;"><?php echo $i++; ?></td>
<td width="8%"><?php echo $row->first_name; ?></td>
<td width="10%"><?php echo $row->last_name; ?></td>
<td width="20%;"><?php echo $row->plan; ?></td>
<td width="17%" style="text-align: center"><?php echo $row->from_date . ' / ' . $row->to_date; ?></td>
<td width="16%"><?php echo $row->email; ?></td>
<td width="9%" style="text-align: center;"><?php echo $row->created_date; ?></td>
<td width="6%" style="text-align: right;"><?php echo $row->amount; ?></td>
<th width="8%" height="20">
<?php
switch ($row->published)
{
case 0:
echo Text::_('OSM_PENDING');
break;
case 1:
echo Text::_('OSM_ACTIVE');
break;
case 2:
echo Text::_('OSM_EXPIRED');
break;
case 3 :
echo Text::_('OSM_CANCELLED_PENDING');
break ;
case 4 :
echo Text::_('OSM_CANCELLED_REFUNDED');
break ;
}
?>
</th>
<td width="3%" style="text-align: center;"><?php echo $row->id; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>

View File

@@ -0,0 +1,46 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
?>
<ul class="osm-upgrade-options">
<?php
$upgradeOptionCount = 0;
foreach ($this->upgradeRules as $rule)
{
$checked = '';
if ($upgradeOptionCount == 0)
{
$checked = ' checked="checked" ';
}
$upgradeOptionCount++;
$upgradeToPlan = $this->plans[$rule->to_plan_id];
$symbol = $upgradeToPlan->currency_symbol ?: $upgradeToPlan->currency;
$taxRate = 0;
if ($this->config->show_price_including_tax && !$this->config->setup_price_including_tax)
{
$taxRate = OSMembershipHelper::calculateMaxTaxRate($rule->to_plan_id);
}
?>
<li class="osm-upgrade-option">
<input type="radio" class="validate[required]<?php echo $this->bootstrapHelper->getFrameworkClass('uk-radio', 1);?>" id="upgrade_option_id_<?php echo $upgradeOptionCount; ?>" name="upgrade_option_id" value="<?php echo $rule->id; ?>"<?php echo $checked; ?> />
<label for="upgrade_option_id_<?php echo $upgradeOptionCount; ?>"><?php Text::printf('OSM_UPGRADE_OPTION_TEXT', $this->plans[$rule->from_plan_id]->title, $upgradeToPlan->title, OSMembershipHelper::formatCurrency($rule->price * (1 + $taxRate / 100), $this->config, $symbol)); ?></label>
</li>
<?php
}
?>
</ul>

View File

@@ -0,0 +1,139 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die ;
use Joomla\CMS\Editor\Editor;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Toolbar\Toolbar;
HTMLHelper::_('bootstrap.tooltip', '.hasTooltip', ['html' => true, 'sanitize' => false]);
$config = OSMembershipHelper::getConfig();
$editor = Editor::getInstance($config->get('editor') ?: Factory::getApplication()->get('editor'));
$translatable = Multilanguage::isEnabled() && count($this->languages);
$bootstrapHelper = OSMembershipHelperBootstrap::getInstance();
$rowFluid = $bootstrapHelper->getClassMapping('row-fluid');
$span8 = $bootstrapHelper->getClassMapping('span7');
$span4 = $bootstrapHelper->getClassMapping('span5');
HTMLHelper::_('formbehavior.chosen', '.advSelect');
Factory::getApplication()
->getDocument()
->getWebAssetManager()
->useScript('core')
->useScript('showon')
->registerAndUseScript('com_osmembership.site-mplan-default', 'media/com_osmembership/js/site-mplan-default.min.js');
$keys = ['OSM_ENTER_PLAN_TITLE', 'OSM_ENTER_SUBSCRIPTION_LENGTH', 'OSM_PRICE_REQUIRED', 'OSM_INVALID_SUBSCRIPTION_LENGTH'];
OSMembershipHelperHtml::addJSStrings($keys);
?>
<div id="osm-add-edit-plan" class="osm-container">
<h1 class="osm-page-title"><?php echo $this->item->id > 0 ? Text::_('OSM_EDIT_PLAN') : Text::_('OSM_ADD_PLAN'); ?></h1>
<div class="btn-toolbar" id="btn-toolbar">
<?php echo Toolbar::getInstance('toolbar')->render(); ?>
</div>
<form action="<?php echo Route::_('index.php?option=com_osmembership&view=mplan&Itemid=' . $this->Itemid, false); ?>" method="post" name="adminForm" id="adminForm" enctype="multipart/form-data" class="form form-horizontal">
<?php
echo HTMLHelper::_( 'uitab.startTabSet', 'plan', ['active' => 'basic-information-page', 'recall' => true]);
echo HTMLHelper::_( 'uitab.addTab', 'plan', 'basic-information-page', Text::_('OSM_BASIC_INFORMATION'));
echo $this->loadTemplate('general', ['editor' => $editor]);
echo HTMLHelper::_( 'uitab.endTab');
echo HTMLHelper::_( 'uitab.addTab', 'plan', 'recurring-settings-page', Text::_('OSM_RECURRING_SETTINGS'));
echo $this->loadTemplate('recurring_settings');
echo HTMLHelper::_( 'uitab.endTab');
echo HTMLHelper::_( 'uitab.addTab', 'plan', 'renew-options-page', Text::_('OSM_RENEW_OPTIONS'));
echo $this->loadTemplate('renew_options');
echo HTMLHelper::_( 'uitab.endTab');
echo HTMLHelper::_( 'uitab.addTab', 'plan', 'upgrade-options-page', Text::_('OSM_UPGRADE_OPTIONS'));
echo $this->loadTemplate('upgrade_options');
echo HTMLHelper::_( 'uitab.endTab');
echo HTMLHelper::_( 'uitab.addTab', 'plan', 'renewal-discounts-page', Text::_('OSM_EARLY_RENEWAL_DISCOUNTS'));
echo $this->loadTemplate('renewal_discounts');
echo HTMLHelper::_( 'uitab.endTab');
echo HTMLHelper::_( 'uitab.addTab', 'plan', 'reminders-settings-page', Text::_('OSM_REMINDERS_SETTINGS'));
echo $this->loadTemplate('reminders_settings');
echo HTMLHelper::_( 'uitab.endTab');
echo HTMLHelper::_( 'uitab.addTab', 'plan', 'group-membership-settings-page', Text::_('OSM_GROUP_MEMBERSHIP'));
echo $this->loadTemplate('group_membership');
echo HTMLHelper::_( 'uitab.endTab');
echo HTMLHelper::_( 'uitab.addTab', 'plan', 'advanced-settings-page', Text::_('OSM_ADVANCED_SETTINGS'));
echo $this->loadTemplate('advanced_settings');
echo HTMLHelper::_( 'uitab.endTab');
echo HTMLHelper::_( 'uitab.addTab', 'plan', 'metadata-page', Text::_('OSM_META_DATA'));
echo $this->loadTemplate('metadata');
echo HTMLHelper::_( 'uitab.endTab');
if ($this->config->activate_member_card_feature)
{
echo HTMLHelper::_( 'uitab.addTab', 'plan', 'member-card-page', Text::_('OSM_MEMBER_CARD_SETTINGS'));
echo $this->loadTemplate('member_card', ['editor' => $editor]);
echo HTMLHelper::_( 'uitab.endTab');
}
echo HTMLHelper::_( 'uitab.addTab', 'plan', 'messages-page', Text::_('OSM_MESSAGES'));
echo $this->loadTemplate('messages', ['editor' => $editor]);
echo HTMLHelper::_( 'uitab.endTab');
echo HTMLHelper::_( 'uitab.addTab', 'plan', 'reminder-messages-page', Text::_('OSM_REMINDER_MESSAGES'));
echo $this->loadTemplate('reminder_messages', ['editor' => $editor]);
echo HTMLHelper::_( 'uitab.endTab');
if ($translatable)
{
echo HTMLHelper::_( 'uitab.addTab', 'plan', 'translation-page', Text::_('OSM_TRANSLATION'));
echo $this->loadTemplate('translation', ['editor' => $editor]);
echo HTMLHelper::_( 'uitab.endTab');
}
if (count($this->plugins))
{
$count = 0 ;
foreach ($this->plugins as $plugin)
{
if (is_array($plugin) && array_key_exists('title', $plugin) && array_key_exists('form', $plugin))
{
$count++ ;
echo HTMLHelper::_( 'uitab.addTab', 'plan', 'tab_' . $count, Text::_($plugin['title']));
echo $plugin['form'];
echo HTMLHelper::_( 'uitab.endTab');
}
}
}
// Add support for custom settings layout
if (file_exists(__DIR__ . '/default_custom_settings.php'))
{
echo HTMLHelper::_( 'uitab.addTab', 'plan', 'custom-settings-page', Text::_('OSM_CUSTOM_SETTINGS'));
echo $this->loadTemplate('custom_settings', ['editor' => $editor]);
echo HTMLHelper::_( 'uitab.endTab');
}
echo HTMLHelper::_( 'uitab.endTabSet');
?>
<div class="clearfix"></div>
<?php echo HTMLHelper::_('form.token'); ?>
<input type="hidden" name="id" value="<?php echo (int) $this->item->id; ?>"/>
<input type="hidden" name="task" value="apply" />
<input type="hidden" id="recurring" name="recurring" value="<?php echo (int) $this->item->recurring_subscription;?>" />
</form>
</div>

View File

@@ -0,0 +1,171 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
$bootstrapHelper = OSMembershipHelperBootstrap::getInstance();
$rowFluidClasss = $bootstrapHelper->getClassMapping('row-fluid');
$controlGroupClass = $bootstrapHelper->getClassMapping('control-group');
$controlLabelClass = $bootstrapHelper->getClassMapping('control-label');
$controlsClass = $bootstrapHelper->getClassMapping('controls');
?>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('setup_fee', Text::_('OSM_SETUP_FEE'), Text::_('OSM_SETUP_FEE_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="number" class="form-control input-small" name="setup_fee" id="setup_fee" value="<?php echo $this->item->setup_fee; ?>" step="0.01" />
</div>
</div>
<?php
if ($this->item->id && !$this->item->recurring_subscription)
{
?>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('subscription_start_date_option', Text::_('OSM_SUBSCRIPTION_START_DATE_OPTION'), Text::_('OSM_SUBSCRIPTION_START_DATE_OPTION_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $this->lists['subscription_start_date_option'];?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>" data-showon='<?php echo OSMembershipHelperHtml::renderShowon(['subscription_start_date_option' => '1']); ?>'>
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('subscription_start_date', Text::_('OSM_PLAN_SUBSCRIPTION_START_DATE'), Text::_('OSM_PLAN_SUBSCRIPTION_START_DATE_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo HTMLHelper::_('calendar', $this->planParams->get('subscription_start_date'), 'subscription_start_date', 'subscription_start_date', '%Y-%m-%d %H:%M:%S') ; ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>" data-showon='<?php echo OSMembershipHelperHtml::renderShowon(['subscription_start_date_option' => '2']); ?>'>
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('subscription_start_date_field', Text::_('OSM_SUBSCRIPTION_START_DATE_FIELD'), Text::_('OSM_SUBSCRIPTION_START_DATE_FIELD_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $this->lists['subscription_start_date_field'];?>
</div>
</div>
<?php
}
?>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('free_plan_subscription_status', Text::_('OSM_FREE_PLAN_STATUS'), Text::_('OSM_FREE_PLAN_STATUS_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $this->lists['free_plan_subscription_status'];?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('login_redirect_menu_id', Text::_('OSM_LOGIN_REDIRECT'), Text::_('OSM_LOGIN_REDIRECT_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $this->lists['login_redirect_menu_id']; ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('number_fields_per_row', Text::_('OSM_NUMBER_FIELDS_PER_ROW'), Text::_('OSM_NUMBER_FIELDS_PER_ROW_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $this->lists['number_fields_per_row']; ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('payment_methods', Text::_('OSM_PAYMENT_METHODS'), Text::_('OSM_PAYMENT_METHODS_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $this->lists['payment_methods'];?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('currency_code', Text::_('OSM_CURRENCY'), Text::_('OSM_CURRENCY_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $this->lists['currency'];?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('currency_symbol', Text::_('OSM_CURRENCY_SYMBOL'), Text::_('OSM_CURRENCY_SYMBOL_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="text" class="form-control input-small" name="currency_symbol" id="currency_symbol" value="<?php echo $this->item->currency_symbol; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_SUBSCRIPTION_COMPLETE_URL'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="url" class="form-control input-xxlarge" name="subscription_complete_url" value="<?php echo $this->item->subscription_complete_url; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_OFFLINE_PAYMENT_SUBSCRIPTION_COMPLETE_URL'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="url" class="form-control input-xxlarge" name="offline_payment_subscription_complete_url" value="<?php echo $this->item->offline_payment_subscription_complete_url; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('notification_emails', Text::_('OSM_NOTIFICATION_EMAILS'), Text::_('OSM_NOTIFICATION_EMAILS_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="text" class="form-control input-xxlarge" name="notification_emails" value="<?php echo $this->item->notification_emails; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('paypal_email', Text::_('OSM_PAYPAL_EMAIL'), Text::_('OSM_PAYPAL_EMAIL_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="email" class="form-control input-xxlarge" name="paypal_email" value="<?php echo $this->item->paypal_email; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_PUBLISH_UP'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo HTMLHelper::_('calendar', $this->item->publish_up, 'publish_up', 'publish_up', $this->datePickerFormat . ' %H:%M:%S', ['class' => 'input-medium']); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_PUBLISH_DOWN'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo HTMLHelper::_('calendar', $this->item->publish_down, 'publish_down', 'publish_down', $this->datePickerFormat . ' %H:%M:%S', ['class' => 'input-medium']); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_TERMS_AND_CONDITIONS_ARTICLE') ; ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo OSMembershipHelperHtml::getArticleInput($this->item->terms_and_conditions_article_id, 'terms_and_conditions_article_id'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('conversion_tracking_code', Text::_('OSM_CONVERSION_TRACKING_CODE'), Text::_('OSM_CONVERSION_TRACKING_CODE_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<textarea name="conversion_tracking_code" class="form-control input-large" rows="10"><?php echo $this->item->conversion_tracking_code;?></textarea>
</div>
</div>

View File

@@ -0,0 +1,164 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
$bootstrapHelper = OSMembershipHelperBootstrap::getInstance();
$rowFluidClasss = $bootstrapHelper->getClassMapping('row-fluid');
$controlGroupClass = $bootstrapHelper->getClassMapping('control-group');
$controlLabelClass = $bootstrapHelper->getClassMapping('control-label');
$controlsClass = $bootstrapHelper->getClassMapping('controls');
?>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_TITLE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input class="form-control input-xxlarge" type="text" name="title" id="title" maxlength="250" value="<?php echo $this->item->title;?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_ALIAS'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input class="form-control input-xxlarge" type="text" name="alias" id="alias" maxlength="250" value="<?php echo $this->item->alias;?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_CATEGORY'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $this->lists['category_id']; ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_PRICE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input class="form-control" type="number" name="price" id="price" maxlength="250" value="<?php echo $this->item->price;?>" step="0.01" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_SUBSCRIPTION_LENGTH'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input class="form-control input-small d-inline-block" type="number" min="1" name="subscription_length" id="subscription_length" maxlength="250" value="<?php echo $this->item->subscription_length;?>" /><?php echo $this->lists['subscription_length_unit']; ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_EXPIRED_DATE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo HTMLHelper::_('calendar', $this->item->expired_date, 'expired_date', 'expired_date', $this->datePickerFormat) ; ?>
</div>
</div>
<?php
if ((int)$this->item->expired_date)
{
?>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_PRORATED_SIGNUP_COST');?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $this->lists['prorated_signup_cost'];?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('grace_period', Text::_('OSM_OVERLAP_PERIOD'), Text::_('OSM_OVERLAP_PERIOD_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input class="input-small form-control" type="number" name="grace_period" id="grace_period" maxlength="250" value="<?php echo $this->item->grace_period;?>" /><?php echo ' ' . Text::_('OSM_DAYS'); ?>
</div>
</div>
<?php
}
?>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_LIFETIME_MEMBERSHIP');?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $this->lists['lifetime_membership'];?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_THUMB'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="file" class="form-control" name="thumb_image" size="60" />
<?php
if ($this->item->thumb)
{
?>
<img src="<?php echo Uri::root() . 'media/com_osmembership/' . $this->item->thumb; ?>" class="img_preview" />
<input type="checkbox" name="del_thumb" value="1" /><?php echo Text::_('OSM_DELETE_CURRENT_THUMB'); ?>
<?php
}
?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_ENABLE_RENEWAL'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $this->lists['enable_renewal']; ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_ACCESS'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $this->lists['access']; ?>
</div>
</div>
<?php
if (isset($this->lists['published']))
{
?>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_PUBLISHED'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $this->lists['published']; ?>
</div>
</div>
<?php
}
?>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_SHORT_DESCRIPTION'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('short_description', $this->item->short_description, '100%', '250', '75', '10') ; ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_DESCRIPTION'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('description', $this->item->description, '100%', '250', '75', '10') ; ?>
</div>
</div>

View File

@@ -0,0 +1,43 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
$bootstrapHelper = OSMembershipHelperBootstrap::getInstance();
$rowFluidClasss = $bootstrapHelper->getClassMapping('row-fluid');
$controlGroupClass = $bootstrapHelper->getClassMapping('control-group');
$controlLabelClass = $bootstrapHelper->getClassMapping('control-label');
$controlsClass = $bootstrapHelper->getClassMapping('controls');
?>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('number_members_type', Text::_('OSM_NUMBER_MEMBER_TYPES'), Text::_('OSM_NUMBER_MEMBER_TYPES_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $this->lists['number_members_type']; ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>" data-showon='<?php echo OSMembershipHelperHtml::renderShowon(['number_members_type' => '0']); ?>'>
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('number_group_members', Text::_('PLG_GRM_MAX_NUMBER_MEMBERS'), Text::_('PLG_GRM_MAX_NUMBER_MEMBERS_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="number" class="form-control input-small" name="number_group_members" id="number_group_members" value="<?php echo $this->item->number_group_members; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>" data-showon='<?php echo OSMembershipHelperHtml::renderShowon(['number_members_type' => '1']); ?>'>
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('number_members_field', Text::_('OSM_NUMBER_MEMBERS_FIELD'), Text::_('OSM_NUMBER_MEMBERS_FIELD_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $this->lists['number_members_field']; ?>
</div>
</div>

View File

@@ -0,0 +1,44 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
$bootstrapHelper = OSMembershipHelperBootstrap::getInstance();
$rowFluidClasss = $bootstrapHelper->getClassMapping('row-fluid');
$controlGroupClass = $bootstrapHelper->getClassMapping('control-group');
$controlLabelClass = $bootstrapHelper->getClassMapping('control-label');
$controlsClass = $bootstrapHelper->getClassMapping('controls');
?>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('activate_member_card_feature', Text::_('OSM_ACTIVATE_MEMBER_CARD_FEATURE'), Text::_('OSM_ACTIVATE_MEMBER_CARD_FEATURE_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo OSMembershipHelperHtml::getBooleanInput('activate_member_card_feature', $this->item->activate_member_card_feature); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_CARD_BG_IMAGE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo OSMembershipHelperHtml::getMediaInput($this->item->card_bg_image, 'card_bg_image'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_CARD_LAYOUT'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('card_layout', $this->item->card_layout, '100%', '550', '75', '8') ;?>
</div>
</div>

View File

@@ -0,0 +1,193 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
$bootstrapHelper = OSMembershipHelperBootstrap::getInstance();
$rowFluidClasss = $bootstrapHelper->getClassMapping('row-fluid');
$controlGroupClass = $bootstrapHelper->getClassMapping('control-group');
$controlLabelClass = $bootstrapHelper->getClassMapping('control-label');
$controlsClass = $bootstrapHelper->getClassMapping('controls');
?>
<div class="<?php echo $controlGroupClass; ?>">
<p class="text-error" style="font-size:16px;"><?php echo Text::_('OSM_PLAN_MESSAGES_EXPLAIN'); ?></p>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<strong><?php echo Text::_('OSM_PLAN_SUBSCRIPTION_FORM_MESSAGE'); ?></strong>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('subscription_form_message', $this->item->subscription_form_message, '100%', '250', '75', '10'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_USER_EMAIL_SUBJECT'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="text" name="user_email_subject" class="input-xxlarge form-control"
value="<?php echo $this->item->user_email_subject; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_USER_EMAIL_BODY'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('user_email_body', $this->item->user_email_body, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_USER_EMAIL_BODY_OFFLINE_PAYMENT'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('user_email_body_offline', $this->item->user_email_body_offline, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_ADMIN_EMAIL_BODY'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('admin_email_body', $this->item->admin_email_body, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_THANK_MESSAGE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('thanks_message', $this->item->thanks_message, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_THANK_MESSAGE_OFFLINE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('thanks_message_offline', $this->item->thanks_message_offline, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_SUBSCRIPTION_APPROVED_EMAIL_SUBJECT'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="text" name="subscription_approved_email_subject" class="input-xxlarge form-control"
value="<?php echo $this->item->subscription_approved_email_subject; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_SUBSCRIPTION_APPROVED_EMAIL_BODY'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('subscription_approved_email_body', $this->item->subscription_approved_email_body, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_RENEW_USER_EMAIL_SUBJECT'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="text" name="user_renew_email_subject" class="input-xxlarge form-control"
value="<?php echo $this->item->user_renew_email_subject; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_RENEW_USER_EMAIL_BODY'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('user_renew_email_body', $this->item->user_renew_email_body, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_RENEW_USER_EMAIL_BODY_OFFLINE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('user_renew_email_body_offline', $this->item->user_renew_email_body_offline, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_RENEW_ADMIN_EMAIL_BODY'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('admin_renew_email_body', $this->item->admin_renew_email_body, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_UPGRADE_USER_EMAIL_BODY'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('user_upgrade_email_body', $this->item->user_upgrade_email_body, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_UPGRADE_USER_EMAIL_BODY_OFFLINE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('user_upgrade_email_body_offline', $this->item->user_upgrade_email_body_offline, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_UPGRADE_ADMIN_EMAIL_BODY'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('admin_upgrade_email_body', $this->item->admin_upgrade_email_body, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_RENEW_THANK_MESSAGE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('renew_thanks_message', $this->item->renew_thanks_message, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_RENEW_THANK_MESSAGE_OFFLINE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('renew_thanks_message_offline', $this->item->renew_thanks_message_offline, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_UPGRADE_THANK_MESSAGE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('upgrade_thanks_message', $this->item->upgrade_thanks_message, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_UPGRADE_THANK_MESSAGE_OFFLINE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('upgrade_thanks_message_offline', $this->item->upgrade_thanks_message_offline, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_INVOICE_FORMAT'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('invoice_layout', $this->item->invoice_layout, '100%', '250', '75', '8'); ?>
</div>
</div>

View File

@@ -0,0 +1,55 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
$bootstrapHelper = OSMembershipHelperBootstrap::getInstance();
$rowFluidClasss = $bootstrapHelper->getClassMapping('row-fluid');
$controlGroupClass = $bootstrapHelper->getClassMapping('control-group');
$controlLabelClass = $bootstrapHelper->getClassMapping('control-label');
$controlsClass = $bootstrapHelper->getClassMapping('controls');
?>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_PAGE_TITLE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input class="input-xxlarge form-control" type="text" name="page_title" id="page_title" maxlength="250"
value="<?php echo $this->item->page_title; ?>"/>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_PAGE_HEADING'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input class="input-xxlarge form-control" type="text" name="page_heading" id="page_heading" maxlength="250"
value="<?php echo $this->item->page_heading; ?>"/>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_META_KEYWORDS'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<textarea rows="5" cols="30" class="input-xxlarge form-control"
name="meta_keywords"><?php echo $this->item->meta_keywords; ?></textarea>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_META_DESCRIPTION'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<textarea rows="5" cols="30" class="input-xxlarge form-control"
name="meta_description"><?php echo $this->item->meta_description; ?></textarea>
</div>
</div>

View File

@@ -0,0 +1,79 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
$bootstrapHelper = OSMembershipHelperBootstrap::getInstance();
$rowFluidClasss = $bootstrapHelper->getClassMapping('row-fluid');
$controlGroupClass = $bootstrapHelper->getClassMapping('control-group');
$controlLabelClass = $bootstrapHelper->getClassMapping('control-label');
$controlsClass = $bootstrapHelper->getClassMapping('controls');
?>
<fieldset class="adminform">
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_IS_RECURRING_SUBSCRIPTION'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $this->lists['recurring_subscription']; ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>" data-showon='<?php echo OSMembershipHelperHtml::renderShowon(['recurring_subscription' => '1']); ?>'>
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_TRIAL_AMOUNT'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="text" class="form-control" name="trial_amount" value="<?php echo $this->item->trial_amount; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>" data-showon='<?php echo OSMembershipHelperHtml::renderShowon(['recurring_subscription' => '1']); ?>'>
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_TRIAL_DURATION'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="text" class="form-control input-mini d-inline-block" name="trial_duration" value="<?php echo $this->item->trial_duration > 0 ? $this->item->trial_duration : ''; ?>"/>
<?php echo $this->lists['trial_duration_unit']; ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>" data-showon='<?php echo OSMembershipHelperHtml::renderShowon(['recurring_subscription' => '1']); ?>'>
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_NUMBER_PAYMENTS'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="text" class="form-control" name="number_payments" value="<?php echo $this->item->number_payments; ?>" />
</div>
</div>
<?php
if ($this->item->number_payments > 0)
{
?>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo OSMembershipHelperHtml::getFieldLabel('last_payment_action', Text::_('OSM_AFTER_LAST_PAYMENT_ACTION'), Text::_('OSM_AFTER_LAST_PAYMENT_ACTION_EXPLAIN')); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $this->lists['last_payment_action']; ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>" data-showon='<?php echo OSMembershipHelperHtml::renderShowon(['last_payment_action' => '2']); ?>'>
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_EXTEND_DURATION'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="text" class="input-mini" name="extend_duration" value="<?php echo $this->item->extend_duration > 0 ? $this->item->extend_duration : ''; ?>"/>
<?php echo $this->lists['extend_duration_unit']; ?>
</div>
</div>
<?php
}
?>
</fieldset>

View File

@@ -0,0 +1,73 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
$bootstrapHelper = OSMembershipHelperBootstrap::getInstance();
$rowFluidClasss = $bootstrapHelper->getClassMapping('row-fluid');
$controlGroupClass = $bootstrapHelper->getClassMapping('control-group');
$controlLabelClass = $bootstrapHelper->getClassMapping('control-label');
$controlsClass = $bootstrapHelper->getClassMapping('controls');
?>
<div class="<?php echo $controlGroupClass; ?>">
<p class="text-error" style="font-size:16px;"><?php echo Text::_('OSM_PLAN_MESSAGES_EXPLAIN'); ?></p>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_FIRST_REMINDER_EMAIL_SUBJECT'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="text" name="first_reminder_email_subject" class="input-xxlarge form-control"
value="<?php echo $this->item->first_reminder_email_subject; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_FIRST_REMINDER_EMAIL_BODY'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('first_reminder_email_body', $this->item->first_reminder_email_body, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_SECOND_REMINDER_EMAIL_SUBJECT'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="text" name="second_reminder_email_subject" class="input-xxlarge form-control"
value="<?php echo $this->item->second_reminder_email_subject; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_SECOND_REMINDER_EMAIL_BODY'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('second_reminder_email_body', $this->item->second_reminder_email_body, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_THIRD_REMINDER_EMAIL_SUBJECT'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="text" name="third_reminder_email_subject" class="input-xxlarge form-control"
value="<?php echo $this->item->third_reminder_email_subject; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_THIRD_REMINDER_EMAIL_BODY'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('third_reminder_email_body', $this->item->third_reminder_email_body, '100%', '250', '75', '8'); ?>
</div>
</div>

View File

@@ -0,0 +1,60 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
$bootstrapHelper = OSMembershipHelperBootstrap::getInstance();
$rowFluidClasss = $bootstrapHelper->getClassMapping('row-fluid');
$controlGroupClass = $bootstrapHelper->getClassMapping('control-group');
$controlLabelClass = $bootstrapHelper->getClassMapping('control-label');
$controlsClass = $bootstrapHelper->getClassMapping('controls');
?>
<fieldset class="adminform">
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_SEND_FIRST_REMINDER'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="number" class="form-control input-mini d-inline-block" name="send_first_reminder" value="<?php echo $this->item->send_first_reminder; ?>" /><span><?php echo ' ' . Text::_('OSM_DAYS') . ' ' . $this->lists['send_first_reminder_time']; ?></span><?php echo Text::_('OSM_SUBSCRIPTION_EXPIRED'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_SEND_SECOND_REMINDER'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="number" class="form-control input-mini d-inline-block" name="send_second_reminder" value="<?php echo $this->item->send_second_reminder; ?>" /><span><?php echo ' ' . Text::_('OSM_DAYS') . ' ' . $this->lists['send_second_reminder_time']; ?></span><?php echo Text::_('OSM_SUBSCRIPTION_EXPIRED'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_SEND_THIRD_REMINDER'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="number" class="form-control input-mini d-inline-block" name="send_third_reminder" value="<?php echo $this->item->send_third_reminder; ?>" /><span><?php echo ' ' . Text::_('OSM_DAYS') . ' ' . $this->lists['send_third_reminder_time']; ?></span><?php echo Text::_('OSM_SUBSCRIPTION_EXPIRED'); ?>
</div>
</div>
<?php
if ($this->item->number_payments > 0)
{
?>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_SEND_SUBSCRIPTION_END'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="number" class="form-control input-mini d-inline-block" name="send_subscription_end" value="<?php echo $this->item->send_subscription_end; ?>" /><span><?php echo ' ' . Text::_('OSM_DAYS') . ' ' . $this->lists['send_subscription_end_time']; ?></span><?php echo Text::_('OSM_SUBSCRIPTION_EXPIRED'); ?>
</div>
</div>
<?php
}
?>
</fieldset>

View File

@@ -0,0 +1,32 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Form\Form;
$form = Form::getInstance('renew_options', JPATH_ADMINISTRATOR . '/components/com_osmembership/view/plan/forms/renew_options.xml');
$formData['renew_options'] = [];
foreach ($this->prices as $renewOption)
{
$formData['renew_options'][] = [
'id' => $renewOption->id,
'renew_option_length' => $renewOption->renew_option_length,
'renew_option_length_unit' => $renewOption->renew_option_length_unit,
'price' => $renewOption->price,
];
}
$form->bind($formData);
foreach ($form->getFieldset() as $field)
{
echo $field->input;
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Form\Form;
$form = Form::getInstance('renewal_discounts', JPATH_ADMINISTRATOR . '/components/com_osmembership/view/plan/forms/renewal_discounts.xml');
$formData['renewal_discounts'] = [];
foreach ($this->renewalDiscounts as $renewalDiscount)
{
$formData['renewal_discounts'][] = [
'id' => $renewalDiscount->id,
'number_days' => $renewalDiscount->number_days,
'discount_type' => $renewalDiscount->discount_type,
'discount_amount' => $renewalDiscount->discount_amount,
];
}
$form->bind($formData);
foreach ($form->getFieldset() as $field)
{
echo $field->input;
}

View File

@@ -0,0 +1,221 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
$rootUri = Uri::root(true);
$bootstrapHelper = OSMembershipHelperBootstrap::getInstance();
$rowFluidClasss = $bootstrapHelper->getClassMapping('row-fluid');
$controlGroupClass = $bootstrapHelper->getClassMapping('control-group');
$controlLabelClass = $bootstrapHelper->getClassMapping('control-label');
$controlsClass = $bootstrapHelper->getClassMapping('controls');
echo HTMLHelper::_('bootstrap.startTabSet', 'plan-translation', ['active' => 'translation-page-' . $this->languages[0]->sef, 'recall' => true]);
foreach ($this->languages as $language)
{
$sef = $language->sef;
echo HTMLHelper::_('bootstrap.addTab', 'plan-translation', 'translation-page-' . $sef, $language->title . ' <img src="' . $rootUri . '/media/mod_languages/images/' . $language->image . '.gif" />');
?>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_TITLE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input class="form-control input-xlarge" type="text" name="title_<?php echo $sef; ?>" id="title_<?php echo $sef; ?>" maxlength="250" value="<?php echo $this->item->{'title_' . $sef}; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_ALIAS'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input class="form-control input-xlarge" type="text" name="alias_<?php echo $sef; ?>" id="title_<?php echo $sef; ?>" maxlength="250" value="<?php echo $this->item->{'alias_' . $sef}; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_SHORT_DESCRIPTION'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('short_description_' . $sef, $this->item->{'short_description_' . $sef}, '100%', '250', '75', '10') ; ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_DESCRIPTION'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('description_' . $sef, $this->item->{'description_' . $sef}, '100%', '250', '75', '10') ; ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_PAGE_TITLE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input class="form-control input-xlarge" type="text" name="page_title_<?php echo $sef; ?>" id="page_title_<?php echo $sef; ?>" maxlength="250" value="<?php echo $this->item->{'page_title_' . $sef}; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_PAGE_HEADING'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input class="form-control input-xlarge" type="text" name="page_heading_<?php echo $sef; ?>" id="page_heading_<?php echo $sef; ?>" maxlength="250" value="<?php echo $this->item->{'page_heading_' . $sef}; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_META_DESCRIPTION'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<textarea rows="5" cols="30" class="input-lage" name="meta_description_<?php echo $sef; ?>"><?php echo $this->item->{'meta_description_' . $sef}; ?></textarea>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_META_KEYWORDS'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<textarea rows="5" cols="30" class="input-lage" name="meta_keywords_<?php echo $sef; ?>"><?php echo $this->item->{'meta_keywords_' . $sef}; ?></textarea>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_META_DESCRIPTION'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<textarea rows="5" cols="30" class="input-lage" name="meta_description_<?php echo $sef; ?>"><?php echo $this->item->{'meta_description_' . $sef}; ?></textarea>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_PLAN_SUBSCRIPTION_FORM_MESSAGE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('subscription_form_message_' . $sef, $this->item->{'subscription_form_message_' . $sef}, '100%', '250', '75', '10') ; ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_USER_EMAIL_SUBJECT'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="text" name="user_email_subject_<?php echo $sef; ?>" class="form-control" value="<?php echo $this->item->{'user_email_subject_' . $sef}; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_USER_EMAIL_BODY'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('user_email_body_' . $sef, $this->item->{'user_email_body_' . $sef}, '100%', '250', '75', '8') ;?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_USER_EMAIL_BODY_OFFLINE_PAYMENT'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('user_email_body_offline_' . $sef, $this->item->{'user_email_body_offline_' . $sef}, '100%', '250', '75', '8') ;?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_THANK_MESSAGE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('thanks_message_' . $sef, $this->item->{'thanks_message_' . $sef}, '100%', '250', '75', '8') ;?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_THANK_MESSAGE_OFFLINE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('thanks_message_offline_' . $sef, $this->item->{'thanks_message_offline_' . $sef}, '100%', '250', '75', '8') ;?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_SUBSCRIPTION_APPROVED_EMAIL_SUBJECT'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="text" name="subscription_approved_email_subject_<?php echo $sef; ?>" class="form-control" value="<?php echo $this->item->{'subscription_approved_email_subject_' . $sef}; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_SUBSCRIPTION_APPROVED_EMAIL_BODY'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('subscription_approved_email_body_' . $sef, $this->item->{'subscription_approved_email_body_' . $sef}, '100%', '250', '75', '8') ;?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_RENEW_USER_EMAIL_SUBJECT'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<input type="text" name="user_renew_email_subject_<?php echo $sef; ?>" class="form-control" value="<?php echo $this->item->{'user_renew_email_subject_' . $sef}; ?>" />
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_RENEW_USER_EMAIL_BODY'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('user_renew_email_body_' . $sef, $this->item->{'user_renew_email_body_' . $sef}, '100%', '250', '75', '8') ;?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_RENEW_THANK_MESSAGE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('renew_thanks_message_' . $sef, $this->item->{'renew_thanks_message_' . $sef}, '100%', '250', '75', '8') ;?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_RENEW_THANK_MESSAGE_OFFLINE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('renew_thanks_message_offline_' . $sef, $this->item->{'renew_thanks_message_offline_' . $sef}, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_UPGRADE_THANK_MESSAGE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('upgrade_thanks_message_' . $sef, $this->item->{'upgrade_thanks_message_' . $sef}, '100%', '250', '75', '8'); ?>
</div>
</div>
<div class="<?php echo $controlGroupClass; ?>">
<div class="<?php echo $controlLabelClass; ?>">
<?php echo Text::_('OSM_UPGRADE_THANK_MESSAGE_OFFLINE'); ?>
</div>
<div class="<?php echo $controlsClass; ?>">
<?php echo $editor->display('upgrade_thanks_message_offline_' . $sef, $this->item->{'upgrade_thanks_message_offline_' . $sef}, '100%', '250', '75', '8'); ?>
</div>
</div>
<?php
echo HTMLHelper::_('bootstrap.endTab');
}
echo HTMLHelper::_('bootstrap.endTabSet');

View File

@@ -0,0 +1,39 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Form\Form;
$bootstrapHelper = OSMembershipHelperBootstrap::getInstance();
$rowFluidClasss = $bootstrapHelper->getClassMapping('row-fluid');
$controlGroupClass = $bootstrapHelper->getClassMapping('control-group');
$controlLabelClass = $bootstrapHelper->getClassMapping('control-label');
$controlsClass = $bootstrapHelper->getClassMapping('controls');
$form = Form::getInstance('upgrade_options', JPATH_ADMINISTRATOR . '/components/com_osmembership/view/plan/forms/upgrade_options.xml');
$formData['upgrade_options'] = [];
foreach ($this->upgradeRules as $upgradeOption)
{
$formData['upgrade_options'][] = [
'id' => $upgradeOption->id,
'to_plan_id' => $upgradeOption->to_plan_id,
'price' => $upgradeOption->price,
'upgrade_prorated' => $upgradeOption->upgrade_prorated,
'published' => $upgradeOption->published,
];
}
$form->bind($formData);
foreach ($form->getFieldset() as $field)
{
echo $field->input;
}

View File

@@ -0,0 +1,237 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Uri\Uri;
HTMLHelper::_('formbehavior.chosen', 'select');
$bootstrapHelper = OSMembershipHelperBootstrap::getInstance();
$centerClass = $bootstrapHelper->getClassMapping('center');
$cols = 10;
$config = OSMembershipHelper::getConfig();
?>
<div id="osm-manage-plans" class="osm-container osm-container-j4">
<?php
if ($this->params->get('show_page_heading', 1))
{
if ($this->input->getInt('hmvc_call'))
{
$hTag = 'h2';
}
else
{
$hTag = 'h1';
}
?>
<<?php echo $hTag; ?> class="osm-heading"><?php echo Text::_('OSM_MANAGE_PLANS'); ?></<?php echo $hTag; ?>>
<?php
}
if (OSMembershipHelper::isValidMessage($this->params->get('intro_text')))
{
?>
<div class="osm-description osm-page-intro-text <?php echo $this->bootstrapHelper->getClassMapping('clearfix'); ?>">
<?php echo HTMLHelper::_('content.prepare', $this->params->get('intro_text')); ?>
</div>
<?php
}
?>
<div class="btn-toolbar" id="btn-toolbar">
<?php echo Toolbar::getInstance('toolbar')->render(); ?>
</div>
<form action="<?php echo Route::_('index.php?option=com_osmembership&view=mplans&Itemid=' . $this->Itemid, false); ?>" method="post" name="adminForm" id="adminForm">
<div class="filters btn-toolbar clearfix mt-2 mb-2">
<?php echo $this->loadTemplate('search_bar'); ?>
</div>
<table class="<?php echo $bootstrapHelper->getClassMapping('table table-striped table-bordered table-hover'); ?>">
<thead>
<tr>
<th width="20">
<?php echo HTMLHelper::_('grid.checkall'); ?>
</th>
<th class="title">
<?php echo HTMLHelper::_('searchtools.sort', Text::_('OSM_TITLE'), 'tbl.title', $this->state->filter_order_Dir, $this->state->filter_order); ?>
</th>
<?php
if ($this->showCategory)
{
$cols++;
?>
<th class="title">
<?php echo HTMLHelper::_('searchtools.sort', Text::_('OSM_CATEGORY'), 'b.title', $this->state->filter_order_Dir, $this->state->filter_order); ?>
</th>
<?php
}
if ($this->showThumbnail)
{
$cols++;
?>
<th class="title" width="10%">
<?php echo Text::_('OSM_THUMB'); ?>
</th>
<?php
}
?>
<th class="title" width="8%">
<?php echo Text::_('OSM_LENGTH'); ?>
</th>
<th class="center" width="8%">
<?php echo HTMLHelper::_('searchtools.sort', Text::_('OSM_RECURRING'), 'tbl.recurring_subscription', $this->state->filter_order_Dir, $this->state->filter_order); ?>
</th>
<th class="title" width="8%">
<?php echo HTMLHelper::_('searchtools.sort', Text::_('OSM_PRICE'), 'tbl.price', $this->state->filter_order_Dir, $this->state->filter_order); ?>
</th>
<th class="title center" width="12%">
<?php echo Text::_('OSM_TOTAL_SUBSCRIBERS'); ?>
</th>
<th class="title center" width="12%">
<?php echo Text::_('OSM_ACTIVE_SUBSCRIBERS'); ?>
</th>
<th width="5%">
<?php echo HTMLHelper::_('searchtools.sort', Text::_('JGRID_HEADING_ACCESS'), 'tbl.access', $this->state->filter_order_Dir, $this->state->filter_order); ?>
</th>
<th width="5%">
<?php echo HTMLHelper::_('searchtools.sort', Text::_('OSM_PUBLISHED'), 'tbl.published', $this->state->filter_order_Dir, $this->state->filter_order); ?>
</th>
<th width="2%">
<?php echo HTMLHelper::_('searchtools.sort', Text::_('OSM_ID'), 'tbl.id', $this->state->filter_order_Dir, $this->state->filter_order); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="<?php echo $cols; ?>">
<?php echo $this->pagination->getListFooter(); ?>
</td>
</tr>
</tfoot>
<tbody>
<?php
$k = 0;
for ($i = 0, $n = count($this->items); $i < $n; $i++)
{
$row = $this->items[$i];
$link = Route::_('index.php?option=com_osmembership&task=mplan.edit&id=' . $row->id . '&Itemid=' . $this->Itemid, false);
$checked = HTMLHelper::_('grid.id', $i, $row->id);
$published = HTMLHelper::_('jgrid.published', $row->published, $i, 'mplan.');
$symbol = $row->currency_symbol ?: $row->currency;
?>
<tr class="<?php echo "row$k"; ?>">
<td>
<?php echo $checked; ?>
</td>
<td>
<?php
if (OSMembershipHelperAcl::canEditPlan($row->id))
{
?>
<a href="<?php echo $link; ?>"><?php echo $row->title ; ?></a>
<?php
}
else
{
echo $row->title;
}
?>
</td>
<?php
if ($this->showCategory)
{
?>
<td><?php echo $row->category_title; ?></td>
<?php
}
if ($this->showThumbnail)
{
?>
<td class="center">
<?php
if ($row->thumb)
{
?>
<a href="<?php echo Uri::root() . 'media/com_osmembership/' . $row->thumb ; ?>" class="modal"><img src="<?php echo Uri::root() . '/media/com_osmembership/' . $row->thumb ; ?>" /></a>
<?php
}
?>
</td>
<?php
}
?>
<td>
<?php
if ($row->lifetime_membership)
{
echo Text::_('OSM_LIFETIME');
}
else
{
echo OSMembershipHelperSubscription::getDurationText($row->subscription_length, $row->subscription_length_unit);
}
?>
</td>
<td class="center">
<?php echo $row->recurring_subscription ? Text::_('JYES') : Text::_('JNO'); ?>
</td>
<td>
<?php
if ($row->price > 0)
{
echo OSMembershipHelper::formatCurrency($row->price, $config, $symbol);
}
else
{
echo Text::_('OSM_FREE');
}
?>
</td>
<td class="center">
<?php echo OSMembershipHelper::countSubscribers($row->id); ?>
</td>
<td class="center">
<?php echo OSMembershipHelper::countSubscribers($row->id, 1); ?>
</td>
<td>
<?php echo $row->access_level; ?>
</td>
<td class="center">
<?php
if (OSMembershipHelperAcl::canChangePlanState($row->id))
{
echo $published;
}
else
{
echo $row->published ? Text::_('JYES') : Text::_('JNO');
}
?>
</td>
<td class="center">
<?php echo $row->id; ?>
</td>
</tr>
<?php
$k = 1 - $k;
}
?>
</tbody>
</table>
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="filter_order" value="<?php echo $this->state->filter_order; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->state->filter_order_Dir; ?>" />
<?php echo HTMLHelper::_('form.token'); ?>
</form>
</div>

View File

@@ -0,0 +1,37 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
$pullLeftClass = $this->bootstrapHelper->getClassMapping('pull-left');
?>
<div class="filter-search btn-group <?php echo $pullLeftClass; ?>">
<div class="input-group">
<label for="filter_search" class="sr-only"><?php echo Text::_('OSM_FILTER_SEARCH_PLANS_DESC');?></label>
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo Text::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->filter_search); ?>" class="hasTooltip form-control" title="<?php echo HTMLHelper::tooltipText('OSM_SEARCH_PLANS_DESC'); ?>" />
<span class="input-group-append">
<button type="submit" class="btn hasTooltip" title="<?php echo HTMLHelper::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><span class="fa fa-search"></span></button>
<button type="button" class="btn hasTooltip" title="<?php echo HTMLHelper::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.getElementById('filter_search').value='';this.form.submit();"><span class="fa fa-remove"></span></button>
</span>
</div>
</div>
<div class="btn-group <?php echo $pullLeftClass; ?> ml-2">
<?php
if (isset($this->lists['filter_category_id']))
{
echo $this->lists['filter_category_id'];
}
echo $this->lists['filter_state'];
echo $this->pagination->getLimitBox();
?>
</div>

View File

@@ -0,0 +1,36 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
$pullLeftClass = $this->bootstrapHelper->getClassMapping('pull-left');
?>
<div class="filter-search btn-group <?php echo $pullLeftClass; ?>">
<label for="filter_search" class="element-invisible sr-only"><?php echo Text::_('OSM_FILTER_SEARCH_PLANS_DESC');?></label>
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo Text::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->filter_search); ?>" class="hasTooltip input-medium" title="<?php echo HTMLHelper::tooltipText('OSM_SEARCH_PLANS_DESC'); ?>" />
</div>
<div class="btn-group <?php echo $pullLeftClass; ?>">
<button type="submit" class="btn btn-primary hasTooltip" title="<?php echo HTMLHelper::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><span class="<?php echo $this->bootstrapHelper->getClassMapping('icon-search'); ?>"></span></button>
<button type="button" class="btn btn-primary hasTooltip" title="<?php echo HTMLHelper::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.getElementById('filter_search').value='';this.form.submit();"><span class="<?php echo $this->bootstrapHelper->getClassMapping('icon-remove'); ?>"></span></button>
</div>
<div class="btn-group <?php echo $pullLeftClass; ?>">
<?php
if (isset($this->lists['filter_category_id']))
{
echo $this->lists['filter_category_id'];
}
echo $this->lists['filter_state'];
echo $this->pagination->getLimitBox();
?>
</div>

View File

@@ -0,0 +1,175 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
$item = $this->item;
$clearfixClass = $this->bootstrapHelper->getClassMapping('clearfix');
if ($item->thumb)
{
$imgSrc = Uri::base() . 'media/com_osmembership/' . $item->thumb;
}
if ($this->config->use_https)
{
$signUpUrl = Route::_(OSMembershipHelperRoute::getSignupRoute($item->id, $this->Itemid), false, 1);
}
else
{
$signUpUrl = Route::_(OSMembershipHelperRoute::getSignupRoute($item->id, $this->Itemid));
}
$subscribedPlanIds = OSMembershipHelperSubscription::getSubscribedPlans();
$showPlanInformation = $this->params->get('show_plan_information', 1);
$planInformationPosition = $this->params->get('plan_information_position', 0);
if ($showPlanInformation && $planInformationPosition == 0)
{
$leftClass = $this->bootstrapHelper->getClassMapping('span7');
$rightClass = $this->bootstrapHelper->getClassMapping('span5');
}
else
{
$leftClass = $this->bootstrapHelper->getClassMapping('clearfix');
$rightClass = $this->bootstrapHelper->getClassMapping('clearfix');
}
?>
<div id="osm-plan-item" class="osm-container">
<div class="osm-item-heading-box <?php echo $clearfixClass; ?>">
<h1 class="osm-page-title">
<?php echo $this->params->get('page_heading'); ?>
</h1>
</div>
<div class="osm-item-description <?php echo $clearfixClass; ?>">
<div class="<?php echo $this->bootstrapHelper->getClassMapping('row-fluid clearfix'); ?>">
<?php
if ($showPlanInformation && $planInformationPosition == 1)
{
?>
<div class="<?php echo $rightClass; ?>">
<?php echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/plan_information.php', ['item' => $item]); ?>
</div>
<?php
}
?>
<div class="osm-description-details <?php echo $leftClass; ?> ">
<?php
if ($item->thumb)
{
?>
<img src="<?php echo $imgSrc; ?>" alt="<?php echo $item->title; ?>" class="osm-thumb-left img-polaroid"/>
<?php
}
if ($item->description)
{
echo $item->description;
}
else
{
echo $item->short_description;
}
?>
</div>
<?php
if ($showPlanInformation && in_array($planInformationPosition, [0, 2]))
{
?>
<div class="<?php echo $rightClass; ?>">
<?php echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/plan_information.php', ['item' => $item]); ?>
</div>
<?php
}
?>
</div>
<?php
if (count($this->renewOptions) || count($this->upgradeRules))
{
echo $this->loadTemplate('renew_upgrade');
}
?>
<div class="osm-taskbar <?php echo $clearfixClass; ?>">
<ul>
<?php
$actions = OSMembershipHelperSubscription::getAllowedActions($item);
if (count($actions))
{
$language = Factory::getApplication()->getLanguage();
if (in_array('subscribe', $actions))
{
if ($language->hasKey('OSM_SIGNUP_PLAN_' . $item->id))
{
$signUpLanguageItem = 'OSM_SIGNUP_PLAN_' . $item->id;
}
else
{
$signUpLanguageItem = 'OSM_SIGNUP';
}
if ($language->hasKey('OSM_RENEW_PLAN_' . $item->id))
{
$renewLanguageItem = 'OSM_RENEW_PLAN_' . $item->id;
}
else
{
$renewLanguageItem = 'OSM_RENEW';
}
?>
<li>
<a href="<?php echo $signUpUrl; ?>" class="<?php echo $this->bootstrapHelper->getClassMapping('btn btn-primary'); ?>">
<?php echo in_array($item->id, $subscribedPlanIds) ? Text::_($renewLanguageItem) : Text::_($signUpLanguageItem); ?>
</a>
</li>
<?php
}
if (in_array('upgrade', $actions))
{
if ($language->hasKey('OSM_UPGRADE_PLAN_' . $item->id))
{
$upgradeLanguageItem = 'OSM_UPGRADE_PLAN_' . $item->id;
}
else
{
$upgradeLanguageItem = 'OSM_UPGRADE';
}
if (count($item->upgrade_rules) > 1)
{
$link = Route::_('index.php?option=com_osmembership&view=upgrademembership&to_plan_id=' . $item->id . '&Itemid=' . OSMembershipHelperRoute::findView('upgrademembership', $this->Itemid));
}
else
{
$upgradeOptionId = $item->upgrade_rules[0]->id;
$link = Route::_('index.php?option=com_osmembership&task=register.process_upgrade_membership&upgrade_option_id=' . $upgradeOptionId . '&Itemid=' . $this->Itemid);
}
?>
<li>
<a href="<?php echo $link; ?>" class="<?php echo $this->bootstrapHelper->getClassMapping('btn btn-primary'); ?>">
<?php echo Text::_($upgradeLanguageItem); ?>
</a>
</li>
<?php
}
}
?>
</ul>
</div>
</div>
</div>

View File

@@ -0,0 +1,43 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
?>
<div class="<?php echo $this->bootstrapHelper->getClassMapping('row-fluid clearfix'); ?>">
<?php
if (count($this->renewOptions))
{
?>
<form action="<?php echo Route::_('index.php?option=com_osmembership&task=register.process_renew_membership&Itemid=' . $this->Itemid, false, $ssl); ?>" method="post" name="osm_form_renew" id="osm_form_renew" autocomplete="off" class="<?php echo $this->bootstrapHelper->getClassMapping('form form-horizontal'); ?>">
<h2 class="osm-form-heading"><?php echo Text::_('OSM_RENEW_MEMBERSHIP'); ?></h2>
<?php echo $this->loadCommonLayout('common/tmpl/renew_options.php');?>
</form>
<?php
}
if (count($this->upgradeRules))
{
?>
<form action="<?php echo Route::_('index.php?option=com_osmembership&task=register.process_upgrade_membership&Itemid=' . $this->Itemid, false, $ssl); ?>" method="post" name="osm_form_update_membership" id="osm_form_update_membership" autocomplete="off" class="<?php echo $this->bootstrapHelper->getClassMapping('form form-horizontal'); ?>">
<h2 class="osm-form-heading"><?php echo Text::_('OSM_UPGRADE_MEMBERSHIP'); ?></h2>
<?php
echo $this->loadCommonLayout('common/tmpl/upgrade_options.php');
?>
<div class="form-actions">
<input type="submit" class="<?php echo $this->bootstrapHelper->getClassMapping('btn btn-primary'); ?>" value="<?php echo Text::_('OSM_PROCESS_UPGRADE'); ?>"/>
</div>
</form>
<?php
}
?>
</div>

View File

@@ -0,0 +1,83 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
?>
<div id="osm-plans-list-columns" class="osm-container osm-container-j4">
<?php
if ($this->params->get('show_page_heading', 1))
{
if ($this->category)
{
$pageHeading = $this->params->get('page_heading') ?: $this->category->title;
}
else
{
$pageHeading = $this->params->get('page_heading') ?: Text::_('OSM_SUBSCRIPTION_PLANS');
}
if ($this->input->getInt('hmvc_call'))
{
$hTag = 'h2';
}
else
{
$hTag = 'h1';
}
?>
<<?php echo $hTag; ?> class="osm-page-title"><?php echo $pageHeading; ?></<?php echo $hTag; ?>>
<?php
}
if (!empty($this->category->description))
{
$description = $this->category->description;
}
elseif (OSMembershipHelper::isValidMessage($this->params->get('intro_text')))
{
$description = $this->params->get('intro_text');
}
else
{
$description = '';
}
if ($description)
{
?>
<div class="osm-description osm-page-intro-text <?php echo $this->bootstrapHelper->getClassMapping('clearfix'); ?>">
<?php echo HTMLHelper::_('content.prepare', $description); ?>
</div>
<?php
}
if (count($this->categories))
{
echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/categories.php', ['items' => $this->categories, 'categoryId' => $this->categoryId, 'config' => $this->config, 'Itemid' => $this->Itemid]);
}
if (count($this->items))
{
echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/columns_plans.php', ['items' => $this->items, 'input' => $this->input, 'config' => $this->config, 'Itemid' => $this->Itemid, 'categoryId' => $this->categoryId, 'bootstrapHelper' => $this->bootstrapHelper, 'params' => $this->params]);
}
if (!$this->input->getInt('hmvc_call') && ($this->pagination->total > $this->pagination->limit))
{
?>
<div class="pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
<?php
}
?>
</div>

View File

@@ -0,0 +1,82 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die ;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
?>
<div id="osm-plans-list-default" class="osm-container osm-container-j4">
<?php
if ($this->params->get('show_page_heading', 1))
{
if ($this->category)
{
$pageHeading = $this->params->get('page_heading') ?: $this->category->title;
}
else
{
$pageHeading = $this->params->get('page_heading') ?: Text::_('OSM_SUBSCRIPTION_PLANS');
}
if ($this->input->getInt('hmvc_call'))
{
$hTag = 'h2';
}
else
{
$hTag = 'h1';
}
?>
<<?php echo $hTag; ?> class="osm-page-title"><?php echo $pageHeading; ?></<?php echo $hTag; ?>>
<?php
}
if (!empty($this->category->description))
{
$description = $this->category->description;
}
elseif (OSMembershipHelper::isValidMessage($this->params->get('intro_text')))
{
$description = $this->params->get('intro_text');
}
else
{
$description = '';
}
if ($description)
{
?>
<div class="osm-description osm-page-intro-text <?php echo $this->bootstrapHelper->getClassMapping('clearfix'); ?>">
<?php echo HTMLHelper::_('content.prepare', $description); ?>
</div>
<?php
}
if (count($this->categories))
{
echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/categories.php', ['items' => $this->categories, 'categoryId' => $this->categoryId, 'config' => $this->config, 'Itemid' => $this->Itemid]);
}
if (count($this->items))
{
echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/default_plans.php', ['items' => $this->items, 'input' => $this->input, 'config' => $this->config, 'Itemid' => $this->Itemid, 'categoryId' => $this->categoryId, 'bootstrapHelper' => $this->bootstrapHelper, 'params' => $this->params]);
}
if (!$this->input->getInt('hmvc_call') && ($this->pagination->total > $this->pagination->limit))
{
?>
<div class="pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
<?php
}
?>
</div>

View File

@@ -0,0 +1,74 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
$categoryId = $this->category ? $this->category->id : 0;
?>
<div id="osm-plans-list-columns" class="osm-container osm-container-j4 osm-pricingtable-container<?php echo $categoryId; ?>">
<?php
if ($this->params->get('show_page_heading', 1))
{
if ($this->category)
{
$pageHeading = $this->params->get('page_heading') ?: $this->category->title;
}
else
{
$pageHeading = $this->params->get('page_heading') ?: Text::_('OSM_SUBSCRIPTION_PLANS');
}
if ($this->input->getInt('hmvc_call'))
{
$hTag = 'h2';
}
else
{
$hTag = 'h1';
}
?>
<<?php echo $hTag; ?> class="osm-page-title"><?php echo $pageHeading; ?></<?php echo $hTag; ?>>
<?php
}
if (!empty($this->category->description))
{
$description = $this->category->description;
}
elseif (OSMembershipHelper::isValidMessage($this->params->get('intro_text')))
{
$description = $this->params->get('intro_text');
}
else
{
$description = '';
}
if ($description)
{
?>
<div class="osm-description osm-page-intro-text <?php echo $this->bootstrapHelper->getClassMapping('clearfix'); ?>">
<?php echo HTMLHelper::_('content.prepare', $description); ?>
</div>
<?php
}
if (count($this->categories))
{
echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/categories.php', ['items' => $this->categories, 'categoryId' => $this->categoryId, 'config' => $this->config, 'Itemid' => $this->Itemid]);
}
if (count($this->items))
{
echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/pricingtable_plans.php', ['items' => $this->items, 'input' => $this->input, 'config' => $this->config, 'Itemid' => $this->Itemid, 'categoryId' => $this->categoryId, 'bootstrapHelper' => $this->bootstrapHelper, 'params' => $this->params]);
}
?>
</div>

View File

@@ -0,0 +1,74 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
$categoryId = $this->category ? $this->category->id : 0;
?>
<div id="osm-plans-list-pricing-table-circle" class="osm-container osm-container-j4 osm-pricingtable-container<?php echo $categoryId; ?>">
<?php
if ($this->params->get('show_page_heading', 1))
{
if ($this->category)
{
$pageHeading = $this->params->get('page_heading') ?: $this->category->title;
}
else
{
$pageHeading = $this->params->get('page_heading') ?: Text::_('OSM_SUBSCRIPTION_PLANS');
}
if ($this->input->getInt('hmvc_call'))
{
$hTag = 'h2';
}
else
{
$hTag = 'h1';
}
?>
<<?php echo $hTag; ?> class="osm-page-title"><?php echo $pageHeading; ?></<?php echo $hTag; ?>>
<?php
}
if (!empty($this->category->description))
{
$description = $this->category->description;
}
elseif (OSMembershipHelper::isValidMessage($this->params->get('intro_text')))
{
$description = $this->params->get('intro_text');
}
else
{
$description = '';
}
if ($description)
{
?>
<div class="osm-description osm-page-intro-text <?php echo $this->bootstrapHelper->getClassMapping('clearfix'); ?>">
<?php echo HTMLHelper::_('content.prepare', $description); ?>
</div>
<?php
}
if (count($this->categories))
{
echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/categories.php', ['items' => $this->categories, 'categoryId' => $this->categoryId, 'config' => $this->config, 'Itemid' => $this->Itemid]);
}
if (count($this->items))
{
echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/pricingtable_circle_plans.php', ['items' => $this->items, 'input' => $this->input, 'config' => $this->config, 'Itemid' => $this->Itemid, 'categoryId' => $this->categoryId, 'bootstrapHelper' => $this->bootstrapHelper, 'params' => $this->params]);
}
?>
</div>

View File

@@ -0,0 +1,74 @@
<?php
/**
* @package Joomla
* @subpackage Membership Pro
* @author Tuan Pham Ngoc
* @copyright Copyright (C) 2012 - 2025 Ossolution Team
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
$categoryId = $this->category ? $this->category->id : 0;
?>
<div id="osm-plans-list-pricing-table-flat" class="osm-container osm-container-j4 osm-pricingtable-container<?php echo $categoryId; ?>">
<?php
if ($this->params->get('show_page_heading', 1))
{
if ($this->category)
{
$pageHeading = $this->params->get('page_heading') ?: $this->category->title;
}
else
{
$pageHeading = $this->params->get('page_heading') ?: Text::_('OSM_SUBSCRIPTION_PLANS');
}
if ($this->input->getInt('hmvc_call'))
{
$hTag = 'h2';
}
else
{
$hTag = 'h1';
}
?>
<<?php echo $hTag; ?> class="osm-page-title"><?php echo $pageHeading; ?></<?php echo $hTag; ?>>
<?php
}
if (!empty($this->category->description))
{
$description = $this->category->description;
}
elseif (OSMembershipHelper::isValidMessage($this->params->get('intro_text')))
{
$description = $this->params->get('intro_text');
}
else
{
$description = '';
}
if ($description)
{
?>
<div class="osm-description osm-page-intro-text <?php echo $this->bootstrapHelper->getClassMapping('clearfix'); ?>">
<?php echo HTMLHelper::_('content.prepare', $description); ?>
</div>
<?php
}
if (count($this->categories))
{
echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/categories.php', ['items' => $this->categories, 'categoryId' => $this->categoryId, 'config' => $this->config, 'Itemid' => $this->Itemid]);
}
if (count($this->items))
{
echo OSMembershipHelperHtml::loadCommonLayout('common/tmpl/pricingtable_flat_plans.php', ['items' => $this->items, 'input' => $this->input, 'config' => $this->config, 'Itemid' => $this->Itemid, 'categoryId' => $this->categoryId, 'bootstrapHelper' => $this->bootstrapHelper, 'params' => $this->params]);
}
?>
</div>

View File

@@ -0,0 +1,59 @@
<?php
/**
* @package Joomla.Site
* @subpackage Templates.Moko-Cassiopeia
*
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
* @copyright (C) 2025 Jonathan Miler || Moko Consulting <https://mokoconsulting.tech>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\Utilities\ArrayHelper;
$module = $displayData['module'];
$params = $displayData['params'];
$attribs = $displayData['attribs'];
if ($module->content === null || $module->content === '') {
return;
}
$moduleTag = $params->get('module_tag', 'div');
$moduleAttribs = [];
$moduleAttribs['class'] = $module->position . ' card ' . htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_QUOTES, 'UTF-8');
$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_QUOTES, 'UTF-8');
$headerClass = htmlspecialchars($params->get('header_class', ''), ENT_QUOTES, 'UTF-8');
$headerAttribs = [];
$headerAttribs['class'] = $headerClass;
// Only output a header class if it is not card-title
if ($headerClass !== 'card-title') :
$headerAttribs['class'] = 'card-header ' . $headerClass;
endif;
// Only add aria if the moduleTag is not a div
if ($moduleTag !== 'div') {
if ($module->showtitle) :
$moduleAttribs['aria-labelledby'] = 'mod-' . $module->id;
$headerAttribs['id'] = 'mod-' . $module->id;
else :
$moduleAttribs['aria-label'] = $module->title;
endif;
}
$header = '<' . $headerTag . ' ' . ArrayHelper::toString($headerAttribs) . '>' . $module->title . '</' . $headerTag . '>';
?>
<<?php echo $moduleTag; ?> <?php echo ArrayHelper::toString($moduleAttribs); ?>>
<?php if ($module->showtitle && $headerClass !== 'card-title') : ?>
<?php echo $header; ?>
<?php endif; ?>
<div class="card-body">
<?php if ($module->showtitle && $headerClass === 'card-title') : ?>
<?php echo $header; ?>
<?php endif; ?>
<?php echo $module->content; ?>
</div>
</<?php echo $moduleTag; ?>>

View File

@@ -0,0 +1,86 @@
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* html5 (chosen html5 tag and font header tags)
*/
defined('_JEXEC') or die;
use Joomla\Utilities\ArrayHelper;
$module = $displayData['module'];
$params = $displayData['params'];
//var_dump($module->position);
if ((string) $module->content === '') {
return;
}
$moduleIcon = '';
if ($module->position == 'sidebar-left' || $module->position == 'sidebar-right') {
switch ($module->module) {
case 'mod_virtuemart_cart':
$moduleIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="bi bi-cart3" viewBox="0 0 16 16">
<path d="M0 1.5A.5.5 0 0 1 .5 1H2a.5.5 0 0 1 .485.379L2.89 3H14.5a.5.5 0 0 1 .49.598l-1 5a.5.5 0 0 1-.465.401l-9.397.472L4.415 11H13a.5.5 0 0 1 0 1H4a.5.5 0 0 1-.491-.408L2.01 3.607 1.61 2H.5a.5.5 0 0 1-.5-.5M3.102 4l.84 4.479 9.144-.459L13.89 4zM5 12a2 2 0 1 0 0 4 2 2 0 0 0 0-4m7 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4m-7 1a1 1 0 1 1 0 2 1 1 0 0 1 0-2m7 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2"/>
</svg>';
break;
case 'mod_virtuemart_category':
$moduleIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="bi bi-list" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5"/>
</svg>';
break;
case 'mod_virtuemart_product':
$moduleIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list-task" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M2 2.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5V3a.5.5 0 0 0-.5-.5zM3 3H2v1h1z"/>
<path d="M5 3.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5M5.5 7a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1zm0 4a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1z"/>
<path fill-rule="evenodd" d="M1.5 7a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5zM2 7h1v1H2zm0 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zm1 .5H2v1h1z"/>
</svg>';
break;
default:
$moduleIcon = '';
}
}
$moduleTag = htmlspecialchars($params->get('module_tag', 'div'), ENT_QUOTES, 'UTF-8');
$moduleAttribs = [];
$moduleAttribs['class'] = 'moduletable ' . htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_QUOTES, 'UTF-8');
$bootstrapSize = (int) $params->get('bootstrap_size', 0);
$asideCol = ($module->position == 'sidebar-left' || $module->position == 'sidebar-right') ? ' col-md-6' : '';
$footerCol = $module->position == 'footer' ? ' col-md-6' : '';
$moduleAttribs['class'] .= $bootstrapSize !== 0 ? $footerCol . ' col-lg-' . $bootstrapSize : $asideCol;
$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_QUOTES, 'UTF-8');
$headerClass = htmlspecialchars($params->get('header_class', ''), ENT_QUOTES, 'UTF-8');
$headerAttribs = [];
$headerAttribs['class'] = 'module-title ';
// Only output a header class if one is set
if ($headerClass !== '') {
$headerAttribs['class'] = $headerClass;
}
// Only add aria if the moduleTag is not a div
if ($moduleTag !== 'div') {
if ($module->showtitle) :
$moduleAttribs['aria-labelledby'] = 'mod-' . $module->id;
$headerAttribs['id'] = 'mod-' . $module->id;
else :
$moduleAttribs['aria-label'] = $module->title;
endif;
}
$header = '<' . $headerTag . ' ' . ArrayHelper::toString($headerAttribs) . '>' . $module->title . $moduleIcon . '</' . $headerTag . '>';
?>
<<?php echo $moduleTag; ?> <?php echo ArrayHelper::toString($moduleAttribs); ?>>
<?php if ((bool) $module->showtitle) : ?>
<?php echo $header; ?>
<?php endif; ?>
<?php echo $module->content; ?>
</<?php echo $moduleTag; ?>>

View File

@@ -0,0 +1,53 @@
<?php
/**
* @package Joomla.Site
* @subpackage Templates.Moko-Cassiopeia
*
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
* @copyright (C) 2025 Jonathan Miler || Moko Consulting <https://mokoconsulting.tech>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\Utilities\ArrayHelper;
$module = $displayData['module'];
$params = $displayData['params'];
$attribs = $displayData['attribs'];
if ($module->content === null || $module->content === '') {
return;
}
$moduleTag = $params->get('module_tag', 'div');
$moduleAttribs = [];
$moduleAttribs['class'] = $module->position . ' no-card ' . htmlspecialchars($params->get('moduleclass_sfx', ''), ENT_QUOTES, 'UTF-8');
$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_QUOTES, 'UTF-8');
$headerClass = htmlspecialchars($params->get('header_class', ''), ENT_QUOTES, 'UTF-8');
$headerAttribs = [];
// Only output a header class if one is set
if ($headerClass !== '') {
$headerAttribs['class'] = $headerClass;
}
// Only add aria if the moduleTag is not a div
if ($moduleTag !== 'div') {
if ($module->showtitle) :
$moduleAttribs['aria-labelledby'] = 'mod-' . $module->id;
$headerAttribs['id'] = 'mod-' . $module->id;
else :
$moduleAttribs['aria-label'] = $module->title;
endif;
}
$header = '<' . $headerTag . ' ' . ArrayHelper::toString($headerAttribs) . '>' . $module->title . '</' . $headerTag . '>';
?>
<<?php echo $moduleTag; ?> <?php echo ArrayHelper::toString($moduleAttribs); ?>>
<?php if ($module->showtitle) : ?>
<?php echo $header; ?>
<?php endif; ?>
<?php echo $module->content; ?>
</<?php echo $moduleTag; ?>>

View File

@@ -0,0 +1,32 @@
<?php
/**
* @package Joomla.Site
* @subpackage mod_custom
*
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
* @copyright (C) 2025 Jonathan Miler || Moko Consulting <https://mokoconsulting.tech>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Uri\Uri;
$modId = 'mod-custom' . $module->id;
if ($params->get('backgroundimage')) {
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $app->getDocument()->getWebAssetManager();
$wa->addInlineStyle('
#' . $modId . '{background-image: url("' . Uri::root(true) . '/' . HTMLHelper::_('cleanImageURL', $params->get('backgroundimage'))->url . '");}
', ['name' => $modId]);
}
?>
<div class="mod-custom custom banner-overlay" id="<?php echo $modId; ?>">
<div class="overlay">
<?php echo $module->content; ?>
</div>
</div>

View File

@@ -0,0 +1,158 @@
<?php
/**
* @package Tabaoca.Component.Gabble.Site
* @subpackage mod_gabble
* @copyright (C) 2023 Jonatas C. Ferreira
* @license GNU/AGPL v3 (see licence.txt)
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
$currentuser = Factory::getuser();
$app = Factory::getApplication();
$session = $app->getSession();
$config = $app->getParams('com_gabble');
$document = Factory::getDocument();
$document->addStyleSheet('media/com_gabble/css/gabble.css');
$document->addStyleSheet('media/templates/site/cassiopeia_meaewellness/css/gable.css');
$lang = Factory::getLanguage();
$lang->load('com_gabble');
Text::script('COM_GABBLE_TIMEOUT');
if ( !$currentuser->get("id")){
echo '<div class="content">
<div id="mod_gable">
<div id="mod_lists_gabble">
<div class="taba-user-on"><div class="taba-user"><i class="icon-joomla"></i> '. Text::_('COM_GABBLE_LOGGEDIN') . '</div></div>
</div>
</div>
</div>';
return;
}
$input = $app->input;
if ($input->get('option') == 'com_gabble') {
echo '<div class="content">
<div id="mod_gabble">
<div id="mod_lists_gabble">
<button id="btn_gabble" class="button_list" onclick="window.location.href = &quot;' . Uri::root() . '&quot;;"><i class="icon-home"></i></button>
<div class="taba-user-on"><div class="taba-user"><i class="icon-joomla"></i> '. Text::_('COM_GABBLE_GABBLE_CHAT') . '</div></div>
</div>
</div>
</div>';
return;
}
$document->addScript('media/com_gabble/js/gabble_com.js');
//$document->addScript('media/templates/site/cassiopeia_meaewellness/js/mod_gabblegabble_com.js');
?>
<div class="content">
<div id="mod_gabble">
<div id="list_windows" class="list-windows"></div>
<div id="main_windows" class="main-windows"></div>
<div id="lists_gabble">
<div id="select_list" class="row">
<div class="col-md-4 notifications" title="<?php echo Text::_('COM_GABBLE_CHATS'); ?>">
<button id="list_chats" class="button_list" title="Chats" onclick="select_list(1);"><i class="icon-comments-2"></i></button>
<div id="n_notifications" class="n-notifications" title="Users" hidden=""></div>
</div>
<div class="col-md-4" title="<?php echo Text::_('COM_GABBLE_USERS'); ?>">
<button id="list_users" class="button_list" onclick="select_list(2);"><i class="icon-users"></i></button>
</div>
<div class="col-md-4" title="<?php echo Text::_('COM_GABBLE_GABBLE_CHAT'); ?>">
<button id="btn_gabble" class="button_list" onclick="window.location.href = &quot;<?php echo Uri::root().'index.php?option=com_gabble&view=gabble'; ?>&quot;;"><i class="icon-expand-2"></i></button>
</div>
</div>
<div id="options_list" hidden="">
<select id="users_list" name="users_list" onchange="select_list(2);">
<option value="0"><?php echo Text::_('COM_GABBLE_USERS_ON'); ?></option>
<option value="1"><?php echo Text::_('COM_GABBLE_USERS_ALL'); ?></option>
</select>
</div>
<div id="frame_list">
<iframe
id="users_frame"
class="iframe_list"
srcdoc="<html>
<head>
<link rel=&quot;stylesheet&quot; href=&quot;<?php echo Uri::root().'media/com_gabble/css/gabble.css'; ?>&quot; type=&quot;text/css&quot;/>
</head>
<body class=&quot;taba-content&quot;>
</body>
</html>"
marginwidth="0"
marginheight="0"
onload="setup_com();"
hidden="">
</iframe>
<iframe
id="users_on_frame"
class="iframe_list"
srcdoc="<html>
<head>
<link rel=&quot;stylesheet&quot; href=&quot;<?php echo Uri::root().'media/com_gabble/css/gabble.css'; ?>&quot; type=&quot;text/css&quot;/>
</head>
<body class=&quot;taba-content&quot;>
</body>
</html>"
marginwidth="0"
marginheight="0"
hidden="">
</iframe>
<iframe
id="feeds_frame"
class="iframe_list"
srcdoc="<html>
<head>
<link rel=&quot;stylesheet&quot; href=&quot;<?php echo Uri::root().'media/com_gabble/css/gabble.css'; ?>&quot; type=&quot;text/css&quot;/>
</head>
<body class=&quot;taba-content&quot;>
</body>
</html>"
marginwidth="0"
marginheight="0"
hidden="">
</iframe>
</div>
<div id="openai_btn" title="OpenAi GPT" onclick="open_user(0); event.stopPropagation();">
<img src="<?php echo Uri::root() . "media/com_gabble/images/logo_openai.png"; ?>" alt="OpenAI GPT">
</div>
</div>
</div>
<input type="hidden" id="gabble_type" value="mod">
<input type="hidden" id="uri_root" value="<?php echo Uri::root(); ?>">
<input type="hidden" id="token" value="<?php echo $session->getFormToken(); ?>">
<input type="hidden" id="user_id" value="<?php echo $currentuser->get("id"); ?>">
<input type="hidden" id="openai_gpt" value="<?php echo $config->get('openai_gpt'); ?>">
<input type="hidden" id="openai_gpt_name" value="<?php echo $config->get('openai_gpt_name'); ?>">
</div>
<p style="text-align:right;" ><?php echo Text::_('COM_GABBLE_POWERED');?> <a href="https://tabaoca.org">Tabaoca</a></p>

View File

@@ -0,0 +1,26 @@
<?php
/**
* @package Joomla.Site
* @subpackage mod_menu
*
* @copyright (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
HTMLHelper::_('bootstrap.collapse');
?>
<nav class="navbar navbar-expand-md" aria-label="<?php echo htmlspecialchars($module->title, ENT_QUOTES, 'UTF-8'); ?>">
<button class="navbar-toggler navbar-toggler-right" type="button" data-bs-toggle="collapse" data-bs-target="#navbar<?php echo $module->id; ?>" aria-controls="navbar<?php echo $module->id; ?>" aria-expanded="false" aria-label="<?php echo Text::_('MOD_MENU_TOGGLE'); ?>">
<span class="icon-menu" aria-hidden="true"></span>
</button>
<div class="collapse navbar-collapse" id="navbar<?php echo $module->id; ?>">
<?php require __DIR__ . '/dropdown-metismenu.php'; ?>
</div>
</nav>

View File

@@ -0,0 +1,108 @@
<?php
/**
* @package Joomla.Site
* @subpackage mod_menu
*
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
* @copyright (C) 2025 Jonathan Miler || Moko Consulting <https://mokoconsulting.tech>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Helper\ModuleHelper;
use Joomla\Utilities\ArrayHelper;
/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $app->getDocument()->getWebAssetManager();
$wa->registerAndUseScript('metismenu', 'media/templates/site/moko-cassiopeia/js/mod_menu/menu-metismenu.min.js', [], ['defer' => true], ['metismenujs']);
$attributes = [];
$attributes['class'] = 'mod-menu mod-menu_dropdown-metismenu metismenu mod-list ' . $class_sfx;
if ($tagId = $params->get('tag_id', '')) {
$attributes['id'] = $tagId;
}
$start = (int) $params->get('startLevel', 1);
?>
<ul <?php echo ArrayHelper::toString($attributes); ?>>
<?php foreach ($list as $i => &$item) {
// Skip sub-menu items if they are set to be hidden in the module's options
if (!$showAll && $item->level > $start) {
continue;
}
$itemParams = $item->getParams();
$class = [];
$class[] = 'metismenu-item item-' . $item->id . ' level-' . ($item->level - $start + 1);
if ($item->id == $default_id) {
$class[] = 'default';
}
if ($item->id == $active_id || ($item->type === 'alias' && $itemParams->get('aliasoptions') == $active_id)) {
$class[] = 'current';
}
if (in_array($item->id, $path)) {
$class[] = 'active';
} elseif ($item->type === 'alias') {
$aliasToId = $itemParams->get('aliasoptions');
if (count($path) > 0 && $aliasToId == $path[count($path) - 1]) {
$class[] = 'active';
} elseif (in_array($aliasToId, $path)) {
$class[] = 'alias-parent-active';
}
}
if ($item->type === 'separator') {
$class[] = 'divider';
}
if ($showAll) {
if ($item->deeper) {
$class[] = 'deeper';
}
if ($item->parent) {
$class[] = 'parent';
}
}
echo '<li class="' . implode(' ', $class) . '">';
switch ($item->type) :
case 'separator':
case 'component':
case 'heading':
case 'url':
require ModuleHelper::getLayoutPath('mod_menu', 'dropdown-metismenu_' . $item->type);
break;
default:
require ModuleHelper::getLayoutPath('mod_menu', 'dropdown-metismenu_url');
endswitch;
switch (true) :
// The next item is deeper.
case $showAll && $item->deeper:
echo '<ul class="mm-collapse">';
break;
// The next item is shallower.
case $item->shallower:
echo '</li>';
echo str_repeat('</ul></li>', $item->level_diff);
break;
// The next item is on the same level.
default:
echo '</li>';
break;
endswitch;
}
?></ul>

View File

@@ -0,0 +1,77 @@
<?php
/**
* @package Joomla.Site
* @subpackage mod_menu
*
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
* @copyright (C) 2025 Jonathan Miler || Moko Consulting <https://mokoconsulting.tech>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Filter\OutputFilter;
use Joomla\CMS\HTML\HTMLHelper;
$attributes = [];
if ($item->anchor_title) {
$attributes['title'] = $item->anchor_title;
}
if ($item->anchor_css) {
$attributes['class'] = $item->anchor_css;
}
if ($item->anchor_rel) {
$attributes['rel'] = $item->anchor_rel;
}
if ($item->id == $active_id) {
$attributes['aria-current'] = 'location';
if ($item->current) {
$attributes['aria-current'] = 'page';
}
}
$linktype = $item->title;
if ($item->menu_icon) {
// The link is an icon
if ($itemParams->get('menu_text', 1)) {
// If the link text is to be displayed, the icon is added with aria-hidden
$linktype = '<span class="p-2 ' . $item->menu_icon . '" aria-hidden="true"></span>' . $item->title;
} else {
// If the icon itself is the link, it needs a visually hidden text
$linktype = '<span class="p-2 ' . $item->menu_icon . '" aria-hidden="true"></span><span class="visually-hidden">' . $item->title . '</span>';
}
} elseif ($item->menu_image) {
// The link is an image, maybe with an own class
$image_attributes = [];
if ($item->menu_image_css) {
$image_attributes['class'] = $item->menu_image_css;
}
$linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes);
if ($itemParams->get('menu_text', 1)) {
$linktype .= '<span class="image-title">' . $item->title . '</span>';
}
}
if ($item->browserNav == 1) {
$attributes['target'] = '_blank';
} elseif ($item->browserNav == 2) {
$options = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes';
$attributes['onclick'] = "window.open(this.href, 'targetWindow', '" . $options . "'); return false;";
}
echo HTMLHelper::link(OutputFilter::ampReplace(htmlspecialchars($item->flink, ENT_COMPAT, 'UTF-8', false)), $linktype, $attributes);
if ($showAll && $item->deeper) {
echo '<button class="mm-collapsed mm-toggler mm-toggler-link" aria-haspopup="true" aria-expanded="false" aria-label="' . $item->title . '"></button>';
}

View File

@@ -0,0 +1,59 @@
<?php
/**
* @package Joomla.Site
* @subpackage mod_menu
*
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
* @copyright (C) 2025 Jonathan Miler || Moko Consulting <https://mokoconsulting.tech>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\Utilities\ArrayHelper;
$attributes = [];
if ($item->anchor_title) {
$attributes['title'] = $item->anchor_title;
}
$attributes['class'] = 'mod-menu__heading nav-header';
$attributes['class'] .= $item->anchor_css ? ' ' . $item->anchor_css : null;
$linktype = $item->title;
if ($item->menu_icon) {
// The link is an icon
if ($itemParams->get('menu_text', 1)) {
// If the link text is to be displayed, the icon is added with aria-hidden
$linktype = '<span class="p-2 ' . $item->menu_icon . '" aria-hidden="true"></span>' . $item->title;
} else {
// If the icon itself is the link, it needs a visually hidden text
$linktype = '<span class="p-2 ' . $item->menu_icon . '" aria-hidden="true"></span><span class="visually-hidden">' . $item->title . '</span>';
}
} elseif ($item->menu_image) {
// The link is an image, maybe with an own class
$image_attributes = [];
if ($item->menu_image_css) {
$image_attributes['class'] = $item->menu_image_css;
}
$linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes);
if ($itemParams->get('menu_text', 1)) {
$linktype .= '<span class="image-title">' . $item->title . '</span>';
}
}
if ($showAll && $item->deeper) {
$attributes['class'] .= ' mm-collapsed mm-toggler mm-toggler-nolink';
$attributes['aria-haspopup'] = 'true';
$attributes['aria-expanded'] = 'false';
echo '<button ' . ArrayHelper::toString($attributes) . '>' . $linktype . '</button>';
} else {
echo '<span ' . ArrayHelper::toString($attributes) . '>' . $linktype . '</span>';
}

View File

@@ -0,0 +1,59 @@
<?php
/**
* @package Joomla.Site
* @subpackage mod_menu
*
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
* @copyright (C) 2025 Jonathan Miler || Moko Consulting <https://mokoconsulting.tech>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\Utilities\ArrayHelper;
$attributes = [];
if ($item->anchor_title) {
$attributes['title'] = $item->anchor_title;
}
$attributes['class'] = 'mod-menu__separator separator';
$attributes['class'] .= $item->anchor_css ? ' ' . $item->anchor_css : null;
$linktype = $item->title;
if ($item->menu_icon) {
// The link is an icon
if ($itemParams->get('menu_text', 1)) {
// If the link text is to be displayed, the icon is added with aria-hidden
$linktype = '<span class="p-2 ' . $item->menu_icon . '" aria-hidden="true"></span>' . $item->title;
} else {
// If the icon itself is the link, it needs a visually hidden text
$linktype = '<span class="p-2 ' . $item->menu_icon . '" aria-hidden="true"></span><span class="visually-hidden">' . $item->title . '</span>';
}
} elseif ($item->menu_image) {
// The link is an image, maybe with an own class
$image_attributes = [];
if ($item->menu_image_css) {
$image_attributes['class'] = $item->menu_image_css;
}
$linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes);
if ($itemParams->get('menu_text', 1)) {
$linktype .= '<span class="image-title">' . $item->title . '</span>';
}
}
if ($showAll && $item->deeper) {
$attributes['class'] .= ' mm-collapsed mm-toggler mm-toggler-nolink';
$attributes['aria-haspopup'] = 'true';
$attributes['aria-expanded'] = 'false';
echo '<button ' . ArrayHelper::toString($attributes) . '>' . $linktype . '</button>';
} else {
echo '<span ' . ArrayHelper::toString($attributes) . '>' . $linktype . '</span>';
}

View File

@@ -0,0 +1,74 @@
<?php
/**
* @package Joomla.Site
* @subpackage mod_menu
*
* @copyright (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
* @copyright (C) 2025 Jonathan Miler || Moko Consulting <https://mokoconsulting.tech>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Filter\OutputFilter;
use Joomla\CMS\HTML\HTMLHelper;
$attributes = [];
if ($item->anchor_title) {
$attributes['title'] = $item->anchor_title;
}
if ($item->anchor_css) {
$attributes['class'] = $item->anchor_css;
}
if ($item->anchor_rel) {
$attributes['rel'] = $item->anchor_rel;
}
$linktype = $item->title;
if ($item->menu_icon) {
// The link is an icon
if ($itemParams->get('menu_text', 1)) {
// If the link text is to be displayed, the icon is added with aria-hidden
$linktype = '<span class="p-2 ' . $item->menu_icon . '" aria-hidden="true"></span>' . $item->title;
} else {
// If the icon itself is the link, it needs a visually hidden text
$linktype = '<span class="p-2 ' . $item->menu_icon . '" aria-hidden="true"></span><span class="visually-hidden">' . $item->title . '</span>';
}
} elseif ($item->menu_image) {
// The link is an image, maybe with an own class
$image_attributes = [];
if ($item->menu_image_css) {
$image_attributes['class'] = $item->menu_image_css;
}
$linktype = HTMLHelper::_('image', $item->menu_image, $item->title, $image_attributes);
if ($itemParams->get('menu_text', 1)) {
$linktype .= '<span class="image-title">' . $item->title . '</span>';
}
}
if ($item->browserNav == 1) {
$attributes['target'] = '_blank';
$attributes['rel'] = 'noopener noreferrer';
if ($item->anchor_rel == 'nofollow') {
$attributes['rel'] .= ' nofollow';
}
} elseif ($item->browserNav == 2) {
$options = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,' . $params->get('window_open');
$attributes['onclick'] = "window.open(this.href, 'targetWindow', '" . $options . "'); return false;";
}
echo HTMLHelper::link(OutputFilter::ampReplace(htmlspecialchars($item->flink, ENT_COMPAT, 'UTF-8', false)), $linktype, $attributes);
if ($showAll && $item->deeper) {
echo '<button class="mm-collapsed mm-toggler mm-toggler-link" aria-haspopup="true" aria-expanded="false" aria-label="' . $item->title . '"></button>';
}

View File

@@ -0,0 +1,98 @@
<?php
defined('_JEXEC') or die('Restricted access');
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.dropdown');
vmJsApi::cssSite();
$data = $cart->prepareAjaxData(true);
$view = vRequest::getCmd('view');
?>
<div class="vmCartModule row <?php echo $params->get('moduleclass_sfx'); ?>">
<div class="col-12 mb-2">
<p class="total_products px-2 py-1 bg-light">
<?php echo $data->totalProductTxt ?>
</p>
</div>
<?php if ($show_product_list) : ?>
<div class="hiddencontainer d-none" id="hiddencontainer">
<div class="vmcontainer">
<div class="product_row row align-items-center pb-2 mb-2">
<div class="product_image col-3">
<div class="image image img-thumbnail"></div>
</div>
<div class="col-6">
<span class="quantity"></span>
&nbsp;x&nbsp;
<span class="product_name"></span>
<div class="customProductData col-12 mt-1 small"></div>
</div>
<?php if ($show_price and $currencyDisplay->_priceConfig['salesPrice'][0]) : ?>
<div class="col-3 text-end">
<span class="subtotal_with_tax"></span>
</div>
<?php endif; ?>
<div class="col-12 mt-3">
<div class="border-bottom"></div>
</div>
</div>
</div>
</div>
<div class="vmcontainer vm_cart_products container small">
<?php foreach ($data->products as $product) : ?>
<div class="product_row row align-items-center pb-2 mb-2">
<div class="product_image col-3">
<?php if ( VmConfig::get('oncheckout_show_images')) : ?>
<div class="image img-thumbnail"><?php echo $product['image']; ?></div>
<?php endif; ?>
</div>
<div class="col-6">
<span class="quantity">
<?php echo $product['quantity'] ?>
</span>
&nbsp;x&nbsp;
<span class="product_name">
<?php echo $product['product_name'] ?>
</span>
<div class="customProductData col-12 mt-1 small">
<?php echo $product['customProductData'] ?>
</div>
</div>
<?php if ($show_price and $currencyDisplay->_priceConfig['salesPrice'][0]) : ?>
<div class="col-3 text-end text-nowrap">
<span class="subtotal_with_tax">
<?php echo $product['subtotal_with_tax'] ?>
</span>
</div>
<?php endif; ?>
<div class="col-12 mt-3">
<div class="border-bottom"></div>
</div>
</div>
<?php endforeach; ?>
</div>
<div class="show_cart_m d-flex align-items-center container">
<a class="btn btn-secondary btn-sm show-cart me-auto" href="<?php echo $data->cart_show_link; ?>" rel="nofollow">
<?php echo vmText::_('COM_VIRTUEMART_CART_SHOW'); ?>
</a>
<span class="total small">
<?php echo !empty($data->products) ? $data->billTotal : ''; ?>
</span>
</div>
<?php endif; ?>
<?php if ($view != 'cart' and $view != 'user') : ?>
<div class="payments-signin-button"></div>
<?php endif; ?>
<noscript>
<?php echo vmText::_('MOD_VIRTUEMART_CART_AJAX_CART_PLZ_JAVASCRIPT') ?>
</noscript>
</div>

View File

@@ -0,0 +1,106 @@
<?php
/**
* @package Joomla.Site
* @subpackage Templates.vmbasic
*
* @copyright (C) 2024 Spiros Petrakis
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die('Restricted access');
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.dropdown');
vmJsApi::cssSite();
$data = $cart->prepareAjaxData(true);
$view = vRequest::getCmd('view');
?>
<div class="vmCartModule <?php echo $params->get('moduleclass_sfx'); ?> dropdown">
<button class="btn btn-link btn-sm p-0 dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-cart3" viewBox="0 0 16 16">
<path d="M0 1.5A.5.5 0 0 1 .5 1H2a.5.5 0 0 1 .485.379L2.89 3H14.5a.5.5 0 0 1 .49.598l-1 5a.5.5 0 0 1-.465.401l-9.397.472L4.415 11H13a.5.5 0 0 1 0 1H4a.5.5 0 0 1-.491-.408L2.01 3.607 1.61 2H.5a.5.5 0 0 1-.5-.5M3.102 4l.84 4.479 9.144-.459L13.89 4zM5 12a2 2 0 1 0 0 4 2 2 0 0 0 0-4m7 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4m-7 1a1 1 0 1 1 0 2 1 1 0 0 1 0-2m7 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2"/>
</svg>
<span class="total_products ms-2">
<?php echo $data->totalProductTxt ?>
</span>
</button>
<?php if ($show_product_list) : ?>
<div class="hiddencontainer d-none" id="hiddencontainer">
<div class="vmcontainer">
<div class="product_row row align-items-center pb-2 mb-2 border-bottom">
<div class="product_image col-3">
<div class="image image img-thumbnail"></div>
</div>
<div class="col-6">
<span class="quantity"></span>
&nbsp;x&nbsp;
<span class="product_name"></span>
<div class="customProductData col-12 mt-1 small"></div>
</div>
<?php if ($show_price and $currencyDisplay->_priceConfig['salesPrice'][0]) : ?>
<div class="col-3 text-end">
<span class="subtotal_with_tax"></span>
</div>
<?php endif; ?>
</div>
</div>
</div>
<div class="dropdown-menu dropdown-menu-end">
<div class="vmcontainer vm_cart_products container small">
<?php foreach ($data->products as $product) : ?>
<div class="product_row row align-items-center pb-2 mb-2 border-bottom">
<div class="product_image col-3">
<?php if ( VmConfig::get('oncheckout_show_images')) : ?>
<div class="image img-thumbnail"><?php echo $product['image']; ?></div>
<?php endif; ?>
</div>
<div class="col-6">
<span class="quantity">
<?php echo $product['quantity'] ?>
</span>
&nbsp;x&nbsp;
<span class="product_name">
<?php echo $product['product_name'] ?>
</span>
<div class="customProductData col-12 mt-1 small">
<?php echo $product['customProductData'] ?>
</div>
</div>
<?php if ($show_price and $currencyDisplay->_priceConfig['salesPrice'][0]) : ?>
<div class="col-3 text-end text-nowrap">
<span class="subtotal_with_tax">
<?php echo $product['subtotal_with_tax'] ?>
</span>
</div>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>
<div class="show_cart_m d-flex align-items-center container">
<a class="btn btn-secondary btn-sm show-cart me-auto" href="<?php echo $data->cart_show_link; ?>" rel="nofollow">
<?php echo vmText::_('COM_VIRTUEMART_CART_SHOW'); ?>
</a>
<span class="total small">
<?php echo !empty($data->products) ? $data->billTotal : ''; ?>
</span>
</div>
</div>
<?php endif; ?>
<?php if ($view != 'cart' and $view != 'user') : ?>
<div class="payments-signin-button"></div>
<?php endif; ?>
<noscript>
<?php echo vmText::_('MOD_VIRTUEMART_CART_AJAX_CART_PLZ_JAVASCRIPT') ?>
</noscript>
</div>

View File

@@ -0,0 +1,43 @@
<?php
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper;
$category_id = vRequest::getInt ('virtuemart_category_id', 0);
$sublevel = $params->get('level', 0);
?>
<ul class="vm-menu list-unstyled<?php echo $class_sfx ? ' ' . $class_sfx : ''; ?>">
<?php foreach ($categories as $category) : ?>
<?php
$active_menu = '';
$caturl = Route::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$category->virtuemart_category_id);
$cattext = $category->category_name;
if (in_array( $category->virtuemart_category_id, $parentCategories)) {
$active_menu = ' active';
}
?>
<li class="border-bottom<?php echo $active_menu ?>">
<?php echo HTMLHelper::link($caturl, $cattext); ?>
<?php if (!empty($category->childs) && $sublevel > 0) : ?>
<ul class="vm-submenu<?php echo $class_sfx; ?> list-unstyled small px-3 py-1 bg-light">
<?php foreach ($category->childs as $child) : ?>
<?php
$active_menu = '';
if ($child->virtuemart_category_id == $category_id) {
$active_menu = ' active';
}
$caturl = Route::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$child->virtuemart_category_id);
$cattext = vmText::_($child->category_name);
?>
<li class="border-bottom<?php echo $active_menu ?>">
<?php echo HTMLHelper::link($caturl, $cattext); ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>

View File

@@ -0,0 +1,66 @@
<?php
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper;
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.collapse');
$doc = Factory::getDocument();
$wa = $doc->getWebAssetManager();
$wa->addInlineScript('jQuery(function($) {
$(\'.vm-menu-btn\').click(function(e){
e.stopPropagation();
e.preventDefault();
});
});
');
$category_id = vRequest::getInt ('virtuemart_category_id', 0);
$sublevel = $params->get('level', 0);
$btnIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708"/>
</svg>';
?>
<ul class="vm-menu vm-menu-current list-unstyled<?php echo $class_sfx ? ' ' . $class_sfx : ''; ?>">
<?php foreach ($categories as $category) : ?>
<?php
$active_menu = '';
if (in_array( $category->virtuemart_category_id, $parentCategories)) {
$active_menu = ' active';
}
$has_children = !empty($category->childs) ? ' has-children' : '';
$collapsed = empty($active_menu) ? ' collapsed' : '';
$caturl = Route::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$category->virtuemart_category_id);
$btn = '<button class="vm-menu-btn' . $collapsed . '" type="button" data-bs-toggle="collapse" href="#vm-menu-current-' . $category->virtuemart_category_id . '" role="button" aria-expanded="false" aria-controls="vm-menu-current-' . $category->virtuemart_category_id . '">' . $btnIcon . '</button>';
$submenu_btn = !empty($category->childs) && $sublevel > 0 ? $btn : '';
$cattext = $category->category_name . $submenu_btn;
?>
<li class="border-bottom<?php echo $active_menu . $has_children; ?>">
<?php echo HTMLHelper::link($caturl, $cattext); ?>
<?php if (!empty($category->childs) && $sublevel > 0) : ?>
<div class="collapse<?php echo !empty($active_menu) ? ' show' : ''; ?>" id="vm-menu-current-<?php echo $category->virtuemart_category_id; ?>">
<ul class="vm-submenu<?php echo $class_sfx; ?> list-unstyled small px-3 py-1 bg-light">
<?php foreach ($category->childs as $child) : ?>
<?php
$active_menu = '';
if ($child->virtuemart_category_id == $category_id) {
$active_menu = ' active';
}
$caturl = Route::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$child->virtuemart_category_id);
$childcattext = $child->category_name;
?>
<li class="border-bottom<?php echo $active_menu ?>">
<?php echo HTMLHelper::link($caturl, $childcattext); ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>

View File

@@ -0,0 +1,66 @@
<?php
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper;
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.collapse');
$doc = Factory::getDocument();
$wa = $doc->getWebAssetManager();
$wa->addInlineScript('jQuery(function($) {
$(\'.vm-menu-btn\').click(function(e){
e.stopPropagation();
e.preventDefault();
});
});
');
$category_id = vRequest::getInt ('virtuemart_category_id', 0);
$sublevel = $params->get('level', 0);
$btnIcon = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708"/>
</svg>';
?>
<ul id="vm-menu-default-<?php echo $module->id; ?>" class="vm-menu vm-menu-default accordion list-unstyled<?php echo $class_sfx ? ' ' . $class_sfx : ''; ?>">
<?php foreach ($categories as $category) : ?>
<?php
$active_menu = '';
if (in_array( $category->virtuemart_category_id, $parentCategories)) {
$active_menu = ' active';
}
$has_children = !empty($category->childs) ? ' has-children' : '';
$collapsed = empty($active_menu) ? ' collapsed' : '';
$caturl = Route::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$category->virtuemart_category_id);
$btn = '<button class="vm-menu-btn' . $collapsed . '" type="button" data-bs-toggle="collapse" href="#vm-menu-default-' . $category->virtuemart_category_id . '" role="button" aria-expanded="false" aria-controls="vm-menu-default-' . $category->virtuemart_category_id . '">' . $btnIcon . '</button>';
$submenu_btn = !empty($category->childs) && $sublevel > 0 ? $btn : '';
$cattext = $category->category_name . $submenu_btn;
?>
<li class="accordion-item border-bottom<?php echo $active_menu . $has_children; ?>">
<?php echo HTMLHelper::link($caturl, $cattext); ?>
<?php if (!empty($category->childs) && $sublevel > 0) : ?>
<div class="accordion-collapse collapse<?php echo !empty($active_menu) ? ' show' : ''; ?>" id="vm-menu-default-<?php echo $category->virtuemart_category_id; ?>" data-bs-parent="#vm-menu-default-<?php echo $module->id; ?>">
<ul class="vm-submenu<?php echo $class_sfx; ?> list-unstyled small px-3 py-1 bg-light">
<?php foreach ($category->childs as $child) : ?>
<?php
$active_menu = '';
if ($child->virtuemart_category_id == $category_id) {
$active_menu = ' active';
}
$caturl = Route::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$child->virtuemart_category_id);
$childcattext = $child->category_name;
?>
<li class="border-bottom<?php echo $active_menu ?>">
<?php echo HTMLHelper::link($caturl, $childcattext); ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>

View File

@@ -0,0 +1,27 @@
<?php
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Router\Route;
$categoryModel->addImages($categories);
$categories_per_row = vmConfig::get('categories_per_row');
$bscol = $module->position == 'sidebar-left' || $module->position == 'sidebar-right' ? '6' : '3';
?>
<ul class="vm-categories-wall list-unstyled p-0 row <?php echo $class_sfx ?>">
<?php foreach ($categories as $category) : ?>
<?php
$caturl = Route::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$category->virtuemart_category_id);
$catname = $category->category_name ;
?>
<li class="vm-categories-wall-catwrapper col-6 col-md-4 col-xl-<?php echo $bscol; ?>">
<div class="vm-categories-wall-spacer text-center">
<a href="<?php echo $caturl; ?>">
<?php echo $category->images[0]->displayMediaThumb('class="vm-categories-wall-img img-fluid mb-3"',false) ?>
<div class="vm-subcategory-title fw-normal pt-2 mb-2 border-top lh-sm"><?php echo $catname; ?></div>
</a>
</div>
</li>
<?php endforeach; ?>
</ul>

View File

@@ -0,0 +1,37 @@
<?php
defined('_JEXEC') or die('Restricted access');
vmJsApi::cssSite();
$selectedCurrency = $currencyModel->getCurrency($virtuemart_currency_id);
?>
<?php if ($text_before) : ?>
<p class="small"><?php echo $text_before; ?></p>
<?php endif; ?>
<form class="virtuemart-currency-form d-none" action="<?php echo vmURI::getCurrentUrlBy('get',true) ?>" method="post">
<input type="hidden" name="virtuemart_currency_id" value="" />
</form>
<div class="vm-currencies-dropdown dropdown">
<button class="btn btn-link btn-sm dropdown-toggle p-0" type="button" data-bs-toggle="dropdown" aria-expanded="false"><?php echo $selectedCurrency->currency_code_3 . ' ' . $selectedCurrency->currency_symbol; ?></button>
<ul class="dropdown-menu dropdown-menu-end">
<?php foreach ($currencies as $currency) : ?>
<li><button class="dropdown-item" data-cur-id="<?php echo $currency->virtuemart_currency_id;?>"><?php echo $currency->currency_txt; ?></button></li>
<?php endforeach; ?>
</ul>
</div>
<?php
$j = 'jQuery(document).ready(function($) {
$(\'.dropdown-item\').click(function(e) {
var currencyId = $(this).attr(\'data-cur-id\');
$(\'input[name="virtuemart_currency_id"]\').val(currencyId);
$(\'.virtuemart-currency-form\').submit();
});
})';
vmJsApi::addJScript('sendFormChange',$j);
echo vmJsApi::writeJS();

View File

@@ -0,0 +1,66 @@
<?php
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Router\Route;
$bscol = round(12 / $manufacturers_per_row);
?>
<div class="vmgroup<?php echo $params->get( 'moduleclass_sfx' ) ?>">
<?php if ($headerText) : ?>
<div class="vm-header-text mb-4"><?php echo $headerText ?></div>
<?php endif; ?>
<?php if ($display_style =="div") : ?>
<div class="vm-manufacturer-module<?php echo $params->get('moduleclass_sfx'); ?> row gy-4 mb-4">
<?php foreach ($manufacturers as $manufacturer) : ?>
<?php $link = Route::_('index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id=' . $manufacturer->virtuemart_manufacturer_id); ?>
<div class="col-6 col-md-4 col-lg-<?php echo $bscol; ?>">
<a href="<?php echo $link; ?>">
<?php
if ($manufacturer->images && ($show == 'image' or $show == 'all' ))
{
echo $manufacturer->images[0]->displayMediaThumb('',false);
}
?>
<?php if ($show == 'text' or $show == 'all') : ?>
<div><?php echo $manufacturer->mf_name; ?></div>
<?php endif; ?>
</a>
</div>
<?php endforeach; ?>
</div>
<?php else : ?>
<ul class="vmmanufacturer<?php echo $params->get('moduleclass_sfx'); ?> row mb-4">
<?php foreach ($manufacturers as $manufacturer) : ?>
<?php $link = Route::_('index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id=' . $manufacturer->virtuemart_manufacturer_id); ?>
<li class="<?php echo ($show == 'image' or $show == 'all') ? 'col-6 mb-3 text-center' : 'col-12 pb-2 mb-2 border-bottom'; ?>">
<a href="<?php echo $link; ?>">
<?php if ($manufacturer->images && ($show == 'image' or $show == 'all' )) : ?>
<?php echo $manufacturer->images[0]->displayMediaThumb('class="img-thumbnail"',false);?>
<?php endif; ?>
<?php if ($show == 'text' or $show == 'all' ) : ?>
<?php
if ($show == 'all') {
$class = "text-center";
}
?>
<div>
<?php echo $manufacturer->mf_name; ?>
</div>
<?php endif; ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<?php if ($footerText) : ?>
<div class="vm-footer-text<?php echo $params->get( 'moduleclass_sfx' ) ?>">
<?php echo $footerText ?>
</div>
<?php endif; ?>
</div>

View File

@@ -0,0 +1,166 @@
<?php
defined ('_JEXEC') or die('Restricted access');
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper;
// Load Bootstrap tooltip
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.tooltip');
vmJsApi::jPrice();
vmJsApi::cssSite();
$ratingModel = VmModel::getModel('ratings');
$showRating = $ratingModel->showRating();
$emptyStar = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star" viewBox="0 0 16 16">
<path d="M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.523 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.56.56 0 0 0-.163-.505L1.71 6.745l4.052-.576a.53.53 0 0 0 .393-.288L8 2.223l1.847 3.658a.53.53 0 0 0 .393.288l4.052.575-2.906 2.77a.56.56 0 0 0-.163.506l.694 3.957-3.686-1.894a.5.5 0 0 0-.461 0z"/>
</svg>';
$star = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16">
<path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>
</svg>';
$bscol = ' col-xl-' . floor (12 / $products_per_row);
?>
<div class="vm-products-module<?php echo $params->get ('moduleclass_sfx') ?>">
<?php if ($headerText) : ?>
<div class="vm-header-text mb-4"><?php echo $headerText ?></div>
<?php endif; ?>
<?php if ($display_style == "div") : ?>
<div class="vm-product-grid<?php echo $params->get ('moduleclass_sfx'); ?> row gy-4 g-xl-5">
<?php foreach ($products as $product) : ?>
<div class="product-container d-flex flex-column col-6 col-md-6 col-lg-4<?php echo $bscol; ?> pb-4">
<div class="vm-product-media-container text-center d-flex flex-column justify-content-center"<?php echo VmConfig::get('img_height', 0) ? ' style="min-height:' . VmConfig::get('img_height', 0) . 'px"' : ''?>>
<?php
$image = !empty($product->images[0]) ? $product->images[0]->displayMediaThumb ('class="vm-products-module-img img-fluid"', FALSE) : '';
echo HTMLHelper::_ ('link', Route::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id), $image, array('title' => $product->product_name));
?>
</div>
<div class="vm-product-rating-container d-flex justify-content-between pb-2 my-3 border-bottom">
<?php if ($showRating) : ?>
<?php
$productRating = $ratingModel->getRatingByProduct($product->virtuemart_product_id, true);
$maxrating = VmConfig::get('vm_maximum_rating_scale', 5);
?>
<?php if (empty($productRating->rating)) : ?>
<div class="vm-ratingbox-unrated d-inline-block" title="<?php echo vmText::_('COM_VIRTUEMART_UNRATED'); ?>" data-bs-toggle="tooltip">
<?php
for ($i=0; $i<5; $i++)
{
echo $emptyStar;
}
?>
</div>
<?php else : ?>
<?php $ratingwidth = $productRating->rating * 16; ?>
<div class="vm-ratingbox-container d-inline-block position-relative">
<div class="vm-ratingbox-unrated d-inline-block">
<?php
for ($i=0; $i<5; $i++)
{
echo $emptyStar;
}
?>
</div>
<div class="vm-ratingbox-rated d-inline-block" title="<?php echo (vmText::_("COM_VIRTUEMART_RATING_TITLE") . ' ' . round($productRating->rating, 2) . '/' . $maxrating) ?>" data-bs-toggle="tooltip">
<div class="vm-ratingbox-bar overflow-x-hidden text-nowrap" style="width:<?php echo $ratingwidth.'px'; ?>">
<?php
for ($i=0; $i<5; $i++)
{
echo $star;
}
?>
</div>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php echo shopFunctionsF::renderVmSubLayout('displaystock', array('product'=>$product)); ?>
</div>
<?php $url = Route::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' .$product->virtuemart_category_id); ?>
<h3 class="vm-product-title text-center mb-2">
<a href="<?php echo $url ?>">
<?php echo $product->product_name; ?>
</a>
</h3>
<p class="vm-product-s-desc text-center text-secondary">
<?php echo shopFunctionsF::limitStringByWord ($product->product_s_desc, 60, ' ...') ?>
</p>
<div class="product-price vm-simple-price-display text-center d-flex justify-content-center align-items-center mb-auto<?php echo $product->prices['discountAmount'] ? ' vm-has-discount' : ''?>">
<?php
if ($show_price) {
if (!empty($product->prices['salesPrice'])) {
echo $currency->createPriceDiv ('salesPrice', '', $product->prices, FALSE, FALSE, 1.0, TRUE);
}
if ($product->prices['discountAmount']) {
echo $currency->createPriceDiv ('basePriceWithTax', '', $product->prices, FALSE, FALSE, 1.0, TRUE);
}
}
?>
</div>
<?php if ($show_addtocart) : ?>
<?php echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$product)); ?>
<?php else : ?>
<a class="btn btn-secondary w-100 mt-3" href="<?php echo $url; ?>"><?php echo vmText::_ ( 'COM_VIRTUEMART_PRODUCT_DETAILS' ); ?></a>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>
<?php else : ?>
<ul class="vm-product-list p-0 <?php echo $params->get ('moduleclass_sfx'); ?> productdetails">
<?php foreach ($products as $product) : ?>
<li class="product-container list-unstyled p-0 d-flex flex-column col-12 mb-4">
<div class="row align-items-center">
<div class="col-5">
<?php
$image = !empty($product->images[0]) ? $product->images[0]->displayMediaThumb ('class="vm-products-module-img img-fluid"', FALSE) : '';
echo HTMLHelper::_ ('link', Route::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id), $image, array('title' => $product->product_name));
?>
</div>
<div class="col-7">
<?php $url = Route::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' .$product->virtuemart_category_id); ?>
<h3 class="vm-product-title mb-2">
<a href="<?php echo $url ?>">
<?php echo $product->product_name; ?>
</a>
</h3>
<div class="product-price vm-simple-price-display d-flex justify-content-start align-items-center mb-2<?php echo $product->prices['discountAmount'] ? ' vm-has-discount' : ''?>">
<?php
if ($show_price) {
if (!empty($product->prices['salesPrice'])) {
echo $currency->createPriceDiv ('salesPrice', '', $product->prices, FALSE, FALSE, 1.0, TRUE);
}
if ($product->prices['discountAmount']) {
echo $currency->createPriceDiv ('basePriceWithTax', '', $product->prices, FALSE, FALSE, 1.0, TRUE);
}
}
?>
</div>
<a class="btn btn-sm btn-secondary w-100" href="<?php echo $url; ?>"><?php echo vmText::_ ( 'COM_VIRTUEMART_PRODUCT_DETAILS' ); ?></a>
</div>
</div>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<?php if ($footerText) : ?>
<div class="vm-footer-text<?php echo $params->get ('moduleclass_sfx') ?>">
<?php echo $footerText ?>
</div>
<?php endif; ?>
</div>

View File

@@ -0,0 +1,55 @@
<?php
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
vmJsApi::cssSite();
?>
<form action="<?php echo Route::_('index.php?option=com_virtuemart&view=category&search=true&limitstart=0&virtuemart_category_id='.$category_id ); ?>" method="get">
<div class="<?php echo $button && $button_text == vmText::_ ('MOD_VIRTUEMART_SEARCH_GO') ? 'vmbasic-search ' : ''; ?>input-group mod-vm-search<?php echo $params->get('moduleclass_sfx') ? ' ' . $params->get('moduleclass_sfx') : ''; ?>">
<?php
$output = '<input name="keyword" id="mod_virtuemart_search" maxlength="'.$maxlength.'" placeholder="'.$text.'" class="form-control'. $moduleclass_sfx .'" type="text" size="'.$width.'" />';
$image = Uri::base() . $imagepath;
$svg = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-search" viewBox="0 0 16 16">
<path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0"/>
</svg>';
if ($button) :
if ($imagebutton && $imagepath) :
$button = '<button type="submit" class="btn ' . $moduleclass_sfx . '"><img src="' . $image . '" alt="' . $button_text . '" /></button>';
elseif ($button_text != vmText::_ ('MOD_VIRTUEMART_SEARCH_GO')) :
$button = '<button type="submit" class="btn btn-primary ' . $moduleclass_sfx . '">' . $button_text . '</button>';
else :
$button = '<button type="submit" class="btn btn-svg '.$moduleclass_sfx.'">' . $svg . '</button>';
endif;
switch ($button_pos) :
case 'right' :
$output = $output.$button;
break;
case 'left' :
$output = $button.$output;
break;
default :
$output = $output.$button;
break;
endswitch;
endif;
echo $output;
?>
</div>
<input type="hidden" name="limitstart" value="0" />
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="view" value="category" />
<input type="hidden" name="virtuemart_category_id" value="<?php echo $category_id; ?>"/>
<?php
if (!empty($set_Itemid))
{
echo '<input type="hidden" name="Itemid" value="'.$set_Itemid.'" />';
}
?>
</form>

View File

@@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@@ -0,0 +1,380 @@
<?php
/**
* @package Joomla.Site
* @subpackage Templates.Moko-Cassiopeia
*
* @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\Document\HtmlDocument $this */
$app = Factory::getApplication();
$input = $app->getInput();
$wa = $this->getWebAssetManager();
$params_ColorName = $this->params->get('colorName', 'colors_standard');
$params_GoogleTagManager = $this->params->get('googletagmanager', false);
$params_GoogleTagManagerID = $this->params->get('googletagmanagerid', null);
$params_custom_head_start = $this->params->get('custom_head_start', null);
$params_custom_head_end = $this->params->get('custom_head_end', null);
$params_leftIcon = htmlspecialchars(
$this->params->get('drawerLeftIcon', 'fa-solid fa-chevron-right'),
ENT_COMPAT, 'UTF-8'
);
$params_rightIcon = htmlspecialchars(
$this->params->get('drawerRightIcon', 'fa-solid fa-chevron-left'),
ENT_COMPAT, 'UTF-8'
);
if($params_GoogleTagManager && $params_GoogleTagManagerID) {
?>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','<?php echo $params_GoogleTagManagerID;?>');</script>
<!-- End Google Tag Manager -->
<?php
}
// Browsers support SVG favicons
$this->addHeadLink(HTMLHelper::_('image', '../media/templates/site/moko-cassiopeia/images/favicon/favicon.svg', '', [], true, 1), 'icon', 'rel', ['type' => 'image/svg+xml']);
$this->addHeadLink(HTMLHelper::_('image', '../media/templates/site/moko-cassiopeia/images/favicon/favicon.ico', '', [], true, 1), 'alternate icon', 'rel', ['type' => 'image/vnd.microsoft.icon']);
?>
<link rel="apple-touch-icon" sizes="57x57" href="../media/templates/site/moko-cassiopeia/images/favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="../media/templates/site/moko-cassiopeia/images/favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="../media/templates/site/moko-cassiopeia/images/favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="../media/templates/site/moko-cassiopeia/images/favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="../media/templates/site/moko-cassiopeia/images/favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="../media/templates/site/moko-cassiopeia/images/favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="../media/templates/site/moko-cassiopeia/images/favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="../media/templates/site/moko-cassiopeia/images/favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="../media/templates/site/moko-cassiopeia/images/favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="../media/templates/site/moko-cassiopeia/images/favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="../media/templates/site/moko-cassiopeia/images/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="../media/templates/site/moko-cassiopeia/images/favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="../media/templates/site/moko-cassiopeia/images/favicon/favicon-16x16.png">
<link rel="manifest" href="../media/templates/site/moko-cassiopeia/images/favicon/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<?php
//add Bootsrap 5 Support
HTMLHelper::_('bootstrap.alert');
HTMLHelper::_('bootstrap.button');
HTMLHelper::_('bootstrap.carousel');
HTMLHelper::_('bootstrap.collapse');
HTMLHelper::_('bootstrap.dropdown');
HTMLHelper::_('bootstrap.modal');
HTMLHelper::_('bootstrap.offcanvas');
HTMLHelper::_('bootstrap.popover');
HTMLHelper::_('bootstrap.scrollspy');
HTMLHelper::_('bootstrap.tab');
HTMLHelper::_('bootstrap.tooltip');
HTMLHelper::_('bootstrap.toast');
// Detecting Active Variables
$option = $input->getCmd('option', '');
$view = $input->getCmd('view', '');
$layout = $input->getCmd('layout', '');
$task = $input->getCmd('task', '');
$itemid = $input->getCmd('Itemid', '');
$sitename = htmlspecialchars($app->get('sitename'), ENT_QUOTES, 'UTF-8');
$menu = $app->getMenu()->getActive();
$pageclass = $menu !== null ? $menu->getParams()->get('pageclass_sfx', '') : '';
// Template path
$templatePath = 'media/templates/site/moko-cassiopeia';
// Color Theme
$assetColorName = 'theme.' . $params_ColorName;
$wa->registerAndUseStyle($assetColorName, $templatePath . '/css/global/' . $params_ColorName . '.css');
// Use a font scheme if set in the template style options
$params_FontScheme = $this->params->get('useFontScheme', false);
$fontStyles = '';
if ($params_FontScheme) {
if (stripos($params_FontScheme, 'https://') === 0) {
$this->getPreloadManager()->preconnect('https://fonts.googleapis.com/', ['crossorigin' => 'anonymous']);
$this->getPreloadManager()->preconnect('https://fonts.gstatic.com/', ['crossorigin' => 'anonymous']);
$this->getPreloadManager()->preload($params_FontScheme, ['as' => 'style', 'crossorigin' => 'anonymous']);
$wa->registerAndUseStyle('fontscheme.current', $params_FontScheme, [], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'', 'crossorigin' => 'anonymous']);
if (preg_match_all('/family=([^?:]*):/i', $params_FontScheme, $matches) > 0) {
$fontStyles = '--moko-cassiopeia-font-family-body: "' . str_replace('+', ' ', $matches[1][0]) . '", sans-serif;
--moko-cassiopeia-font-family-headings: "' . str_replace('+', ' ', isset($matches[1][1]) ? $matches[1][1] : $matches[1][0]) . '", sans-serif;
--moko-cassiopeia-font-weight-normal: 400;
--moko-cassiopeia-font-weight-headings: 700;';
}
} else {
$wa->registerAndUseStyle('fontscheme.current', $params_FontScheme, ['version' => 'auto'], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'']);
$this->getPreloadManager()->preload($wa->getAsset('style', 'fontscheme.current')->getUri() . '?' . $this->getMediaVersion(), ['as' => 'style']);
}
}
// Enable assets
$wa->usePreset('template.MOKO-CASSIOPEIA.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'))
->useStyle('template.active.language')
->useStyle('template.user')
->useScript('template.user')
->addInlineStyle(":root {
--hue: 214;
--template-bg-light: #f0f4fb;
--template-text-dark: #495057;
--template-text-light: #ffffff;
--template-link-color: #2a69b8;
--template-special-color: #001B4C;
$fontStyles
}");
// Override 'template.active' asset to set correct ltr/rtl dependency
$wa->registerStyle('template.active', '', [], [], ['template.MOKO-CASSIOPEIA.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')]);
// Logo file or site title param
if ($this->params->get('logoFile')) {
$logo = HTMLHelper::_('image', Uri::root(false) . htmlspecialchars($this->params->get('logoFile'), ENT_QUOTES), $sitename, ['loading' => 'eager', 'decoding' => 'async'], false, 0);
} elseif ($this->params->get('siteTitle')) {
$logo = '<span title="' . $sitename . '">' . htmlspecialchars($this->params->get('siteTitle'), ENT_COMPAT, 'UTF-8') . '</span>';
} else {
$logo = HTMLHelper::_('image', 'full_logo.png', $sitename, ['class' => 'logo d-inline-block', 'loading' => 'eager', 'decoding' => 'async'], true, 0);
}
$hasClass = '';
if ($this->countModules('sidebar-left', true)) {
$hasClass .= ' has-sidebar-left';
}
if ($this->countModules('sidebar-right', true)) {
$hasClass .= ' has-sidebar-right';
}
if ($this->countModules('drawer-left', true)) { $hasClass .= ' has-drawer-left'; }
if ($this->countModules('drawer-right', true)) { $hasClass .= ' has-drawer-right'; }
// Container
$wrapper = $this->params->get('fluidContainer') ? 'wrapper-fluid' : 'wrapper-static';
$this->setMetaData('viewport', 'width=device-width, initial-scale=1');
$stickyHeader = $this->params->get('stickyHeader') ? 'position-sticky sticky-top' : '';
if($this->params->get('fA6KitCode')){
//build unique kit embed code
$fa6Kit="https://kit.fontawesome.com/".$this->params->get('fA6KitCode').".js";
//adding FontAwesome V6 Kit Code
JHtml::_('script', $fa6Kit, array('crossorigin' => 'anonymous'));
} else {
// Defer fontawesome for increased performance. Once the page is loaded javascript changes it to a stylesheet.
$wa->getAsset('style', 'fontawesome')->setAttribute('rel', 'lazy-stylesheet');
}
?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<?php if (trim($params_custom_head_start)) : ?>
<?php echo $params_custom_head_start; ?>
<?php endif; ?>
<jdoc:include type="head" />
<?php if (trim($params_custom_head_end)) : ?>
<?php echo $params_custom_head_end; ?>
<?php endif; ?>
</head>
<body class="site <?php echo $option
. ' ' . $wrapper
. ' view-' . $view
. ($layout ? ' layout-' . $layout : ' no-layout')
. ($task ? ' task-' . $task : ' no-task')
. ($itemid ? ' itemid-' . $itemid : '')
. ($pageclass ? ' ' . $pageclass : '')
. $hasClass
. ($this->direction == 'rtl' ? ' rtl' : '');
?>">
<?php if($params_GoogleTagManager && $params_GoogleTagManagerID) { ?>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=<?php echo $params_GoogleTagManagerID;?>"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<?php } ?>
<header class="header container-header full-width<?php echo $stickyHeader ? ' ' . $stickyHeader : ''; ?>">
<?php if ($this->countModules('topbar')) : ?>
<div class="container-topbar">
<jdoc:include type="modules" name="topbar" style="none" />
</div>
<?php endif; ?>
<div class="header-top">
<?php if ($this->countModules('below-top')) : ?>
<div class="grid-child container-below-top">
<jdoc:include type="modules" name="below-top" style="none" />
</div>
<?php endif; ?>
<?php if ($this->params->get('brand', 1)) : ?>
<div class="grid-child">
<div class="navbar-brand">
<a class="brand-logo" href="<?php echo $this->baseurl; ?>/">
<?php echo $logo; ?>
</a>
<?php if ($this->params->get('siteDescription')) : ?>
<div class="site-description"><?php echo htmlspecialchars($this->params->get('siteDescription')); ?></div>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<?php if ($this->countModules('below-logo')) : ?>
<div class="grid container-below-logo">
<jdoc:include type="modules" name="below-logo" style="none" />
</div>
<?php endif; ?>
</div>
<!-- Drawer Toggle Buttons -->
<?php if ($this->countModules('drawer-left')) : ?>
<button class="drawer-toggle-left btn btn-outline-secondary me-2"
type="button"
data-bs-toggle="offcanvas"
data-bs-target="#drawer-left"
aria-controls="drawer-left">
<span class="<?php echo $params_leftIcon; ?>"></span>
</button>
<?php endif; ?>
<?php if ($this->countModules('drawer-right')) : ?>
<button class="drawer-toggle-right btn btn-outline-secondary"
type="button"
data-bs-toggle="offcanvas"
data-bs-target="#drawer-right"
aria-controls="drawer-right">
<span class="<?php echo $params_rightIcon; ?>"></span>
</button>
<?php endif; ?>
<?php if ($this->countModules('menu', true) || $this->countModules('search', true)) : ?>
<div class="grid-child container-nav">
<?php if ($this->countModules('menu', true)) : ?>
<jdoc:include type="modules" name="menu" style="none" />
<?php endif; ?>
<?php if ($this->countModules('search', true)) : ?>
<div class="container-search">
<jdoc:include type="modules" name="search" style="none" />
</div>
<?php endif; ?>
</div>
<?php endif; ?>
</header>
<div class="site-grid">
<?php if ($this->countModules('banner', true)) : ?>
<div class="container-banner full-width">
<jdoc:include type="modules" name="banner" style="none" />
</div>
<?php endif; ?>
<?php if ($this->countModules('top-a', true)) : ?>
<div class="grid-child container-top-a">
<jdoc:include type="modules" name="top-a" style="card" />
</div>
<?php endif; ?>
<?php if ($this->countModules('top-b', true)) : ?>
<div class="grid-child container-top-b">
<jdoc:include type="modules" name="top-b" style="card" />
</div>
<?php endif; ?>
<?php if ($this->countModules('sidebar-left', true)) : ?>
<div class="grid-child container-sidebar-left">
<jdoc:include type="modules" name="sidebar-left" style="card" />
</div>
<?php endif; ?>
<div class="grid-child container-component">
<jdoc:include type="modules" name="breadcrumbs" style="none" />
<jdoc:include type="modules" name="main-top" style="card" />
<jdoc:include type="message" />
<main>
<jdoc:include type="component" />
</main>
<jdoc:include type="modules" name="main-bottom" style="card" />
</div>
<?php if ($this->countModules('sidebar-right', true)) : ?>
<div class="grid-child container-sidebar-right">
<jdoc:include type="modules" name="sidebar-right" style="card" />
</div>
<?php endif; ?>
<?php if ($this->countModules('bottom-a', true)) : ?>
<div class="grid-child container-bottom-a">
<jdoc:include type="modules" name="bottom-a" style="card" />
</div>
<?php endif; ?>
<?php if ($this->countModules('bottom-b', true)) : ?>
<div class="grid-child container-bottom-b">
<jdoc:include type="modules" name="bottom-b" style="card" />
</div>
<?php endif; ?>
</div>
<footer class="container-footer footer full-width">
<?php if ($this->countModules('footer-menu', true)) : ?>
<div class="grid-child footer-menu">
<jdoc:include type="modules" name="footer-menu" />
</div>
<?php endif; ?>
<?php if ($this->countModules('footer', true)) : ?>
<div class="grid-child">
<jdoc:include type="modules" name="footer" style="none" />
</div>
<?php endif; ?>
</footer>
<?php if ($this->params->get('backTop') == 1) : ?>
<a href="#top" id="back-top" class="back-to-top-link" aria-label="<?php echo Text::_('TPL_MOKO-CASSIOPEIA_BACKTOTOP'); ?>">
<span class="icon-arrow-up icon-fw" aria-hidden="true"></span>
</a>
<?php endif; ?>
<?php if ($this->countModules('drawer-left', true)) : ?>
<!-- Left Offcanvas Drawer -->
<aside class="offcanvas offcanvas-start" tabindex="-1" id="drawer-left">
<div class="offcanvas-header">
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="<?php echo Text::_('JLIB_HTML_BEHAVIOR_CLOSE'); ?>"></button>
</div>
<div class="offcanvas-body">
<jdoc:include type="modules" name="drawer-left" style="none" />
</div>
</aside>
<?php endif; ?>
<?php if ($this->countModules('drawer-right', true)) : ?>
<!-- Right Offcanvas Drawer -->
<aside class="offcanvas offcanvas-end" tabindex="-1" id="drawer-right">
<div class="offcanvas-header">
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="<?php echo Text::_('JLIB_HTML_BEHAVIOR_CLOSE'); ?>"></button>
</div>
<div class="offcanvas-body">
<jdoc:include type="modules" name="drawer-right" style="none" />
</div>
</aside>
<?php endif; ?>
<jdoc:include type="modules" name="debug" style="none" />
</body>
</html>

View File

@@ -0,0 +1,110 @@
{
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
"name": "moko-cassiopeia",
"version": "4.0.0",
"description": "This file contains details of the assets used by moko-cassiopeia, the default Joomla 4 site template.",
"license": "GPL-2.0-or-later",
"assets": [
{
"name": "template.MOKO-CASSIOPEIA.ltr",
"description": "The css file to be used when the site is left to right (LTR).",
"type": "style",
"uri": "template.min.css",
"dependencies": [
"fontawesome"
]
},
{
"name": "template.MOKO-CASSIOPEIA.rtl",
"description": "The css file to be used when the site is right to left (RTL).",
"type": "style",
"uri": "template-rtl.min.css",
"dependencies": [
"fontawesome"
]
},
{
"name": "template.offline",
"description": "The css file to be used when the site is offline and offline.php is being used.",
"type": "style",
"uri": "offline.css"
},
{
"name": "template.active.language",
"description": "An asset to allow language specific css, eg 'language/[lang-CODE]/[lang-CODE].css', to use it as a dependency to the active template",
"type": "style",
"uri": "",
"class": "LangActiveAssetItem",
"dependencies": [
"template.active"
]
},
{
"name": "template.user",
"description": "A file where a user can add their own css.",
"type": "style",
"uri": "user.css",
"weight": 500,
"dependencies": [
"template.active",
"template.active.language"
]
},
{
"name": "template.MOKO-CASSIOPEIA",
"description": "The file containing the javascript for this template.",
"type": "script",
"uri": "template.js",
"attributes" : {
"defer": true
},
"dependencies": [
"core"
]
},
{
"name": "template.active",
"description": "A dummy asset to allow extensions to use it as a dependency to the active template.",
"type": "script",
"uri": "",
"dependencies": [
"template.MOKO-CASSIOPEIA"
]
},
{
"name": "template.user",
"description": "The name of a file where a user can add their own javascript",
"type": "script",
"uri": "user.js",
"dependencies": [
"template.active"
]
},
{
"name": "template.MOKO-CASSIOPEIA.ltr",
"type": "preset",
"dependencies": [
"template.MOKO-CASSIOPEIA.ltr#style",
"template.MOKO-CASSIOPEIA#script"
]
},
{
"name": "template.MOKO-CASSIOPEIA.rtl",
"type": "preset",
"dependencies": [
"template.MOKO-CASSIOPEIA.rtl#style",
"template.MOKO-CASSIOPEIA#script"
]
},
{
"name": "searchtools",
"type": "style",
"uri": "system/searchtools/searchtools.min.css"
},
{
"name": "fontawesome",
"type": "style",
"uri": "system/joomla-fontawesome.min.css"
}
]
}

View File

@@ -0,0 +1,257 @@
<?php
/**
* @package Joomla.Site
* @subpackage Templates.Moko-Cassiopeia
*
* @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\AuthenticationHelper;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\Document\HtmlDocument $this */
$extraButtons = AuthenticationHelper::getLoginButtons('form-login');
$app = Factory::getApplication();
$wa = $this->getWebAssetManager();
if ($this->params->get('offlineEmbed')) {
$fullWidth = 1;
} else {
$fullWidth = 0;
}
// Template path
$templatePath = 'media/templates/site/moko-cassiopeia';
// Color Theme
$paramsColorName = $this->params->get('colorName', 'colors_standard');
$assetColorName = 'theme.' . $paramsColorName;
$wa->registerAndUseStyle($assetColorName, $templatePath . '/css/global/' . $paramsColorName . '.css');
// Use a font scheme if set in the template style options
$paramsFontScheme = $this->params->get('useFontScheme', false);
$fontStyles = '';
if ($paramsFontScheme) {
if (stripos($paramsFontScheme, 'https://') === 0) {
$this->getPreloadManager()->preconnect('https://fonts.googleapis.com/', ['crossorigin' => 'anonymous']);
$this->getPreloadManager()->preconnect('https://fonts.gstatic.com/', ['crossorigin' => 'anonymous']);
$this->getPreloadManager()->preload($paramsFontScheme, ['as' => 'style', 'crossorigin' => 'anonymous']);
$wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, [], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'', 'crossorigin' => 'anonymous']);
if (preg_match_all('/family=([^?:]*):/i', $paramsFontScheme, $matches) > 0) {
$fontStyles = '--moko-cassiopeia-font-family-body: "' . str_replace('+', ' ', $matches[1][0]) . '", sans-serif;
--moko-cassiopeia-font-family-headings: "' . str_replace('+', ' ', isset($matches[1][1]) ? $matches[1][1] : $matches[1][0]) . '", sans-serif;
--moko-cassiopeia-font-weight-normal: 400;
--moko-cassiopeia-font-weight-headings: 700;';
}
} else {
$wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, ['version' => 'auto'], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'']);
$this->getPreloadManager()->preload($wa->getAsset('style', 'fontscheme.current')->getUri() . '?' . $this->getMediaVersion(), ['as' => 'style']);
}
}
// Enable assets
$wa->usePreset('template.MOKO-CASSIOPEIA.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'))
->useStyle('template.active.language')
->useStyle('template.offline')
->useStyle('template.user')
->useScript('template.user')
->addInlineStyle(":root {
--hue: 214;
--template-bg-light: #f0f4fb;
--template-text-dark: #495057;
--template-text-light: #ffffff;
--template-link-color: #2a69b8;
--template-special-color: #001B4C;
$fontStyles
}");
// Override 'template.active' asset to set correct ltr/rtl dependency
$wa->registerStyle('template.active', '', [], [], ['template.MOKO-CASSIOPEIA.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr')]);
$this->addStyleSheet('//cdn-images.mailchimp.com/embedcode/classic-061523.css');
// Logo file or site title param
$sitename = htmlspecialchars($app->get('sitename'), ENT_QUOTES, 'UTF-8');
// Browsers support SVG favicons
$this->addHeadLink(HTMLHelper::_('image', 'favicon.svg', '', [], true, 1), 'icon', 'rel', ['type' => 'image/svg+xml']);
$this->addHeadLink(HTMLHelper::_('image', 'favicon.ico', '', [], true, 1), 'alternate icon', 'rel', ['type' => 'image/vnd.microsoft.icon']);
$this->addHeadLink(HTMLHelper::_('image', 'favicon.svg', '', [], true, 1), 'mask-icon', 'rel', ['color' => '#fff']);
//add Bootsrap 5 Support
HTMLHelper::_('bootstrap.alert');
HTMLHelper::_('bootstrap.button');
HTMLHelper::_('bootstrap.carousel');
HTMLHelper::_('bootstrap.collapse');
HTMLHelper::_('bootstrap.dropdown');
HTMLHelper::_('bootstrap.modal');
HTMLHelper::_('bootstrap.offcanvas');
HTMLHelper::_('bootstrap.popover');
HTMLHelper::_('bootstrap.scrollspy');
HTMLHelper::_('bootstrap.tab');
HTMLHelper::_('bootstrap.tooltip');
HTMLHelper::_('bootstrap.toast');
if ($this->params->get('logoFile')) {
$logo = HTMLHelper::_('image', Uri::root(false) . htmlspecialchars($this->params->get('logoFile'), ENT_QUOTES), $sitename, ['class' => 'logo d-inline-block', 'loading' => 'eager', 'decoding' => 'async'], false, 0);
} elseif ($this->params->get('siteTitle')) {
$logo = '<span title="' . $sitename . '">' . htmlspecialchars($this->params->get('siteTitle'), ENT_COMPAT, 'UTF-8') . '</span>';
} else {
$logo = HTMLHelper::_('image', 'logo.svg', $sitename, ['class' => 'logo d-inline-block', 'loading' => 'eager', 'decoding' => 'async'], true, 0);
}
if($this->params->get('fA6KitCode')){
//build unique kit embed code
$fa6Kit="https://kit.fontawesome.com/".$this->params->get('fA6KitCode').".js";
//adding FontAwesome V6 Kit Code
JHtml::_('script', $fa6Kit, array('crossorigin' => 'anonymous'));
} else {
// Defer fontawesome for increased performance. Once the page is loaded javascript changes it to a stylesheet.
$wa->getAsset('style', 'fontawesome')->setAttribute('rel', 'lazy-stylesheet');
}
if ($app->get('offline_image')){
//echo HTMLHelper::_('image', $app->get('offline_image'), $sitename, ['class' => 'offline-image'], false, 0);
$backgroundstyle='
body {
background-image: url('.$app->get('offline_image').');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}';
$this->addStyleDeclaration($backgroundstyle);
}
?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<jdoc:include type="metas" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<jdoc:include type="styles" />
<jdoc:include type="scripts" />
</head>
<body class="site">
<div class="outer">
<div class="offline-card">
<div class="header">
<?php if (!empty($logo)) : ?>
<h1><?php echo $logo; ?></h1>
<?php else : ?>
<h1><?php echo $sitename; ?></h1>
<?php endif; ?>
<?php if ($this->countModules('offline-header')) : ?>
<jdoc:include type="modules" name="offline-header" style="none" />
<?php endif; ?></div><div class="offline-message">
<?php if ($app->get('display_offline_message', 1) == 1 && str_replace(' ', '', $app->get('offline_message')) != '') : ?>
<p><?php echo $app->get('offline_message'); ?></p>
<?php elseif ($app->get('display_offline_message', 1) == 2) : ?>
<p><?php echo Text::_('JOFFLINE_MESSAGE'); ?></p>
<?php endif; ?></div>
<?php if ($this->countModules('offline')) : ?>
<jdoc:include type="modules" name="offline" style="none" />
<?php endif; ?></div>
</div>
<a id="offline-login-link" data-bs-toggle="collapse" href="#collapseLogin" role="button" aria-expanded="false" aria-controls="collapseLogin">
<div class="logo-icon">
<svg version="1.1" xmlns="https://www.w3.org/2000/svg" x="0px" y="0px"
viewBox="0 0 74.8 74.8" enable-background="new 0 0 74.8 74.8" xml:space="preserve">
<title>Login Override</title>
<g id="brandmark">
<path id="j-green" fill="#1C3D5C" d="M13.5,37.7L12,36.3c-4.5-4.5-5.8-10.8-4.2-16.5c-4.5-1-7.8-5-7.8-9.8c0-5.5,4.5-10,10-10 c5,0,9.1,3.6,9.9,8.4c5.4-1.3,11.3,0.2,15.5,4.4l0.6,0.6l-7.4,7.4l-0.6-0.6c-2.4-2.4-6.3-2.4-8.7,0c-2.4,2.4-2.4,6.3,0,8.7l1.4,1.4 l7.4,7.4l7.8,7.8l-7.4,7.4l-7.8-7.8L13.5,37.7L13.5,37.7z"/>
<path id="j-orange" fill="#1C3D5C" d="M21.8,29.5l7.8-7.8l7.4-7.4l1.4-1.4C42.9,8.4,49.2,7,54.8,8.6C55.5,3.8,59.7,0,64.8,0 c5.5,0,10,4.5,10,10c0,5.1-3.8,9.3-8.7,9.9c1.6,5.6,0.2,11.9-4.2,16.3l-0.6,0.6l-7.4-7.4l0.6-0.6c2.4-2.4,2.4-6.3,0-8.7 c-2.4-2.4-6.3-2.4-8.7,0l-1.4,1.4L37,29l-7.8,7.8L21.8,29.5L21.8,29.5z"/>
<path id="j-red" fill="#1C3D5C" d="M55,66.8c-5.7,1.7-12.1,0.4-16.6-4.1l-0.6-0.6l7.4-7.4l0.6,0.6c2.4,2.4,6.3,2.4,8.7,0 c2.4-2.4,2.4-6.3,0-8.7L53,45.1l-7.4-7.4l-7.8-7.8l7.4-7.4l7.8,7.8l7.4,7.4l1.5,1.5c4.2,4.2,5.7,10.2,4.4,15.7 c4.9,0.7,8.6,4.9,8.6,9.9c0,5.5-4.5,10-10,10C60,74.8,56,71.3,55,66.8L55,66.8z"/>
<path id="j-blue" fill="#1C3D5C" d="M52.2,46l-7.8,7.8L37,61.2l-1.4,1.4c-4.3,4.3-10.3,5.7-15.7,4.4c-1,4.5-5,7.8-9.8,7.8 c-5.5,0-10-4.5-10-10C0,60,3.3,56.1,7.7,55C6.3,49.5,7.8,43.5,12,39.2l0.6-0.6L20,46l-0.6,0.6c-2.4,2.4-2.4,6.3,0,8.7 c2.4,2.4,6.3,2.4,8.7,0l1.4-1.4l7.4-7.4l7.8-7.8L52.2,46L52.2,46z"/>
</g>
</svg>
</div></a>
<div class="collapse" id="collapseLogin">
<div class="login">
<jdoc:include type="message" />
<form action="<?php echo Route::_('index.php', true); ?>" method="post" id="form-login">
<fieldset>
<label for="username"><?php echo Text::_('JGLOBAL_USERNAME'); ?></label>
<input name="username" class="form-control" id="username" type="text">
<label for="password"><?php echo Text::_('JGLOBAL_PASSWORD'); ?></label>
<input name="password" class="form-control" id="password" type="password">
<?php foreach ($extraButtons as $button) :
$dataAttributeKeys = array_filter(array_keys($button), function ($key) {
return substr($key, 0, 5) == 'data-';
});
?>
<div class="mod-login__submit form-group">
<button type="button"
class="btn btn-secondary w-100 mt-4 <?php echo $button['class'] ?? '' ?>"
<?php foreach ($dataAttributeKeys as $key) : ?>
<?php echo $key ?>="<?php echo $button[$key] ?>"
<?php endforeach; ?>
<?php if ($button['onclick']) : ?>
onclick="<?php echo $button['onclick'] ?>"
<?php endif; ?>
title="<?php echo Text::_($button['label']) ?>"
id="<?php echo $button['id'] ?>"
>
<?php if (!empty($button['icon'])) : ?>
<span class="<?php echo $button['icon'] ?>"></span>
<?php elseif (!empty($button['image'])) : ?>
<?php echo $button['image']; ?>
<?php elseif (!empty($button['svg'])) : ?>
<?php echo $button['svg']; ?>
<?php endif; ?>
<?php echo Text::_($button['label']) ?>
</button>
</div>
<?php endforeach; ?>
<button type="submit" name="Submit" class="btn btn-primary"><?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 base64_encode(Uri::base()); ?>">
<?php echo HTMLHelper::_('form.token'); ?>
</fieldset>
</form>
</div>
</div></div>
<?php if ($this->countModules('offline-footer')) : ?>
<jdoc:include type="modules" name="offline-footer" style="none" />
<?php endif; ?>
<footer class="container-footer footer full-width">
<?php if ($this->countModules('footer-menu', true)) : ?>
<div class="grid-child footer-menu">
<jdoc:include type="modules" name="footer-menu" />
</div>
<?php endif; ?>
<?php if ($this->countModules('footer')) : ?>
<jdoc:include type="modules" name="footer" style="none" />
<?php endif; ?>
</footer>
</div>
</div>
<?php if ($this->params->get('backTop') == 1) : ?>
<a href="#top" id="back-top" class="back-to-top-link" aria-label="<?php echo Text::_('TPL_MOKO-CASSIOPEIA_BACKTOTOP'); ?>">
<span class="icon-arrow-up icon-fw" aria-hidden="true"></span>
</a>
<?php endif; ?>
<jdoc:include type="modules" name="debug" style="none" />
</body>
</html>

View File

@@ -0,0 +1,251 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="template" client="site" method="upgrade">
<name>moko-cassiopeia</name>
<version>1.0</version>
<creationDate>2023-05</creationDate>
<author>Jonathan Miller || Moko Consulting</author>
<authorEmail>jmiller@mokoconsulting.tech</authorEmail>
<copyright>(C)GNU General Public License Version 2 - 2023 Meae Wellness, Inc.</copyright>
<description>TPL_MOKO-CASSIOPEIA_XML_DESCRIPTION</description>
<inheritable>1</inheritable>
<files>
<filename>component.php</filename>
<filename>error.php</filename>
<filename>index.php</filename>
<filename>joomla.asset.json</filename>
<filename>offline.php</filename>
<filename>templateDetails.xml</filename>
<folder>html</folder>
</files>
<media destination="templates/site/moko-cassiopeia" folder="media">
<folder>js</folder>
<folder>css</folder>
<folder>images</folder>
<folder>fonts</folder>
</media>
<positions>
<position>topbar</position>
<position>below-top</position>
<position>below-logo</position>
<position>menu</position>
<position>search</position>
<position>banner</position>
<position>top-a</position>
<position>top-b</position>
<position>main-top</position>
<position>main-bottom</position>
<position>breadcrumbs</position>
<position>sidebar-left</position>
<position>sidebar-right</position>
<position>bottom-a</position>
<position>bottom-b</position>
<position>footer-menu</position>
<position>footer</position>
<position>debug</position>
<position>offline-header</position>
<position>offline</position>
<position>offline-footer</position>
<position>drawer-left</position>
<position>drawer-right</position>
</positions>
<languages folder="language">
<language tag="en-GB">en-GB/tpl_moko-cassiopeia.ini</language>
<language tag="en-GB">en-GB/tpl_moko-cassiopeia.sys.ini</language>
<language tag="en-US">en-US/tpl_moko-cassiopeia.ini</language>
<language tag="en-US">en-US/tpl_moko-cassiopeia.sys.ini</language>
</languages>
<config>
<fields name="params">
<fieldset name="advanced">
<field
name="brand"
type="radio"
label="TPL_MOKO-CASSIOPEIA_BRAND_LABEL"
default="1"
layout="joomla.form.field.radio.switcher"
filter="boolean"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="logoFile"
type="media"
default="media/templates/site/moko-cassiopeia/images/logo.svg"
label="TPL_MOKO-CASSIOPEIA_LOGO_LABEL"
showon="brand:1"
/>
<field
name="siteTitle"
type="text"
default=""
label="TPL_MOKO-CASSIOPEIA_TITLE"
filter="string"
showon="brand:1"
/>
<field
name="siteDescription"
type="text"
default=""
label="TPL_MOKO-CASSIOPEIA_TAGLINE_LABEL"
description="TPL_MOKO-CASSIOPEIA_TAGLINE_DESC"
filter="string"
showon="brand:1"
/>
<field
name="fA6KitCode"
type="text"
default=""
label="TPL_MOKO-CASSIOPEIA_FA6KITCODE_LABEL"
description="TPL_MOKO-CASSIOPEIA_FA6KITCODE_DESC"
filter="string"
/>
<field
name="offlineEmbed"
type="text"
default=""
label="TPL_MOKO-CASSIOPEIA_OFFLINEEMBED_LABEL"
description="TPL_MOKO-CASSIOPEIA_OFFLINEEMBED_DESC"
filter="raw"
/>
<field
name="useFontScheme"
type="groupedlist"
label="TPL_MOKO-CASSIOPEIA_FONT_LABEL"
default="0"
>
<option value="0">JNONE</option>
<group label="TPL_MOKO-CASSIOPEIA_FONT_GROUP_LOCAL">
<option value="media/templates/site/moko-cassiopeia/css/global/fonts-local_roboto.css">Roboto (local)</option>
</group>
<group label="TPL_MOKO-CASSIOPEIA_FONT_GROUP_WEB">
<option value="https://fonts.googleapis.com/css2?family=Fira+Sans:wght@100;300;400;700&amp;display=swap">Fira Sans (web)</option>
<option value="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@100;300;400;700&amp;family=Roboto:wght@100;300;400;700&amp;display=swap">Roboto + Noto Sans (web)</option>
</group>
</field>
<field
name="noteFontScheme"
type="note"
description="TPL_MOKO-CASSIOPEIA_FONT_NOTE_TEXT"
class="alert alert-warning"
/>
<field
name="colorName"
type="filelist"
label="TPL_MOKO-CASSIOPEIA_COLOR_NAME_LABEL"
default="colors_standard"
fileFilter="^custom.+[^min]\.css$"
exclude="^colors.+"
stripext="true"
hide_none="true"
hide_default="true"
directory="media/templates/site/moko-cassiopeia/css/global/"
validate="options"
>
<option value="colors_standard">TPL_MOKO-CASSIOPEIA_COLOR_NAME_STANDARD</option>
<option value="colors_alternative">TPL_MOKO-CASSIOPEIA_COLOR_NAME_ALTERNATIVE</option>
<option value="colors_meaewellness">TPL_MOKO-CASSIOPEIA_COLOR_NAME_MEAEWELLNESS</option>
<option value="colors_sra">TPL_MOKO-CASSIOPEIA_COLOR_NAME_SRA</option>
</field>
<field
name="fluidContainer"
type="radio"
layout="joomla.form.field.radio.switcher"
default="0"
label="TPL_MOKO-CASSIOPEIA_FLUID_LABEL"
>
<option value="0">TPL_MOKO-CASSIOPEIA_STATIC</option>
<option value="1">TPL_MOKO-CASSIOPEIA_FLUID</option>
</field>
<field
name="stickyHeader"
type="radio"
label="TPL_MOKO-CASSIOPEIA_STICKY_LABEL"
layout="joomla.form.field.radio.switcher"
default="0"
filter="integer"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="backTop"
type="radio"
label="TPL_MOKO-CASSIOPEIA_BACKTOTOP_LABEL"
layout="joomla.form.field.radio.switcher"
default="0"
filter="integer"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
</fieldset>
<fieldset name="google">
<field
name="googletagmanager"
type="radio"
label="TPL_MOKO-CASSIOPEIA_GOOGLETAGMANAGER_LABEL"
description="TPL_MOKO-CASSIOPEIA_GOOGLETAGMANAGER_DESC"
layout="joomla.form.field.radio.switcher"
filter="boolean"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="googletagmanagerid"
type="text"
default=""
label="TPL_MOKO-CASSIOPEIA_GOOGLETAGMANAGERID_LABEL"
description="TPL_MOKO-CASSIOPEIA_GOOGLETAGMANAGERID_DESC"
filter="string"
showon="googletagmanager:1"
/>
</fieldset>
<fieldset name="custom_head">
<field
name="custom_head_start"
type="textarea"
default=""
label="TPL_MOKO-CASSIOPEIA_CUSTOM_HEAD_START_LABEL"
description="TPL_MOKO-CASSIOPEIA_CUSTOM_HEAD_START_DESC"
filter="raw"/>
<field
name="custom_head_end"
type="textarea"
default=""
label="TPL_MOKO-CASSIOPEIA_CUSTOM_HEAD_END_LABEL"
description="TPL_MOKO-CASSIOPEIA_CUSTOM_HEAD_END_DESC"
filter="raw"/>
</fieldset>
<fieldset name="drawers">
<field
name="drawerLeftIcon"
type="text"
default="fa-solid fa-chevron-right"
label="TPL_MOKO_CASSIOPEIA_DRAWER_LEFT_ICON_LABEL"
description="TPL_MOKO_CASSIOPEIA_DRAWER_LEFT_ICON_DESC"
filter="string"
/>
<field
name="drawerRightIcon"
type="text"
default="fa-solid fa-chevron-left"
label="TPL_MOKO_CASSIOPEIA_DRAWER_RIGHT_ICON_LABEL"
description="TPL_MOKO_CASSIOPEIA_DRAWER_RIGHT_ICON_DESC"
filter="string"
/>
</fieldset>
</fields>
</config>
</extension>