Changeset 31136


Ignore:
Timestamp:
May 8, 2015, 9:51:02 PM (9 years ago)
Author:
SergeD
Message:

version 1.0.4 - see changelog for details

Location:
extensions/ShareThis
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/ShareThis/changelog.txt

    r31106 r31136  
    1818
    1919=== Changelog ===
     20version 1.0.4
     21+ Added en_UK language folder to allow plugin translation
     22- Fixed extension repository link to allow proper plugin update detection
     23- Fixed issue when under some coditions plugin parameters are not present on plugin update
     24
    2025version 1.0.3
    2126+ ALL: Added better reference for OG: metadata
  • extensions/ShareThis/main.inc.php

    r31106 r31136  
    22/*
    33Plugin Name: ShareThis
    4 Version: 1.0.3
     4Version: 1.0.4
    55Description: Add "Share This" functionality to your site
    6 //Plugin URI: http://piwigo.org/ext/extension_view.php?eid=543
     6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=793
    77Author: Serguei Dosyukov
    88Author URI: http://blog.dragonsoft.us
     
    1515// +-----------------------------------------------------------------------+
    1616
    17 define('SHARETHIS_VERSION', '1.0.3');
     17define('SHARETHIS_VERSION', '1.0.4');
    1818define('SHARETHIS_ID',      basename(dirname(__FILE__)));
    1919define('SHARETHIS_PATH' ,   PHPWG_PLUGINS_PATH . SHARETHIS_ID . '/');
     
    9494    "icon_class"  => "fa fa-share-alt",
    9595    "title"       => "{'Share This'|@translate}",
    96     "content"     => '<span>{\'Share This:\'|@translate}</span>'
     96    "content"     => '<span>{\'Share This\'|@translate}:</span>'
    9797                       . '{html_head}<!-- START OPEN GRAPH TAGS-->{"\n"}'
    9898                       . '<meta property="og:title" content="{$GALLERY_TITLE} | {$PAGE_TITLE}{if $current->author} | by {$current->author}{/if}" />{"\n"}'
  • extensions/ShareThis/maintain.class.php

    r31051 r31136  
    33
    44class sharethis_maintain extends PluginMaintain {
     5
    56  private $default_conf = array(
    67    'facebook'   => false,
    78    'pinterest'  => false,
    89    'twitter'    => false,
    9     'googleplus' => false
     10    'googleplus' => false,
     11    'tumblr'     => false
    1012  );
    1113
     
    1416  }
    1517
    16   /**
    17    * Plugin installation
    18    */
     18  /**** Plugin installation */
    1919  function install($plugin_version, &$errors=array()) {
    2020    global $conf;
     
    2626      $old_conf = safe_unserialize($conf['sharethis']);
    2727
    28       //if (empty($old_conf['option3']))
    29       //{ // use case: this parameter was added in a new version
    30       //  $old_conf['option3'] = 'two';
    31       //}
     28      foreach ($this->default_conf as $key => $value):
     29        if (array_key_exists($key, $old_conf)):
     30        else:
     31          $old_conf[$key] = $value;
     32        endif;
     33      endforeach;
    3234
    3335      conf_update_param('sharethis', $old_conf, true);
     
    3537  }
    3638
    37   /**
    38    * Plugin activation
    39    */
    40   function activate($plugin_version, &$errors=array()) {
    41   }
     39  /**** Plugin activation */
     40  function activate($plugin_version, &$errors=array()) { }
    4241
    43   /**
    44    * Plugin deactivation
    45    */
    46   function deactivate() {
    47   }
     42  /**** Plugin deactivation */
     43  function deactivate() { }
    4844
    49   /**
    50    * Plugin (auto)update
    51    */
     45  /**** Plugin (auto)update */
    5246  function update($old_version, $new_version, &$errors=array()) {
    5347    $this->install($new_version, $errors);
    5448  }
    5549
    56   /**
    57    * Plugin uninstallation
    58    */
     50  /**** Plugin uninstallation */
    5951  function uninstall() {
    6052    // delete configuration
Note: See TracChangeset for help on using the changeset viewer.