use Piwigo 2.5 template methods, share complete link, option to disable on albums

git-svn-id: http://piwigo.org/svn/extensions/SocialButtons@21232 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
mistic100
2013-03-05 23:51:44 +00:00
parent 5e79b4b00d
commit c6dfaa9877
7 changed files with 32 additions and 11 deletions
+9 -2
View File
@@ -9,6 +9,7 @@ function socialbutt_install()
{
$default_config = array(
'position' => 'toolbar',
'on_index' => true,
'twitter' => array(
'enabled' => true,
'size' => 'small',
@@ -63,6 +64,7 @@ function socialbutt_install()
else
{
$new_conf = unserialize($conf['SocialButtons']);
if (empty($new_conf['pinterest']))
{
$new_conf['pinterest'] = array(
@@ -70,9 +72,14 @@ function socialbutt_install()
'layout' => 'horizontal',
'img_size' => 'Original',
);
$conf['SocialButtons'] = serialize($new_conf);
conf_update_param('SocialButtons', $conf['SocialButtons']);
}
if (!isset($new_conf['on_index']))
{
$new_conf['on_index'] = true;
}
$conf['SocialButtons'] = serialize($new_conf);
conf_update_param('SocialButtons', $conf['SocialButtons']);
}
}