Changeset 31106 for extensions/ShareThis
- Timestamp:
- Apr 29, 2015, 9:11:59 PM (9 years ago)
- Location:
- extensions/ShareThis
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ShareThis/admin.php
r31051 r31106 19 19 'pinterest' => !empty($_POST['inc_pinterest']), 20 20 'twitter' => !empty($_POST['inc_twitter']), 21 'googleplus' => !empty($_POST['inc_googleplus']) 21 'googleplus' => !empty($_POST['inc_googleplus']), 22 'tumblr' => !empty($_POST['inc_tumblr']) 22 23 ); 23 24 … … 50 51 'INC_PINTEREST' => isset($params['pinterest']) && $params['pinterest'], 51 52 'INC_TWITTER' => isset($params['twitter']) && $params['twitter'], 52 'INC_GOOGLEPLUS' => isset($params['googleplus']) && $params['googleplus'] 53 'INC_GOOGLEPLUS' => isset($params['googleplus']) && $params['googleplus'], 54 'INC_TUMBLR' => isset($params['tumblr']) && $params['tumblr'] 53 55 54 56 )); -
extensions/ShareThis/changelog.txt
r31059 r31106 14 14 51 Franklin Street Fifth Floor, Boston, MA 02110-1301, USA. 15 15 16 Notes: 17 * Google Plus would not pick up image references if $conf['derivative_url_style'] = 1; is used 18 16 19 === Changelog === 20 version 1.0.3 21 + ALL: Added better reference for OG: metadata 22 + ALL: Photo description extended to include Gallery title and author (if provided) 23 + Pinterest: Added Description. Fixed image reference. Improved Pinterest widget integration 24 + Tumblr: New option. Experimental 25 17 26 version 1.0.2 18 27 + Corrected PayPal link for "Donate" link in admin area -
extensions/ShareThis/main.inc.php
r31059 r31106 2 2 /* 3 3 Plugin Name: ShareThis 4 Version: 1.0. 24 Version: 1.0.3 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. 2');17 define('SHARETHIS_VERSION', '1.0.3'); 18 18 define('SHARETHIS_ID', basename(dirname(__FILE__))); 19 19 define('SHARETHIS_PATH' , PHPWG_PLUGINS_PATH . SHARETHIS_ID . '/'); … … 47 47 // prepare plugin configuration 48 48 $conf['sharethis'] = safe_unserialize($conf['sharethis']); 49 if ($conf['sharethis']['facebook'] || $conf['sharethis']['pinterest'] || $conf['sharethis']['twitter'] || $conf['sharethis']['googleplus'] ):49 if ($conf['sharethis']['facebook'] || $conf['sharethis']['pinterest'] || $conf['sharethis']['twitter'] || $conf['sharethis']['googleplus'] || $conf['sharethis']['tumblr']): 50 50 add_event_handler('loc_begin_picture', 'sharethis_picture_handler'); 51 endif; 51 endif; 52 52 } 53 53 … … 75 75 'sharethis_twitter' => $conf['sharethis']['twitter'], 76 76 'sharethis_googleplus' => $conf['sharethis']['googleplus'], 77 'sharethis_tumblr' => $conf['sharethis']['tumblr'], 77 78 'SHARETHIS_PATH' => SHARETHIS_PATH, 78 79 'CUR_PAGE' => $curUrl … … 85 86 86 87 $url = '{$CUR_PAGE|escape:\'url\'}'; 87 $image = '{if $current.selected_derivative}{$U_HOME }/{$current.selected_derivative->get_url()|escape:\'url\'}{else}{/if}';88 $title = '{$ PAGE_TITLE|escape:\'url\'}';88 $image = '{if $current.selected_derivative}{$U_HOME|escape:\'url\'}{"/"|escape:\'url\'}{$current.selected_derivative->get_url()|escape:\'url\'}{/if}'; 89 $title = '{$GALLERY_TITLE|escape:\'url\'}{" | "|escape:\'url\'}{$PAGE_TITLE|escape:\'url\'}{if $current->author}{" | by "|escape:\'url\'}{$current->author|escape:\'url\'}{/if}'; 89 90 $content = '{$CONTENT_DESCRIPTION|urlencode}'; 90 91 92 91 93 92 $metadata[] = array( … … 96 95 "title" => "{'Share This'|@translate}", 97 96 "content" => '<span>{\'Share This:\'|@translate}</span>' 98 . '{if $sharethis_facebook}' 99 . '{html_head}<meta property="og:title" content="">{"\n"}' 100 . '<meta property="og:type" content="article">{"\n"}' 101 . '<meta property="og:url" content="{$CUR_PAGE}">{"\n"}' 102 . '{if $current.selected_derivative}<meta property="og:image" content="{$U_HOME}/{$current.selected_derivative->get_url()}">{"\n"}{/if}' 97 . '{html_head}<!-- START OPEN GRAPH TAGS-->{"\n"}' 98 . '<meta property="og:title" content="{$GALLERY_TITLE} | {$PAGE_TITLE}{if $current->author} | by {$current->author}{/if}" />{"\n"}' 99 . '<meta property="og:type" content="article" />{"\n"}' 100 . '<meta property="og:url" content="{$CUR_PAGE}" />{"\n"}' 101 . '{if $current.selected_derivative}<meta property="og:image" content="{$U_HOME}/{$current.selected_derivative->get_url()}" />{"\n"}{/if}' 102 . '<meta property="og:description" content="{$CONTENT_DESCRIPTION}" />{"\n"}' 103 . '<!-- END OPEN GRAPH TAGS-->{"\n"}' 104 . '{if $sharethis_pinterest}<script type="text/javascript" async defer src="//assets.pinterest.com/js/pinit.js"></script>{/if}' 103 105 . '{/html_head}' 104 . '<a href="http://www.facebook.com/sharer/sharer.php?p[title]=' . $title . '&p[url]=' . $url . '{if $current.selected_derivative}&p[images][0]=' . $image . '{/if}&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}' 105 . '{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}' 106 107 . '{if $sharethis_facebook}<a href="http://www.facebook.com/sharer/sharer.php?p[url]=' . $url . '{if $current.selected_derivative}&p[images][0]=' . $image . '{/if}&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}' 108 . '{if $sharethis_pinterest}<a href="http://pinterest.com/pin/create/button/?url=' . $url . '&media=' . $image . '&description=' . $title . '" title="{\'Share on Pinterest\'|@translate}" target="_blank" data-pin-do="none" data-pin-config="none"><i class="fa fa-pinterest"></i> <span>{\'Pinterest\'|@translate}</span></a>{/if}' 106 109 . '{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}' 107 . '{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}', 108 "combine" => '{combine_css id=\'fa\' path=$SHARETHIS_PATH|cat:"/css/font-awesome.min.css"}' 110 . '{if $sharethis_googleplus}<a href="https://plus.google.com/share?url=' . $url . '" title="{\'Share on Google+\'|@translate}" target="_blank" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600\');return false;"><i class="fa fa-google-plus-square"></i> <span>{\'Google+\'|@translate}</span></a>{/if}' 111 . '{if $sharethis_tumblr}<a href="http://www.tumblr.com/share/photo?source=' . $image . '&caption=' . $title . '&click_thru=' . $url . '" title="{\'Share on Tumblr\'|@translate}" target="_blank"><i class="fa fa-tumblr"></i> <span>{\'Tumblr\'|@translate}</span></a>{/if}', 112 113 "combine" => '{combine_css id=\'fa\' path=$SHARETHIS_PATH|cat:"/css/font-awesome.min.css"}' 109 114 . '{combine_css id=\'sharethis\' path=$SHARETHIS_PATH|cat:"/css/styles.css"}', 110 115 "no_overlay" => TRUE -
extensions/ShareThis/template/admin.tpl
r31059 r31106 22 22 <li><label><span class="graphicalCheckbox {if $INC_TWITTER}icon-check{else}icon-check-empty{/if}"> </span><input name="inc_twitter" id="inc_twitter" type="checkbox" value="1" {if $INC_TWITTER}checked="checked"{/if}>{'Post to Twitter'|@translate}</label></li> 23 23 <li><label><span class="graphicalCheckbox {if $INC_GOOGLEPLUS}icon-check{else}icon-check-empty{/if}"> </span><input name="inc_googleplus" id="inc_googleplus" type="checkbox" value="1" {if $INC_GOOGLEPLUS}checked="checked"{/if}>{'Post to Google Plus'|@translate}</label></li> 24 <li><label><span class="graphicalCheckbox {if $INC_TUMBLR}icon-check{else}icon-check-empty{/if}"> </span><input name="inc_tumblr" id="inc_tumblr" type="checkbox" value="1" {if $INC_TUMBLR}checked="checked"{/if}>{'Post to Tumblr'|@translate}</label></li> 24 25 </ul> 25 26 </fieldset>
Note: See TracChangeset
for help on using the changeset viewer.