Changeset 31059


Ignore:
Timestamp:
Mar 26, 2015, 12:54:51 AM (10 years ago)
Author:
SergeD
Message:

version 1.0.2 - see change log for details

Location:
extensions/ShareThis
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/ShareThis/changelog.txt

    r31054 r31059  
    1515
    1616=== Changelog ===
     17version 1.0.2
     18+ Corrected PayPal link for "Donate" link in admin area
     19- Fixed issue with VideoJS plugin when image derivative information is empty/missing. Post to Facebook would be made without image reference
     20
    1721version 1.0.1
    1822+ Added Facebook <meta property="og:.. support
  • extensions/ShareThis/main.inc.php

    r31054 r31059  
    22/*
    33Plugin Name: ShareThis
    4 Version: 1.0.1
     4Version: 1.0.2
    55Description: Add "Share This" functionality to your site
    66//Plugin URI: http://piwigo.org/ext/extension_view.php?eid=543
     
    1515// +-----------------------------------------------------------------------+
    1616
    17 define('SHARETHIS_VERSION', '1.0.1');
     17define('SHARETHIS_VERSION', '1.0.2');
    1818define('SHARETHIS_ID',      basename(dirname(__FILE__)));
    1919define('SHARETHIS_PATH' ,   PHPWG_PLUGINS_PATH . SHARETHIS_ID . '/');
     
    8282
    8383function sharethis_get_tab_metadata($metadata) {
    84 
    8584  // pinterest &media=<logo>
    8685
    8786  $url   = '{$CUR_PAGE|escape:\'url\'}';
    88   $image = '{$U_HOME}/{$current.selected_derivative->get_url()|escape:\'url\'}';
     87  $image = '{if $current.selected_derivative}{$U_HOME}/{$current.selected_derivative->get_url()|escape:\'url\'}{else}{/if}';
    8988  $title = '{$PAGE_TITLE|escape:\'url\'}';
    9089  $content = '{$CONTENT_DESCRIPTION|urlencode}';
     90
     91
    9192
    9293  $metadata[] = array(
     
    99100                       . '<meta property="og:type" content="article">{"\n"}'
    100101                       . '<meta property="og:url" content="{$CUR_PAGE}">{"\n"}'
    101                        . '<meta property="og:image" content="{$U_HOME}/{$current.selected_derivative->get_url()}">{"\n"}'
     102                       . '{if $current.selected_derivative}<meta property="og:image" content="{$U_HOME}/{$current.selected_derivative->get_url()}">{"\n"}{/if}'
    102103                       . '{/html_head}'
    103                        . '<a href="http://www.facebook.com/sharer/sharer.php?p[title]=' . $title . '&amp;p[url]=' . $url . '&amp;p[images][0]=' . $image . '&amp;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 
     104                       . '<a href="http://www.facebook.com/sharer/sharer.php?p[title]=' . $title . '&amp;p[url]=' . $url . '{if $current.selected_derivative}&amp;p[images][0]=' . $image . '{/if}&amp;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}'
    106105                   . '{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}'
    107106                   . '{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}'
     
    111110    "no_overlay"  => TRUE
    112111  );
    113 
    114112  return $metadata;
    115113}
  • extensions/ShareThis/template/admin.tpl

    r31053 r31059  
    88      <li><a href="http://piwigo.org/forum/viewtopic.php?id=158356" target="_blank">{'Support'|@translate}</a>&nbsp;|&nbsp;</li>
    99      <li><a title="Follow me on Twitter" href="http://twitter.com/greydragon_th" target="_blank">{'Follow'|@translate}</a>&nbsp;|&nbsp;</li>
    10       <li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=9MWBSVJMWMJEU" target="_blank">{'Coffee Fund'|@translate}</a>&nbsp;|&nbsp;</li>
     10      <li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GYVNZCNDMSD58" target="_blank">{'Coffee Fund'|@translate}</a>&nbsp;|&nbsp;</li>
    1111      <li><a href="http://piwigo.org/ext/extension_view.php?eid=793" onclick="return false" target="_blank">{'Download'|@translate}</a></li>
    1212    </ul>
Note: See TracChangeset for help on using the changeset viewer.