Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. mod-social
  2. <?php
  3. /**
  4. * @package Joomla.Site
  5. * @subpackage mod_custom
  6. *
  7. * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
  8. * @license GNU General Public License version 2 or later; see LICENSE.txt
  9. */
  10.  
  11. defined('_JEXEC') or die;
  12.  
  13.  
  14. $iterador = 5;
  15.  
  16. for($i = 1; $i <= $iterador; $i++){
  17. $icon = "icon".$i;
  18. $icon2 = "icon-hover".$i;
  19. $link = "link".$i;
  20. if (!empty($params->get($link))){
  21. $items[] = $params->get($link);
  22. }else {
  23. $items[] = "#";
  24. }
  25. if (!empty($params->get($icon))){
  26. $items[] = $params->get($icon);
  27. }
  28.  
  29. if (!empty($params->get($icon2))){
  30. $items[] = $params->get($icon2);
  31. }
  32.  
  33. }
  34. ?>
  35.  
  36. <div class="social-content">
  37. <nav>
  38. <ul>
  39. <?php $n = -1; ?>
  40. <?php for($i=0; $i < $iterador; $i++): ?>
  41. <li>
  42. <a href="<?php echo $items[++$n]; ?>" target="_blank" class="btn-social">
  43. <img src="<?php echo $items[++$n]; ?>" alt="icon-social" />
  44. <img src="<?php echo $items[++$n]; ?>" alt="icon-social" />
  45. </a>
  46. </li>
  47. <?php endfor; ?>
  48. </ul>
  49. </nav>
  50. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement