Skip to content

Commit

Permalink
Merge branch 'kawshar' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ahamed committed Aug 27, 2021
2 parents 1914f21 + 65819a7 commit a7a4ee6
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
<?php endforeach; ?>
<li class="pagination-next<?php echo $nextDisabled; ?> page-item"><?php echo $list['next']['data']; ?></li>
<li class="pagination-end<?php echo $endDisabled; ?> page-item"><?php echo $list['end']['data']; ?></li>
</ul>
</ul>
34 changes: 34 additions & 0 deletions plugins/system/helixultimate/overrides/modules.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
/**
* @package Helix Ultimate Framework
* @author JoomShaper https://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2021 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
*/

defined ('_JEXEC') or die();

function modChrome_sp_xhtml($module, $params, $attribs)
{

$moduleTag = htmlspecialchars($params->get('module_tag', 'div'), ENT_QUOTES, 'UTF-8');
$bootstrapSize = (int) $params->get('bootstrap_size', 0);
$moduleClass = $bootstrapSize !== 0 ? ' span' . $bootstrapSize : '';
$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_QUOTES, 'UTF-8');
$headerClass = htmlspecialchars($params->get('header_class', 'sp-module-title'), ENT_COMPAT, 'UTF-8');

if ($module->content)
{
echo '<' . $moduleTag . ' class="sp-module ' . htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8') . $moduleClass . '">';

if ($module->showtitle)
{
echo '<' . $headerTag . ' class="' . $headerClass . '">' . $module->title . '</' . $headerTag . '>';
}

echo '<div class="sp-module-content">';
echo $module->content;
echo '</div>';
echo '</' . $moduleTag . '>';
}
}
47 changes: 47 additions & 0 deletions plugins/system/helixultimate/overrides/pagination.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php
/**
* @package Helix Ultimate Framework
* @author JoomShaper https://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2021 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
*/

defined ('_JEXEC') or die();

function pagination_list_render($list)
{
// Initialize variables
$html = '<ul class="pagination ms-0 mb-4">';

if ($list['start']['active']==1) $html .= $list['start']['data'];
if ($list['previous']['active']==1) $html .= $list['previous']['data'];

foreach ($list['pages'] as $page) {
$html .= $page['data'];
}
if ($list['next']['active']==1) $html .= $list['next']['data'];
if ($list['end']['active']==1) $html .= $list['end']['data'];

$html .= '</ul>';
return $html;
}

function pagination_item_active(&$item)
{

$cls = '';

if ($item->text == JText::_('Next')) { $item->text = '&raquo;'; $cls = "next";}
if ($item->text == JText::_('Prev')) { $item->text = '&laquo;'; $cls = "previous";}

if ($item->text == JText::_('First')) { $cls = "first";}
if ($item->text == JText::_('Last')) { $cls = "last";}

return '<li class="page-item"><a class="page-link ' . $cls . '" href="' . $item->link . '" title="' . $item->text . '">' . $item->text . '</a></li>';
}

function pagination_item_inactive( &$item )
{
$cls = (int)$item->text > 0 ? 'active': 'disabled';
return '<li class="page-item ' . $cls . '"><a class="page-link">' . $item->text . '</a></li>';
}
25 changes: 1 addition & 24 deletions templates/shaper_helixultimate/html/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,4 @@

defined ('_JEXEC') or die();

function modChrome_sp_xhtml($module, $params, $attribs)
{

$moduleTag = htmlspecialchars($params->get('module_tag', 'div'), ENT_QUOTES, 'UTF-8');
$bootstrapSize = (int) $params->get('bootstrap_size', 0);
$moduleClass = $bootstrapSize !== 0 ? ' span' . $bootstrapSize : '';
$headerTag = htmlspecialchars($params->get('header_tag', 'h3'), ENT_QUOTES, 'UTF-8');
$headerClass = htmlspecialchars($params->get('header_class', 'sp-module-title'), ENT_COMPAT, 'UTF-8');

if ($module->content)
{
echo '<' . $moduleTag . ' class="sp-module ' . htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8') . $moduleClass . '">';

if ($module->showtitle)
{
echo '<' . $headerTag . ' class="' . $headerClass . '">' . $module->title . '</' . $headerTag . '>';
}

echo '<div class="sp-module-content">';
echo $module->content;
echo '</div>';
echo '</' . $moduleTag . '>';
}
}
require HelixUltimate\Framework\Platform\HTMLOverride::loadTemplate();
38 changes: 1 addition & 37 deletions templates/shaper_helixultimate/html/pagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,4 @@

defined ('_JEXEC') or die();

function pagination_list_render($list)
{
// Initialize variables
$html = '<ul class="pagination">';

if ($list['start']['active']==1) $html .= $list['start']['data'];
if ($list['previous']['active']==1) $html .= $list['previous']['data'];

foreach ($list['pages'] as $page) {
$html .= $page['data'];
}
if ($list['next']['active']==1) $html .= $list['next']['data'];
if ($list['end']['active']==1) $html .= $list['end']['data'];

$html .= '</ul>';
return $html;
}

function pagination_item_active(&$item)
{

$cls = '';

if ($item->text == JText::_('Next')) { $item->text = '&raquo;'; $cls = "next";}
if ($item->text == JText::_('Prev')) { $item->text = '&laquo;'; $cls = "previous";}

if ($item->text == JText::_('First')) { $cls = "first";}
if ($item->text == JText::_('Last')) { $cls = "last";}

return '<li class="page-item"><a class="page-link ' . $cls . '" href="' . $item->link . '" title="' . $item->text . '">' . $item->text . '</a></li>';
}

function pagination_item_inactive( &$item )
{
$cls = (int)$item->text > 0 ? 'active': 'disabled';
return '<li class="page-item ' . $cls . '"><a class="page-link">' . $item->text . '</a></li>';
}
require HelixUltimate\Framework\Platform\HTMLOverride::loadTemplate();

0 comments on commit a7a4ee6

Please sign in to comment.