Footer links

: mod_weblinks

Live Demo 

Footer links 



Copyright 2012 - 2020 - Web-eau.net création de site web d'emailing et de newsletter- Tous droits réservés

Markup

<?php
	/**
		* @package     Joomla.Administrator
		* @subpackage  Weblinks
		* @Author	   web-eau.net
		* @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
		* @license     GNU General Public License version 2 or later; see LICENSE.txt
	*/
	
	defined('_JEXEC') or die;
?>
<div class="container">
	<?php if ($params->get('groupby', 0)) : ?>
	<?php $cats = array(); ?>
	<?php $cols = $params->get('groupby_columns', 3); ?>
	<?php foreach ($list as $l) : ?>
	<?php $cats[] = array('catid' => $l->catid, 'title' => $l->category_title); ?>
	<?php endforeach; ?>
	<?php $cats = array_values(array_map('unserialize', array_unique(array_map('serialize', $cats)))); ?>
	<?php foreach ($cats as $k => $cat) : ?>
	<?php $items = array(); ?>
	<?php foreach ($list as $item) : ?>
	<?php if ($item->catid == $cat['catid']) : ?>
	<?php $items[] = $item; ?>
	<?php endif; ?>
	<?php endforeach; ?>
	<?php if ($cols > 1) : ?>
	<?php if ($k % $cols == 0) : ?>
	<div class="row">
		<?php endif; ?>
		<div class="col-<?php echo (12 / $cols); ?>">
			<?php endif; ?>
			<?php if ($params->get('groupby_showtitle', 1)) : ?>
			<h4 class="text-primary"><?php echo htmlspecialchars($cat['title'], ENT_COMPAT, 'UTF-8'); ?></h4>
			<?php endif; ?>
			<ul class="list-unstyled weblinks<?php echo $moduleclass_sfx; ?>">
				<?php foreach ($items as $item) : ?>
				<li class="mb-2">
					<?php $link = $item->link; ?>
					
					<?php
						switch ($item->params->get('target', 3))
						{
							case 1:
							// Open in a new window
							echo '<a href="' . $link . '" target="_blank" rel="' . $params->get('follow', 'nofollow') . '">' .
							htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>';
							break;
							
							case 2:
							// Open in a popup window
							echo "<a href=\"#\" onclick=\"window.open('" . $link . "', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550'); return false\">" .
							htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>';
							break;
							
							default:
							// Open in parent window
							echo '<a href="' . $link . '" rel="' . $params->get('follow', 'nofollow') . '">' .
							htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>';
							break;
						}
					?>
					
				</li>
				<?php endforeach; ?>
			</ul>
			<?php if ($cols > 1) : ?>
		</div>
		<?php if(($k + 1) % $cols == 0 || $k == count($cats) - 1) : ?>
	</div>	
	<hr />
	<!-- Social icons -->
	<ul class="text-center social-icons">
		<li class="social-icon-facebook"><a target="_blank" href="#" aria-label="facebook"><span class="fa fa-facebook" aria-hidden="true"></span></a></li>
		<li class="social-icon-twitter"><a target="_blank" href="#" aria-label="twitter"><span class="fa fa-twitter" aria-hidden="true"></span></a></li>
		<li class="social-icon-pinterest"><a target="_blank" href="#" aria-label="Pinterest"><span class="fa fa-pinterest" aria-hidden="true"></span></a></li>
		<li class="social-icon-youtube"><a target="_blank" href="#" aria-label="Youtube"><span class="fa fa-youtube" aria-hidden="true"></span></a></li>
		<li class="social-icon-linkedin"><a target="_blank" href="#" aria-label="LinkedIn"><span class="fa fa-linkedin" aria-hidden="true"></span></a></li>
		<li class="social-icon-dribbble"><a target="_blank" href="#" aria-label="Dribbble"><span class="fa fa-dribbble" aria-hidden="true"></span></a></li>
		<li class="social-icon-instagram"><a target="_blank" href="#" aria-label="Instagram"><span class="fa fa-instagram" aria-hidden="true"></span></a></li>
		<li class="social-icon-behance"><a target="_blank" href="#" aria-label="Behance"><span class="fa fa-behance" aria-hidden="true"></span></a></li>
		<li class="social-icon-flickr"><a target="_blank" href="#" aria-label="Flickr"><span class="fa fa-flickr" aria-hidden="true"></span></a></li>
		<li class="social-icon-vk"><a target="_blank" href="#" aria-label="VK"><span class="fa fa-vk" aria-hidden="true"></span></a></li>
		<li class="social-icon-skype"><a href="skype:#?chat" aria-label="Skype"><span class="fa fa-skype" aria-hidden="true"></span></a></li>
		<li class="social-icon-whatsapp"><a href="whatsapp://send?abid=#&text=Hi" aria-label="WhatsApp"><span class="fa fa-whatsapp" aria-hidden="true"></span></a></li>
	</ul>
	<hr />   
	<!-- Copyright footer -->      
	<div class="text-center pb-5">
		<?php $config = JFactory::getConfig(); echo 'Copyright <i class="fa fa-copyright"></i> 2012 - '; echo date('Y'); echo (' - '); echo $config->get( 'sitename' ); echo ('- Tous droits réservés'); ?>
	</div>
	
	<?php endif; ?>
	<?php endif; ?>
	<?php endforeach; ?>
	<?php else : ?>
	<ul class="weblinks<?php echo $moduleclass_sfx; ?>">
		<?php foreach ($list as $item) : ?>
		<li>
			<?php $link = $item->link; ?>
			<?php
				switch ($item->params->get('target', 3))
				{
					case 1:
					// Open in a new window
					echo '<a href="' . $link . '" target="_blank" rel="' . $params->get('follow', 'nofollow') . '">' .
					htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>';
					break;
					
					case 2:
					// Open in a popup window
					echo "<a href=\"#\" onclick=\"window.open('" . $link . "', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550'); return false\">" .
					htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>';
					break;
					
					default:
					// Open in parent window
					echo '<a href="' . $link . '" rel="' . $params->get('follow', 'nofollow') . '">' .
					htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8') . '</a>';
					break;
				}
			?>
			
			<?php if ($params->get('description', 0)) : ?>
			<?php echo nl2br($item->description); ?>
			<?php endif; ?>
			
			<?php if ($params->get('hits', 0)) : ?>
			<?php echo '(' . $item->hits . ' ' . JText::_('MOD_WEBLINKS_HITS') . ')'; ?>
			<?php endif; ?>
		</li>
		<?php endforeach; ?>
	</ul>
	<?php endif; ?>
</div>  

CSS

ul.social-icons {
  list-style: none;
  padding: 0;
  margin: -5px;
  display: inline-block;
}
ul.social-icons > li {
    display: inline-block;
    margin: 5px 7px;
}
 

Daniel Dubois

Daniel Dubois

Passionné par le Web depuis 2007, Daniel défend la veuve et l'orphelin du web en créant des sites respectueux du W3C. Fort d'une expérience de plusieurs années, il partage ses connaissances dans un état d'esprit open source.
Très impliqué dans la communauté Joomla depuis 2014, il est actif au sein de plusieurs projets, conférencier et fondateur du JUG Breizh.