Today is Tuesday 12 November 1320
article-item

I. The Districts page

Whosonline module

<?php if ($showmode == 0 || $showmode == 2) : ?>
	<?php $guest = JText::plural('MOD_WHOSONLINE_GUESTS', $count['guest']); ?>
	<?php $member = JText::plural('MOD_WHOSONLINE_MEMBERS', $count['user']); ?>
	<p><?php echo JText::sprintf('MOD_WHOSONLINE_WE_HAVE', $guest, $member); ?></p>
<?php endif; ?>

Language override

Whosonline Language Override

II. The District page

Article info block

<div class="article-info muted">
	
	<?php if ($displayData['position'] === 'above' && ($blockPosition == 0 || $blockPosition == 2)
		|| $displayData['position'] === 'below' && ($blockPosition == 1)
	) : ?>
	
	<!--<div class="article-info-term">
		<?php if ($displayData['params']->get('info_block_show_title', 1)) : ?>
		<?php echo JText::_('COM_CONTENT_ARTICLE_INFO'); ?>
		<?php endif; ?>
	</div>-->
	<?php if ($displayData['params']->get('show_publish_date')) : ?>
	<?php echo $this->sublayout('publish_date', $displayData); ?>
	<?php endif; ?>
	
	<?php if ($displayData['params']->get('show_parent_category') && !empty($displayData['item']->parent_slug)) : ?>
	<?php echo $this->sublayout('parent_category', $displayData); ?>
	<?php endif; ?>
	
	<?php if ($displayData['params']->get('show_category')) : ?>
	<?php echo $this->sublayout('category', $displayData); ?>
	<?php endif; ?>
	
	<?php if ($displayData['params']->get('show_associations')) : ?>
	<?php echo $this->sublayout('associations', $displayData); ?>
	<?php endif; ?>
	
	<?php endif; ?>
	
	<?php if ($displayData['position'] === 'above' && ($blockPosition == 0)
		|| $displayData['position'] === 'below' && ($blockPosition == 1 || $blockPosition == 2)
	) : ?>
	<?php if ($displayData['params']->get('show_create_date')) : ?>
	<?php echo $this->sublayout('create_date', $displayData); ?>
	<?php endif; ?>
	
	<?php if ($displayData['params']->get('show_modify_date')) : ?>
	<?php echo $this->sublayout('modify_date', $displayData); ?>
	<?php endif; ?>
	
	<?php if ($displayData['params']->get('show_author') && !empty($displayData['item']->author )) : ?>
	<?php echo $this->sublayout('author', $displayData); ?>
	<?php endif; ?>
	
	<?php if ($displayData['params']->get('show_hits')) : ?>
	<?php echo $this->sublayout('hits', $displayData); ?>
	<?php endif; ?>
	<?php endif; ?>
</div>

Language override

Info Block Language Override

Your district representatives module

<div class="tagssimilar<?php echo $moduleclass_sfx; ?>">
	<?php if ($list) : ?>
	<div class="list-group">
		<?php foreach ($list as $i => $item) : ?>
		<h5>
			<?php if (($item->type_alias === 'com_users.category') || ($item->type_alias === 'com_banners.category')) : ?>
			<?php if (!empty($item->core_title)) : ?>
			<?php echo htmlspecialchars($item->core_title, ENT_COMPAT, 'UTF-8'); ?>
			<?php endif; ?>
			<?php else : ?>
			<a href="<?php echo JRoute::_($item->link); ?>">
				<?php if (!empty($item->core_title)) : ?>
				<?php echo htmlspecialchars($item->core_title, ENT_COMPAT, 'UTF-8'); ?>
				<?php endif; ?>
			</a>
			<?php endif; ?>
		</h5>
		<?php endforeach; ?>
	</div>
	<?php else : ?>
	<span><?php echo JText::_('MOD_TAGS_SIMILAR_NO_MATCHING_TAGS'); ?></span>
	<?php endif; ?> 
</div>

In this district module

<div class="list-group relateditems<?php echo $moduleclass_sfx; ?> mod-list">
<?php foreach ($list as $item) : ?>

	<h5><a href="<?php echo $item->route; ?>"> 
		<?php if ($showDate) echo JHtml::_('date', $item->created, JText::_('DATE_FORMAT_LC4')) . ' - '; ?>
		<?php echo $item->title; ?></a>
   </h5>

