Skip to content

Commit

Permalink
Add compatible language phases for Joomla 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhlh committed May 22, 2014
1 parent d3d910f commit fd01ea4
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,23 +172,7 @@
<?php if ($this->params->get('list_show_hits', 1)) : ?>
<td headers="categorylist_header_hits" class="list-hits">
<span class="badge badge-info">
<?php
if (version_compare(JVERSION, '3.0', 'ge'))
{
echo JText::sprintf('JGLOBAL_HITS_COUNT', $article->hits);

}
else if (version_compare(JVERSION, '2.5', 'ge'))
{
echo JText::sprintf('JAGLOBAL_HITS_COUNT', $article->hits);

}
else
{
echo JText::sprintf('JAGLOBAL_HITS_COUNT', $article->hits);

}
?>
<?php echo JText::sprintf('JGLOBAL_HITS_COUNT', $article->hits); ?>
</span>
</td>
<?php endif; ?>
Expand All @@ -213,21 +197,7 @@
<?php // Add pagination links ?>
<?php if (!empty($this->items)) : ?>
<?php
if (version_compare(JVERSION, '3.0', 'ge'))
{
$pagesTotal = $this->pagination->pagesTotal;

}
else if (version_compare(JVERSION, '2.5', 'ge'))
{
$pagesTotal = $this->pagination->get('pages.total');

}
else
{
$pagesTotal = $this->pagination->get('pages.total');

}
$pagesTotal = isset($this->pagination->pagesTotal) ? $this->pagination->pagesTotal : $pagesTotal = $this->pagination->get('pages.total');
if (($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2)) && ($pagesTotal > 1)) : ?>
<div class="pagination">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
defined('JPATH_BASE') or die;
JHtml::_('bootstrap.tooltip');

$blockPosition = $displayData['params']->get('info_block_position', 0);
$blockPosition = $displayData['params']->get('info_block_position', 2);
?>
<dl class="article-info muted">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<?php if ($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2 && $this->pagination->get('pages.total') > 1)) : ?>
<nav class="pagination">

<?php if ($this->params->def('show_pagination_results', 1)) : ?>
<?php if ($this->params->def('show_pagination_results', 1) && $this->pagination->get('pages.total') > 1) : ?>
<div class="counter">
<?php echo $this->pagination->getPagesCounter(); ?>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
defined('JPATH_BASE') or die;
JHtml::_('bootstrap.tooltip');

$blockPosition = $displayData['params']->get('info_block_position', 0);
$blockPosition = $displayData['params']->get('info_block_position', 2);
?>
<dl class="article-info muted">

Expand Down
3 changes: 3 additions & 0 deletions source/plg_system_t3/includes/core/t3.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ public static function init ($xml) {
T3::register('JLayoutHelper', T3_ADMIN_PATH . '/includes/joomla25/layout/helper.php');
T3::register('JHtmlBootstrap', T3_ADMIN_PATH . '/includes/joomla25/html/bootstrap.php');
T3::register('JHtmlString', T3_ADMIN_PATH . '/includes/joomla25/html/string.php');

// load j25 compat language
JFactory::getLanguage()->load('plg_system_t3.j25.compat', JPATH_ADMINISTRATOR);
}

// import renderer
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
JGLOBAL_HITS_COUNT="Hits: %s"
1 change: 1 addition & 0 deletions source/plg_system_t3/t3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.plg_system_t3.ini</language>
<language tag="en-GB">en-GB/en-GB.plg_system_t3.sys.ini</language>
<language tag="en-GB">en-GB/en-GB.plg_system_t3.j25.compat.ini</language>
</languages>
<config>
<fields name="params">
Expand Down

0 comments on commit fd01ea4

Please sign in to comment.