| Current Path : /home/megadansyp/www/plugins/fwgallery/social/layouts/site/social/ |
| Current File : /home/megadansyp/www/plugins/fwgallery/social/layouts/site/social/awesome.php |
<?php
/**
* FW Gallery 2.3.0
* @copyright (C) 2020 Fastw3b
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.fastw3b.net/ Official website
**/
defined( '_JEXEC' ) or die( 'Restricted access' );
$view = $displayData['view'];
$params = $view->params;
$row = $displayData['row'];
$ssl = (JURI::getInstance()->getScheme() == 'https')?1:2;
$link = urlencode(fwgHelper::route('index.php?option=com_fwgallery&view=item&id='.$row->id.':'.JFilterOutput::stringURLSafe($row->name), false, $ssl));
$media = urlencode(fwgHelper::route('index.php?option=com_fwgallery&view=item&format=raw&layout=img&id='.$row->id.':'.JFilterOutput::stringURLSafe($row->name), false, $ssl));
$name = urlencode($row->name);
?>
<div class="fwmg-share-buttons <?php echo $displayData['social_class']; ?>">
<?php
if ($params->get('display_twitter_sharing')) {
?>
<a target="_blank" href="https://twitter.com/intent/tweet?url=<?php echo $link; ?>&text=<?php echo $name; ?>" ><i class="fab fa-twitter-square fa-2x"></i></a>
<?php
}
if ($params->get('display_facebook_sharing')) {
?>
<a target="_blank" href="https://www.facebook.com/sharer.php?u=<?php echo $link; ?>" ><i class="fab fa-facebook-square fa-2x"></i></a>
<?php
}
if ($params->get('display_pinterest_sharing')) {
?>
<a target="_blank" href="https://pinterest.com/pin/create/bookmarklet/?url=<?php echo $link; ?>&media=<?php echo $media; ?>&description=<?php echo $name; ?>" ><i class="fab fa-pinterest-square fa-2x"></i></a>
<?php
}
if ($params->get('display_tumblr_sharing')) {
?>
<a target="_blank" href="https://www.tumblr.com/widgets/share/tool?shareSource=legacy&canonicalUrl=<?php echo $link; ?>&posttype=link" ><i class="fab fa-tumblr-square fa-2x"></i></a>
<?php
}
if ($params->get('display_ok_sharing')) {
?>
<a target="_blank" href="https://connect.ok.ru/offer?url=<?php echo $link; ?>&title=<?php echo $name; ?>&imageUrl=<?php echo $media; ?>"><i class="fab fa-odnoklassniki-square fa-2x"></i></a>
<?php
}
if ($params->get('display_vk_sharing')) {
?>
<a target="_blank" href="http://vk.com/share.php?url=<?php echo $link; ?>&title=<?php echo $name; ?>&image=<?php echo $media; ?>"><i class="fab fa-vk fa-2x"></i></a>
<?php
}
if ($params->get('display_viber_sharing')) {
?>
<a target="_blank" href="viber://forward?text=<?php echo $name; ?>%20<?php echo $link; ?>"><i class="fab fa-viber fa-2x"></i></a>
<?php
}
if ($params->get('display_whatsapp_sharing')) {
?>
<a target="_blank" href="whatsapp://send?text=<?php echo $name; ?>%20<?php echo $link; ?>" data-action="share/whatsapp/share"><i class="fab fa-whatsapp-square fa-2x"></i></a>
<?php
}
?>
</div>
<?php
if (!defined('FWMG_PLG_SOCIAL_SCRIPT_LOAQDED')) {
define('FWMG_PLG_SOCIAL_SCRIPT_LOAQDED', true);
?>
<script>
document.addEventListener('DOMContentLoaded', function() {
(function($) {
$(document).on('click', '.fwmg-share-buttons a', function(ev) {
ev.preventDefault();
var width = 650, height = 450;
window.open(this.href, '<?php echo JText::_('FWMG_SHARE_DIALOG', true); ?>Share Dialog', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width='+width+',height='+height+',top='+(screen.height/2-height/2)+',left='+(screen.width/2-width/2));
});
})(jQuery);
});
</script>
<?php
}