<?php endforeach; ?>
</div>

Our districts module

foreach ($list as $item) : ?>
<!--	<li<?php if ($id == $item->id && in_array($view, array('category', 'categories')) && $option == 'com_content') echo ' class="active"'; ?>> <?php $levelup = $item->level - $startLevel - 1; ?>-->
		<h<?php echo $params->get('item_heading') + $levelup; ?>>
		<a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($item->id)); ?>"> 
		<?php echo $item->title; ?>
			<?php if ($params->get('numitems')) : ?>
				(<?php echo $item->numitems; ?>)
			<?php endif; ?>
		</a>
		</h<?php echo $params->get('item_heading') + $levelup; ?>>

		<?php if ($params->get('show_description', 0)) : ?>
			<?php echo JHtml::_('content.prepare', $item->description, $item->getParams(), 'mod_articles_categories.content'); ?>
		<?php endif; ?>
		<?php if ($params->get('show_children', 0) && (($params->get('maxlevel', 0) == 0)
			|| ($params->get('maxlevel') >= ($item->level - $startLevel)))
			&& count($item->getChildren())) : ?>
			<?php echo '<ul>'; ?>
			<?php $temp = $list; ?>
			<?php $list = $item->getChildren(); ?>
			<?php require JModuleHelper::getLayoutPath('mod_articles_categories', $params->get('layout', 'default') . '_items'); ?>
			<?php $list = $temp; ?>
			<?php echo '</ul>'; ?>
		<?php endif; ?>
<!--	</li>-->
<?php endforeach; ?>

Navigation module

