mirror of
https://github.com/Piwigo/Piwigo-Social-Buttons.git
synced 2026-07-04 00:41:10 +02:00
11 lines
1.2 KiB
Smarty
11 lines
1.2 KiB
Smarty
{strip}
|
|
{if $SOCIALBUTT.light}
|
|
<a title="Share on Facebook" href="https://www.facebook.com/sharer.php?s=100&p[url]={$SOCIALBUTT.share_url|urlencode}&p[title]={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}{if $SOCIALBUTT.basename=='picture'}&p[summary]={if isset($COMMENT_IMG)}{$COMMENT_IMG|urlencode}{/if}{$SOCIALBUTT.copyright|urlencode}&p[images][0]={$SOCIALBUTT.source|urlencode}"{else}&p[summary]={if isset($CONTENT_DESCRIPTION)}{$CONTENT_DESCRIPTION|urlencode}{/if}{$SOCIALBUTT.copyright|urlencode}"{/if}
|
|
onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=500');return false;" target="_blank" rel="nofollow">
|
|
<img src="{$ROOT_URL}{$SOCIALBUTT_PATH}template/images/facebook.png" alt="Facebook"></a>
|
|
{else}
|
|
{footer_script require='jquery'}jQuery('body').prepend('<div id="fb-root"></div>');{/footer_script}
|
|
{combine_script id='facebook_jssdk' load='footer' path='https://connect.facebook.net/'|cat:$SOCIALBUTT.FACEBOOK.lang|cat:'/sdk.js#xfbml=1&version=v12.0" nonce="7dWKrx1N"'}
|
|
<div class="fb-share-button" data-href="{$SOCIALBUTT.share_url}" data-layout="button_count"></div> {* Does not work with 'localhost/...' urls*}
|
|
{/if}
|
|
{/strip} |