Changeset 31053 for extensions/ShareThis/main.inc.php
- Timestamp:
- Mar 23, 2015, 2:35:52 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ShareThis/main.inc.php
r31051 r31053 2 2 /* 3 3 Plugin Name: ShareThis 4 Version: 1.0. 04 Version: 1.0.1 5 5 Description: Add "Share This" functionality to your site 6 6 //Plugin URI: http://piwigo.org/ext/extension_view.php?eid=543 … … 15 15 // +-----------------------------------------------------------------------+ 16 16 17 define('SHARETHIS_VERSION', '1.0. 0');17 define('SHARETHIS_VERSION', '1.0.1'); 18 18 define('SHARETHIS_ID', basename(dirname(__FILE__))); 19 19 define('SHARETHIS_PATH' , PHPWG_PLUGINS_PATH . SHARETHIS_ID . '/'); … … 85 85 // pinterest &media=<logo> 86 86 87 $url = '{$CUR_PAGE|escape:\'url\'}'; 88 $image = '{$U_HOME}/{$current.selected_derivative->get_url()|escape:\'url\'}'; 89 $title = '{$PAGE_TITLE|escape:\'url\'}'; 90 $content = '{$CONTENT_DESCRIPTION|urlencode}'; 91 87 92 $metadata[] = array( 88 93 "id" => "sharethis", … … 90 95 "title" => "{'Share This'|@translate}", 91 96 "content" => '<span>{\'Share This:\'|@translate}</span>' 92 . '{if $sharethis_facebook}<a href="http://www.facebook.com/share.php?u={$CUR_PAGE}" title="{\'Share on Facebook\'|@translate}" target="_blank"><i class="fa fa-facebook-square"></i> <span>{\'Facebook\'|@translate}</span></a>{/if}' 93 . '{if $sharethis_pinterest}<a href="http://pinterest.com/pin/create/button/?url={$CUR_PAGE}" title="{\'Share on Pinterest\'|@translate}" target="_blank"><i class="fa fa-pinterest"></i> <span>{\'Pinterest\'|@translate}</span></a>{/if}' 94 . '{if $sharethis_twitter}<a href="https://twitter.com/intent/tweet?text={$PAGE_TITLE|escape:\'url\'}&url={$CUR_PAGE}" title="{\'Share on Twitter\'|@translate}" target="_blank"><i class="fa fa-twitter"></i> <span>{\'Twitter\'|@translate}</span></a>{/if}' 95 . '{if $sharethis_googleplus}<a href="https://plus.google.com/share?url={$CUR_PAGE}" title="{\'Share on Google+\'|@translate}" target="_blank"><i class="fa fa-google-plus-square"></i> <span>{\'Google+\'|@translate}</span></a>{/if}', 97 . '{if $sharethis_facebook}' 98 . '{html_head}<meta property="og:title" content="">{"\n"}' 99 . '<meta property="og:type" content="image">{"\n"}' 100 . '<meta property="og:url" content="' . $url .'">{"\n"}' 101 . '<meta property="og:image" content="' . $image . '">{"\n"}' 102 . '{/html_head}' 103 . '<a href="http://www.facebook.com/sharer/sharer.php?p[title]=' . $title . '&p[url]=' . $url . '&p[images][0]=' . $image . '&p[summary]=' . $content . '" onclick="window.open(this.href, \'\', \'toolbar=0,status=0,width=700,height=500\'); return false;" title="{\'Share on Facebook\'|@translate}" target="_blank"><i class="fa fa-facebook-square"></i> <span>{\'Facebook\'|@translate}</span></a>{/if}' 104 105 106 . '{if $sharethis_pinterest}<a href="http://pinterest.com/pin/create/button/?url=' . $url . '" title="{\'Share on Pinterest\'|@translate}" target="_blank"><i class="fa fa-pinterest"></i> <span>{\'Pinterest\'|@translate}</span></a>{/if}' 107 . '{if $sharethis_twitter}<a href="https://twitter.com/intent/tweet?text=' . $title . '&url=' . $url .'" title="{\'Share on Twitter\'|@translate}" target="_blank"><i class="fa fa-twitter"></i> <span>{\'Twitter\'|@translate}</span></a>{/if}' 108 . '{if $sharethis_googleplus}<a href="https://plus.google.com/share?url=' . $url . '" title="{\'Share on Google+\'|@translate}" target="_blank"><i class="fa fa-google-plus-square"></i> <span>{\'Google+\'|@translate}</span></a>{/if}', 96 109 "combine" => '{combine_css id=\'fa\' path=$SHARETHIS_PATH|cat:"/css/font-awesome.min.css"}' 97 110 . '{combine_css id=\'sharethis\' path=$SHARETHIS_PATH|cat:"/css/styles.css"}',
Note: See TracChangeset
for help on using the changeset viewer.