<ul class="list-group na menu<?php echo $class_sfx; ?> mod-list"<?php echo $id; ?>>
<?php foreach ($list as $i => &$item)
{
	$class = 'item-' . $item->id;

	if ($item->id == $default_id)
	{
		$class .= ' default';
	}

	if ($item->id == $active_id || ($item->type === 'alias' && $item->params->get('aliasoptions') == $active_id))
	{
		$class .= ' current';
	}

	if (in_array($item->id, $path))
	{
		$class .= ' active';
	}
	elseif ($item->type === 'alias')
	{
		$aliasToId = $item->params->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 ($item->deeper)
	{
		$class .= ' deeper';
	}

	if ($item->parent)
	{
		$class .= ' parent';
	}

	echo '<h5 class="' . $class . '">';

	switch ($item->type) :
		case 'separator':
		case 'component':
		case 'heading':
		case 'url':
			require JModuleHelper::getLayoutPath('mod_menu', 'default_' . $item->type);
			break;

		default:
			require JModuleHelper::getLayoutPath('mod_menu', 'default_url');
			break;
	endswitch;

	// The next item is deeper.
	if ($item->deeper)
	{
		echo '<ul class="nav-child unstyled small">';
	}
	// The next item is shallower.
	elseif ($item->shallower)
	{
		echo '</li>';
		echo str_repeat('</ul></li>', $item->level_diff);
	}
	// The next item is on the same level.
	else
	{
		echo '</h5>';
	}
}
?></ul>

III. The tag view

<form action="<?php echo htmlspecialchars(JUri::getInstance()->toString()); ?>" method="post" name="adminForm" id="adminForm">
	<?php if ($this->params->get('filter_field') || $this->params->get('show_pagination_limit')) : ?>
		<fieldset class="filters btn-toolbar">
			<?php if ($this->params->get('filter_field')) : ?>
				<div class="btn-group">
					<label class="filter-search-lbl element-invisible" for="filter-search">
						<?php echo JText::_('COM_TAGS_TITLE_FILTER_LABEL') . '&#160;'; ?>
					</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();" title="<?php echo JText::_('COM_TAGS_FILTER_SEARCH_DESC'); ?>" placeholder="<?php echo JText::_('COM_TAGS_TITLE_FILTER_LABEL'); ?>" />
					<button type="button" name="filter-search-button" title="<?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?>" onclick="document.adminForm.submit();" class="btn">
						<span class="icon-search"></span>
					</button>
					<button type="reset" name="filter-clear-button" title="<?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?>" class="btn" onclick="resetFilter(); document.adminForm.submit();">
						<span class="icon-remove"></span>
					</button>
				</div>
			<?php endif; ?>
			<?php if ($this->params->get('show_pagination_limit')) : ?>
				<div class="btn-group pull-right">
					<label for="limit" class="element-invisible">
						<?php echo JText::_('JGLOBAL_DISPLAY_NUM'); ?>
					</label>
					<?php echo $this->pagination->getLimitBox(); ?>
				</div>
			<?php endif; ?>
			<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 class="clearfix"></div>
		</fieldset>
	<?php endif; ?>
	<?php if (empty($this->items)) : ?>
		<p><?php echo JText::_('COM_TAGS_NO_ITEMS'); ?></p>
	<?php else : ?>     
		<table class="category table table-striped table-bordered table-hover">
			<?php if ($this->params->get('show_headings')) : ?>
				<thead>
					<tr>
						<th id="categorylist_header_title">
							<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'c.core_title', $listDirn, $listOrder); ?>
						</th>
						<?php if ($date = $this->params->get('tag_list_show_date')) : ?>
							<th id="categorylist_header_date">
								<?php if ($date === 'created') : ?>
									<?php echo JHtml::_('grid.sort', 'COM_TAGS_' . $date . '_DATE', 'c.core_created_time', $listDirn, $listOrder); ?>
								<?php elseif ($date === 'modified') : ?>
									<?php echo JHtml::_('grid.sort', 'COM_TAGS_' . $date . '_DATE', 'c.core_modified_time', $listDirn, $listOrder); ?>
								<?php elseif ($date === 'published') : ?>
									<?php echo JHtml::_('grid.sort', 'COM_TAGS_' . $date . '_DATE', 'c.core_publish_up', $listDirn, $listOrder); ?>
								<?php endif; ?>
							</th>
						<?php endif; ?>
					</tr>
				</thead>
			<?php endif; ?>
			<tbody>
				<?php foreach ($this->items as $i => $item) : ?>
					<?php if ($item->core_state == 0) : ?>
						<tr class="system-unpublished cat-list-row<?php echo $i % 2; ?>">
					<?php else : ?>
						<tr class="cat-list-row<?php echo $i % 2; ?>">
					<?php endif; ?>
						<td <?php if ($this->params->get('show_headings')) echo "headers=\"categorylist_header_title\""; ?> class="list-title">
							<h5><strong><a href="<?php echo JRoute::_($item->link); ?>">
								<?php echo $this->escape($item->core_title); ?>
							</a></strong></h5>
							<?php if ($item->core_state == 0) : ?>
								<span class="list-published label label-warning">
									<?php echo JText::_('JUNPUBLISHED'); ?>
								</span>
							<?php endif; ?>
						</td>
						<?php if ($this->params->get('tag_list_show_date')) : ?>
							<td headers="categorylist_header_date" class="list-date mall">
								<span><?php
								echo JHtml::_(
									'date', $item->displayDate,
									$this->escape($this->params->get('date_format', JText::_('DATE_FORMAT_LC3')))
								); ?></span>
							</td>
						<?php endif; ?>
					</tr>
				<?php endforeach; ?>
			</tbody>
		</table>
		<?php // Add pagination links ?>
		<?php if (($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?>
			<div class="pagination">
				<?php if ($this->params->def('show_pagination_results', 1)) : ?>
					<p class="counter pull-right">
						<?php echo $this->pagination->getPagesCounter(); ?>
					</p>
				<?php endif; ?>
				<?php echo $this->pagination->getPagesLinks(); ?>
			</div>
		<?php endif; ?>
	<?php endif; ?>
</form>

monkAbout the Joomla Overrides Challenge

In association with Viviana Menzel, we've created the unofficial Joomla Overrides Challenge.

The final goal of this partnership is to show how Joomla can be really powerful with the overrides. Of course, we also have fun and we increase our Joomla skills. There is nothing to win and the participants have nothing to lose.

Each month, we create an new override based on an extension or on an project. That's why I've created this website to display some of my overrides created in this challenge. Whatever is your Joomla level, if you want to join us and participate you're very welcome. Don't hesitate to contact Viviana or me :)