- md5
- 675876780ef599256491e41e68529f3f
- sha1
- 3f1e20496bb82b1264add647240cea3299bc482b
- sha256
- 4bb9ac5cdbc8885f9e5b7ba18189178d892eb1ab46be334267cb1aef55a42c2a
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
<?php
/**
* @package Joomla.Site
* @subpackage mod_banners
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Banners\Site\Helper\BannerHelper;
?>
<div class="mod-banners bannergroup">
<?php if ($headerText) : ?>
<?php echo $headerText; ?>
<?php endif; ?>
<?php foreach ($list as $item) : ?>
<div class="mod-banners__item banneritem">
<?php $link = Route::_('index.php?option=com_banners&task=click&id=' . $item->id); ?>
<?php if ($item->type == 1) : ?>
<?php // Text based banners ?>
<?php echo str_replace(array('{CLICKURL}', '{NAME}'), array($link, $item->name), $item->custombannercode); ?>
<?php else : ?>
<?php $imageurl = $item->params->get('imageurl'); ?>
<?php $width = $item->params->get('width'); ?>
<?php $height = $item->params->get('height'); ?>
<?php if (BannerHelper::isImage($imageurl)) : ?>
<?php // Image based banner ?>
<?php $baseurl = strpos($imageurl, 'http') === 0 ? '' : Uri::base(); ?>
<?php $alt = $item->params->get('alt'); ?>
<?php $alt = $alt ?: $item->name; ?>
<?php $alt = $alt ?: Text::_('MOD_BANNERS_BANNER'); ?>
<?php if ($item->clickurl) : ?>
<?php // Wrap the banner in a link ?>
<?php $target = $params->get('target', 1); ?>
<?php if ($target == 1) : ?>
<?php // Open in a new window ?>
<a
href="<?php echo $link; ?>" target="_blank" rel="noopener noreferrer"
title="<?php echo htmlspecialchars($item->name, ENT_QUOTES, 'UTF-8'); ?>">
<img
src="<?php echo $baseurl . $imageurl; ?>"
alt="<?php echo $alt; ?>"
<?php if (!empty($width)) echo 'width="' . $width . '"'; ?>
<?php if (!empty($height)) echo 'height="' . $height . '"'; ?>
>
</a>
<?php elseif ($target == 2) : ?>
<?php // Open in a popup window ?>
<a
href="<?php echo $link; ?>" onclick="window.open(this.href, '',
'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550');
return false"
title="<?php echo htmlspecialchars($item->name, ENT_QUOTES, 'UTF-8'); ?>">
<img
src="<?php echo $baseurl . $imageurl; ?>"
alt="<?php echo $alt; ?>"
<?php if (!empty($width)) echo 'width="' . $width . '"'; ?>
<?php if (!empty($height)) echo 'height="' . $height . '"'; ?>
>
</a>
<?php else : ?>
<?php // Open in parent window ?>
<a
href="<?php echo $link; ?>"
title="<?php echo htmlspecialchars($item->name, ENT_QUOTES, 'UTF-8'); ?>">
<img
src="<?php echo $baseurl . $imageurl; ?>"
alt="<?php echo $alt; ?>"
<?php if (!empty($width)) echo 'width="' . $width . '"'; ?>
<?php if (!empty($height)) echo 'height="' . $height . '"'; ?>
>
</a>
<?php endif; ?>
<?php else : ?>
<?php // Just display the image if no link specified ?>
<img
src="<?php echo $baseurl . $imageurl; ?>"
alt="<?php echo $alt; ?>"
<?php if (!empty($width)) echo 'width="' . $width . '"'; ?>
<?php if (!empty($height)) echo 'height="' . $height . '"'; ?>
>
<?php endif; ?>
<?php elseif (BannerHelper::isFlash($imageurl)) : ?>
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
<?php if (!empty($width)) echo ' width="' . $width . '"'; ?>
<?php if (!empty($height)) echo ' height="' . $height . '"'; ?>
>
<param name="movie" value="<?php echo $imageurl; ?>" />
<embed
src="<?php echo $imageurl; ?>"
loop="false"
pluginspage="http://www.macromedia.com/go/get/flashplayer"
type="application/x-shockwave-flash"
<?php if (!empty($width)) echo ' width="' . $width . '"'; ?>
<?php if (!empty($height)) echo ' height="' . $height . '"'; ?>
/>
</object>
<?php endif; ?>
<?php endif; ?>
</div>
<?php endforeach; ?>
<?php if ($footerText) : ?>
<div class="mod-banners__footer bannerfooter">
<?php echo $footerText; ?>
</div>
<?php endif; ?>
</div>
The same content is in 2 releases, Joomla 4.0.0-alpha7 to 4.0.0-alpha8. See them all, or every version of this file.