2 defined('_JEXEC') or die('Restricted access'); // no direct access
3 require_once dirname(__FILE__) . str_replace('/', DIRECTORY_SEPARATOR, '/../../../functions.php');
5 <?php $cparams =& JComponentHelper::getParams('com_media'); ?>
6 <?php echo artxPost(artxPageTitle($this), null); ?>
7 <?php if (($this->params->get('show_description_image') && $this->section->image)
8 || ($this->params->get('show_description') && $this->section->description)) : ?>
10 <?php if ($this->params->get('show_description_image') && $this->section->image) : ?>
11 <img src="<?php echo $this->baseurl . '/' . $cparams->get('image_path') . '/'. $this->section->image;?>" align="<?php echo $this->section->image_position;?>" hspace="6" alt="" />
13 <?php if ($this->params->get('show_description') && $this->section->description) : ?>
14 <?php echo $this->section->description; ?>
16 <?php echo artxPost(null, ob_get_clean()); ?>
18 <?php if ($this->params->def('num_leading_articles', 1)) : ?>
19 <table class="blog<?php echo $this->params->get('pageclass_sfx'); ?>" cellpadding="0" cellspacing="0" width="100%">
22 <?php for ($i = $this->pagination->limitstart; $i < ($this->pagination->limitstart + $this->params->get('num_leading_articles')); $i++) : ?>
23 <?php if ($i >= $this->total) : break; endif; ?>
26 $this->item =& $this->getItem($i, $this->params);
27 echo $this->loadTemplate('item');
34 <?php else : $i = $this->pagination->limitstart; endif; ?>
37 $startIntroArticles = $this->pagination->limitstart + $this->params->get('num_leading_articles');
38 $numIntroArticles = $startIntroArticles + $this->params->get('num_intro_articles', 4);
39 if (($numIntroArticles != $startIntroArticles) && ($i < $this->total)) : ?>
40 <table width="100%" cellpadding="0" cellspacing="0">
44 if ($this->params->get('multi_column_order')) : // order across, like front page
45 for ($z = 0; $z < $this->params->def('num_columns', 2); $z ++) :
46 if ($z > 0) : $divider = " column_separator"; endif; ?>
48 $rows = (int) ($this->params->get('num_intro_articles', 4) / $this->params->get('num_columns'));
49 $cols = ($this->params->get('num_intro_articles', 4) % $this->params->get('num_columns'));
52 width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%"
53 class="article_column<?php echo $divider ?>">
55 $loop = (($z < $cols)?1:0) + $rows;
57 for ($y = 0; $y < $loop; $y ++) :
58 $target = $i + ($y * $this->params->get('num_columns')) + $z;
59 if ($target < $this->total && $target < ($numIntroArticles)) :
60 $this->item =& $this->getItem($target, $this->params);
61 echo $this->loadTemplate('item');
66 $i = $i + $this->params->get('num_intro_articles', 4) ;
67 else : // otherwise, order down, same as before (default behaviour)
68 for ($z = 0; $z < $this->params->get('num_columns'); $z ++) :
69 if ($z > 0) : $divider = " column_separator"; endif; ?>
70 <td valign="top" width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%" class="article_column<?php echo $divider ?>">
71 <?php for ($y = 0; $y < ($this->params->get('num_intro_articles', 4) / $this->params->get('num_columns')); $y ++) :
72 if ($i < $this->total && $i < ($numIntroArticles)) :
73 $this->item =& $this->getItem($i, $this->params);
74 echo $this->loadTemplate('item');
84 <?php if ($this->params->def('num_links', 4) && ($i < $this->total)) : ?>
85 <?php $this->links = array_splice($this->items, $i - $this->pagination->limitstart); ?>
86 <?php if (count($this->links) > 0) : ?>
88 <?php echo $this->loadTemplate('links'); ?>
89 <?php echo artxPost(null, ob_get_clean()); ?>
92 <?php if ($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2 && $this->pagination->get('pages.total') > 1)) : ?>
95 <p><?php echo $this->pagination->getPagesLinks(); ?></p>
96 <?php if ($this->params->def('show_pagination_results', 1)) : ?>
97 <p><?php echo $this->pagination->getPagesCounter(); ?></p>
100 <?php echo artxPost(null, ob_get_clean()); ?>