mirror of
https://github.com/Piwigo/Piwigo-Social-Buttons.git
synced 2026-08-07 01:12:48 +02:00
update for Piwigo 2.6 and update Facebook options
git-svn-id: http://piwigo.org/svn/extensions/SocialButtons@26100 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -30,7 +30,6 @@ if (isset($_POST['submit']))
|
||||
),
|
||||
'facebook' => array(
|
||||
'enabled' => isset($_POST['facebook']['enabled']),
|
||||
'color' => $_POST['facebook']['color'],
|
||||
'layout' => $_POST['facebook']['layout'],
|
||||
),
|
||||
'pinterest' => array(
|
||||
@@ -49,7 +48,7 @@ if (isset($_POST['submit']))
|
||||
);
|
||||
|
||||
conf_update_param('SocialButtons', serialize($conf['SocialButtons']));
|
||||
array_push($page['infos'], l10n('Information data registered in database'));
|
||||
$page['infos'][] = l10n('Information data registered in database');
|
||||
|
||||
// the prefilter changes, we must delete compiled templatess
|
||||
$template->delete_compiled_templates();
|
||||
|
||||
+12
-36
@@ -10,12 +10,10 @@ Author URI: http://www.strangeplanet.fr
|
||||
|
||||
defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
|
||||
|
||||
global $prefixeTable;
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Define plugin constants |
|
||||
// +-----------------------------------------------------------------------+
|
||||
defined('SOCIALBUTT_ID') or define('SOCIALBUTT_ID', basename(dirname(__FILE__)));
|
||||
define('SOCIALBUTT_ID', basename(dirname(__FILE__)));
|
||||
define('SOCIALBUTT_PATH' , PHPWG_PLUGINS_PATH . SOCIALBUTT_ID . '/');
|
||||
define('SOCIALBUTT_ADMIN', get_root_url() . 'admin.php?page=plugin-' . SOCIALBUTT_ID);
|
||||
define('SOCIALBUTT_VERSION', 'auto');
|
||||
@@ -33,10 +31,10 @@ if (defined('IN_ADMIN'))
|
||||
|
||||
function socialbutt_admin_plugin_menu_links($menu)
|
||||
{
|
||||
array_push($menu, array(
|
||||
$menu[] = array(
|
||||
'NAME' => 'Social Buttons',
|
||||
'URL' => SOCIALBUTT_ADMIN,
|
||||
));
|
||||
);
|
||||
return $menu;
|
||||
}
|
||||
}
|
||||
@@ -53,37 +51,11 @@ else
|
||||
function socialbutt_init()
|
||||
{
|
||||
global $conf, $pwg_loaded_plugins;
|
||||
|
||||
// apply upgrade if needed
|
||||
if (
|
||||
SOCIALBUTT_VERSION == 'auto' or
|
||||
$pwg_loaded_plugins[SOCIALBUTT_ID]['version'] == 'auto' or
|
||||
version_compare($pwg_loaded_plugins[SOCIALBUTT_ID]['version'], SOCIALBUTT_VERSION, '<')
|
||||
)
|
||||
{
|
||||
// call install function
|
||||
include_once(SOCIALBUTT_PATH . 'include/install.inc.php');
|
||||
socialbutt_install();
|
||||
|
||||
// update plugin version in database
|
||||
if ( $pwg_loaded_plugins[SOCIALBUTT_ID]['version'] != 'auto' and SOCIALBUTT_VERSION != 'auto' )
|
||||
{
|
||||
$query = '
|
||||
UPDATE '. PLUGINS_TABLE .'
|
||||
SET version = "'. SOCIALBUTT_VERSION .'"
|
||||
WHERE id = "'. SOCIALBUTT_ID .'"';
|
||||
pwg_query($query);
|
||||
|
||||
$pwg_loaded_plugins[SOCIALBUTT_ID]['version'] = SOCIALBUTT_VERSION;
|
||||
|
||||
if (defined('IN_ADMIN'))
|
||||
{
|
||||
$_SESSION['page_infos'][] = 'Social Buttons updated to version '. SOCIALBUTT_VERSION;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// prepare plugin configuration
|
||||
|
||||
include_once(SOCIALBUTT_PATH . 'maintain.inc.php');
|
||||
$maintain = new SocialButtons_maintain(SOCIALBUTT_ID);
|
||||
$maintain->autoUpdate(SOCIALBUTT_VERSION, 'install');
|
||||
|
||||
$conf['SocialButtons'] = unserialize($conf['SocialButtons']);
|
||||
}
|
||||
|
||||
@@ -146,6 +118,10 @@ function socialbutt_add_button()
|
||||
{
|
||||
if ($conf['SocialButtons'][$service]['enabled'])
|
||||
{
|
||||
if ($service=='pinterest' && $basename!='picture')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
include_once(SOCIALBUTT_PATH . 'include/'. $service .'.inc.php');
|
||||
call_user_func_array('socialbutt_'.$service, array($basename, $root_url, &$tpl_vars, &$buttons));
|
||||
}
|
||||
|
||||
+140
-22
@@ -1,32 +1,150 @@
|
||||
<?php
|
||||
defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
|
||||
|
||||
defined('SOCIALBUTT_ID') or define('SOCIALBUTT_ID', basename(dirname(__FILE__)));
|
||||
include_once(PHPWG_PLUGINS_PATH . SOCIALBUTT_ID . '/include/install.inc.php');
|
||||
|
||||
|
||||
function plugin_install()
|
||||
class SocialButtons_maintain extends PluginMaintain
|
||||
{
|
||||
socialbutt_install();
|
||||
define('socialbutt_installed', true);
|
||||
}
|
||||
private $installed = false;
|
||||
|
||||
private $default_config = array(
|
||||
'position' => 'toolbar',
|
||||
'on_index' => true,
|
||||
'img_size' => 'Original',
|
||||
'light' => false,
|
||||
'twitter' => array(
|
||||
'enabled' => true,
|
||||
'size' => 'small',
|
||||
'count' => 'bubble',
|
||||
'via' => null,
|
||||
),
|
||||
'google' => array(
|
||||
'enabled' => true,
|
||||
'size' => 'medium',
|
||||
'annotation' => 'bubble',
|
||||
),
|
||||
'tumblr' => array(
|
||||
'enabled' => true,
|
||||
'type' => 'share_1',
|
||||
),
|
||||
'facebook' => array(
|
||||
'enabled' => true,
|
||||
'color' => 'light',
|
||||
'layout' => 'button_count',
|
||||
),
|
||||
'pinterest' => array(
|
||||
'enabled' => true,
|
||||
'layout' => 'horizontal',
|
||||
),
|
||||
'reddit' => array(
|
||||
'enabled' => true,
|
||||
'type' => 'interactive',
|
||||
'community' => null,
|
||||
),
|
||||
'linkedin' => array(
|
||||
'enabled' => true,
|
||||
'counter' => 'right',
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
function plugin_activate()
|
||||
{
|
||||
if (!defined('socialbutt_installed'))
|
||||
function install($plugin_version, &$errors=array())
|
||||
{
|
||||
socialbutt_install();
|
||||
if (empty($conf['SocialButtons']))
|
||||
{
|
||||
if (isset($conf['TumblrShare']))
|
||||
{
|
||||
$temp = is_string($conf['TumblrShare']) ? unserialize($conf['TumblrShare']) : $conf['TumblrShare'];
|
||||
if (!empty($temp['type'])) $this->default_config['tumblr']['type'] = $temp['type'];
|
||||
if (!empty($temp['img_size'])) $this->default_config['img_size'] = $temp['img_size'];
|
||||
}
|
||||
if (isset($conf['TweetThis']))
|
||||
{
|
||||
$temp = is_string($conf['TweetThis']) ? unserialize($conf['TweetThis']) : $conf['TweetThis'];
|
||||
if (!empty($temp['type'])) $this->default_config['twitter']['size'] = $temp['size'];
|
||||
if (!empty($temp['count'])) $this->default_config['twitter']['count'] = $temp['count'] ? 'bubble' : 'none';
|
||||
if (!empty($temp['via'])) $this->default_config['twitter']['via'] = $temp['via'];
|
||||
}
|
||||
if (isset($conf['GooglePlusOne']))
|
||||
{
|
||||
$temp = is_string($conf['GooglePlusOne']) ? unserialize($conf['GooglePlusOne']) : $conf['GooglePlusOne'];
|
||||
if (!empty($temp['size'])) $this->default_config['google']['size'] = $temp['size'];
|
||||
if (!empty($temp['annotation'])) $this->default_config['google']['annotation'] = $temp['annotation'];
|
||||
}
|
||||
|
||||
$conf['SocialButtons'] = serialize($this->default_config);
|
||||
conf_update_param('SocialButtons', $conf['SocialButtons']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$new_conf = is_string($conf['SocialButtons']) ? unserialize($conf['SocialButtons']) : $conf['SocialButtons'];
|
||||
|
||||
if (empty($new_conf['pinterest']))
|
||||
{
|
||||
$new_conf['pinterest'] = array(
|
||||
'enabled' => true,
|
||||
'layout' => 'horizontal',
|
||||
);
|
||||
}
|
||||
|
||||
if (empty($new_conf['reddit']))
|
||||
{
|
||||
$new_conf['reddit'] = array(
|
||||
'enabled' => false,
|
||||
'type' => 'interactive',
|
||||
'community' => null,
|
||||
);
|
||||
}
|
||||
|
||||
if (empty($new_conf['linkedin']))
|
||||
{
|
||||
$new_conf['linkedin'] = array(
|
||||
'enabled' => false,
|
||||
'counter' => 'right',
|
||||
);
|
||||
}
|
||||
|
||||
if (!isset($new_conf['on_index']))
|
||||
{
|
||||
$new_conf['on_index'] = true;
|
||||
}
|
||||
|
||||
if ($new_conf['facebook']['layout'] == 'none')
|
||||
{
|
||||
$new_conf['facebook']['layout'] = 'button_count';
|
||||
}
|
||||
|
||||
if (!isset($new_conf['light']))
|
||||
{
|
||||
$new_conf['light'] = false;
|
||||
}
|
||||
|
||||
if (!isset($new_conf['img_size']))
|
||||
{
|
||||
$new_conf['img_size'] = isset($new_conf['tumblr']['img_size']) ? $new_conf['tumblr']['img_size'] : 'Original';
|
||||
unset($new_conf['tumblr']['img_size'], $new_conf['pinterest']['img_size']);
|
||||
}
|
||||
|
||||
$conf['SocialButtons'] = serialize($new_conf);
|
||||
conf_update_param('SocialButtons', $conf['SocialButtons']);
|
||||
}
|
||||
|
||||
$this->installed = true;
|
||||
}
|
||||
|
||||
function activate($plugin_version, &$errors=array())
|
||||
{
|
||||
if (!$this->installed)
|
||||
{
|
||||
$this->install($plugin_version, $errors);
|
||||
}
|
||||
}
|
||||
|
||||
function deactivate()
|
||||
{
|
||||
}
|
||||
|
||||
function uninstall()
|
||||
{
|
||||
conf_delete_param('SocialButtons');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function plugin_uninstall()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
pwg_query('DELETE FROM `'. CONFIG_TABLE .'` WHERE param = "SocialButtons";');
|
||||
unset($conf['SocialButtons']);
|
||||
}
|
||||
|
||||
?>
|
||||
+86
-103
@@ -1,27 +1,26 @@
|
||||
{combine_css path=$SOCIALBUTT_PATH|@cat:"template/style.css"}
|
||||
|
||||
{html_style}{literal}
|
||||
{html_style}
|
||||
.socialbutt.disabled thead img {
|
||||
-webkit-filter: grayscale(100%); /* Chrome 19+ & Safari 6+ */
|
||||
filter: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='grayscale'><feColorMatrix type='saturate' values='0'/></filter></svg>#grayscale"); /* Firefox 10+ */
|
||||
filter: gray; /* IE6-9 */
|
||||
}
|
||||
{/literal}
|
||||
{if $light}
|
||||
.not-light {ldelim} display:none; }
|
||||
.not-light { display:none; }
|
||||
{/if}
|
||||
{/html_style}
|
||||
|
||||
{footer_script}{literal}
|
||||
{footer_script}
|
||||
jQuery("input.enable").change(function() {
|
||||
$parent = $(this).closest("div.socialbutt");
|
||||
if (!$(this).is(":checked")) {
|
||||
$parent.find("thead label").attr("title", "{/literal}{'Enable'|@translate|escape:javascript}{literal}");
|
||||
$parent.find("thead label").attr("title", "{'Enable'|translate|escape:javascript}");
|
||||
$parent.addClass('disabled');
|
||||
$parent.removeClass('enabled');
|
||||
}
|
||||
else {
|
||||
$parent.find("thead label").attr("title", "{/literal}{'Disable'|@translate|escape:javascript}{literal}");
|
||||
$parent.find("thead label").attr("title", "{'Disable'|translate|escape:javascript}");
|
||||
$parent.addClass('enabled');
|
||||
$parent.removeClass('disabled');
|
||||
}
|
||||
@@ -43,7 +42,7 @@ jQuery(".showInfo").tipTip({
|
||||
maxWidth: '300px',
|
||||
defaultPosition: 'bottom'
|
||||
});
|
||||
{/literal}{/footer_script}
|
||||
{/footer_script}
|
||||
|
||||
|
||||
<div class="titrePage">
|
||||
@@ -57,26 +56,26 @@ jQuery(".showInfo").tipTip({
|
||||
<table>
|
||||
<tr class="property">
|
||||
<td>
|
||||
{'Button position on picture page'|@translate}
|
||||
{'Button position on picture page'|translate}
|
||||
</td>
|
||||
<td>
|
||||
<label><input type="radio" name="position" value="top" {if $position=='top'}checked="checked"{/if}/> {'Top'|@translate}</label>
|
||||
<label><input type="radio" name="position" value="bottom" {if $position=='bottom'}checked="checked"{/if}/> {'Bottom'|@translate}</label>
|
||||
<label><input type="radio" name="position" value="toolbar" {if $position=='toolbar'}checked="checked"{/if}/> {'Toolbar'|@translate}</label>
|
||||
<label><input type="radio" name="position" value="top" {if $position=='top'}checked="checked"{/if}/> {'Top'|translate}</label>
|
||||
<label><input type="radio" name="position" value="bottom" {if $position=='bottom'}checked="checked"{/if}/> {'Bottom'|translate}</label>
|
||||
<label><input type="radio" name="position" value="toolbar" {if $position=='toolbar'}checked="checked"{/if}/> {'Toolbar'|translate}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="property">
|
||||
<td>
|
||||
{'Display buttons'|@translate}
|
||||
{'Display buttons'|translate}
|
||||
</td>
|
||||
<td>
|
||||
<label><input type="radio" name="on_index" value="true" {if $on_index}checked="checked"{/if}/> {'on photo and album'|@translate}</label><br>
|
||||
<label><input type="radio" name="on_index" value="false" {if not $on_index}checked="checked"{/if}/> {'only on photo'|@translate}</label>
|
||||
<label><input type="radio" name="on_index" value="true" {if $on_index}checked="checked"{/if}/> {'on photo and album'|translate}</label><br>
|
||||
<label><input type="radio" name="on_index" value="false" {if not $on_index}checked="checked"{/if}/> {'only on photo'|translate}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="property">
|
||||
<td>
|
||||
{'Shared picture size'|@translate}
|
||||
{'Shared picture size'|translate}
|
||||
</td>
|
||||
<td>
|
||||
{html_options name="img_size" values=$img_sizes output=$img_sizes|translate selected=$img_size}
|
||||
@@ -84,11 +83,11 @@ jQuery(".showInfo").tipTip({
|
||||
</tr>
|
||||
<tr class="property">
|
||||
<td>
|
||||
<label for="light_mode">{'Light mode'|@translate}</label>
|
||||
<label for="light_mode">{'Light mode'|translate}</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" id="light_mode" name="light" {if $light}checked="checked"{/if}/>
|
||||
<a class="showInfo" title="{'When light mode is activated no external script is loaded, it <b>speeds up the load of the page and disables user tracking</b> but also disables annotations and in-page popups.'|@translate}">i</a>
|
||||
<a class="icon-info-circled-1 showInfo" title="{'When light mode is activated no external script is loaded, it <b>speeds up the load of the page and disables user tracking</b> but also disables annotations and in-page popups.'|translate}"></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -101,7 +100,7 @@ jQuery(".showInfo").tipTip({
|
||||
<table>
|
||||
<thead>
|
||||
<tr><td colspan="2">
|
||||
<label title="{if $twitter.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
|
||||
<label title="{if $twitter.enabled}{'Disable'|translate}{else}{'Enable'|translate}{/if}">
|
||||
<img src="{$SOCIALBUTT_PATH}template/images/twitter_logo.png"/>
|
||||
<input class="enable" style="display:none;" type="checkbox" name="twitter[enabled]" {if $twitter.enabled}checked="checked"{/if}/>
|
||||
</label>
|
||||
@@ -110,7 +109,7 @@ jQuery(".showInfo").tipTip({
|
||||
<tbody>
|
||||
<tr class="property">
|
||||
<td>
|
||||
{'Button type'|@translate}
|
||||
{'Button type'|translate}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@@ -126,16 +125,16 @@ jQuery(".showInfo").tipTip({
|
||||
</tr>
|
||||
<tr class="property not-light">
|
||||
<td>
|
||||
{'Annotation'|@translate}
|
||||
{'Annotation'|translate}
|
||||
</td>
|
||||
<td>
|
||||
<label><input type="radio" name="twitter[count]" value="none" {if $twitter.count=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br>
|
||||
<label><input type="radio" name="twitter[count]" value="bubble" {if $twitter.count=='bubble'}checked="checked"{/if}/> {'Bubble'|@translate}</label><br>
|
||||
<label><input type="radio" name="twitter[count]" value="none" {if $twitter.count=='none'}checked="checked"{/if}/> {'None'|translate}</label><br>
|
||||
<label><input type="radio" name="twitter[count]" value="bubble" {if $twitter.count=='bubble'}checked="checked"{/if}/> {'Bubble'|translate}</label><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="property">
|
||||
<td>
|
||||
<label for="twitter_via">{'Via'|@translate}</label>
|
||||
<label for="twitter_via">{'Via'|translate}</label>
|
||||
</td>
|
||||
<td>
|
||||
@ <input type="text" id="twitter_via" name="twitter[via]" value="{$twitter.via}"/>
|
||||
@@ -149,7 +148,7 @@ jQuery(".showInfo").tipTip({
|
||||
<table>
|
||||
<thead>
|
||||
<tr><td colspan="2">
|
||||
<label title="{if $google.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
|
||||
<label title="{if $google.enabled}{'Disable'|translate}{else}{'Enable'|translate}{/if}">
|
||||
<img src="{$SOCIALBUTT_PATH}template/images/google_logo.png"/>
|
||||
<input class="enable" style="display:none;" type="checkbox" name="google[enabled]" {if $google.enabled}checked="checked"{/if}/>
|
||||
</label>
|
||||
@@ -158,7 +157,7 @@ jQuery(".showInfo").tipTip({
|
||||
<tbody>
|
||||
<tr class="property">
|
||||
<td>
|
||||
{'Button type'|@translate}
|
||||
{'Button type'|translate}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@@ -184,12 +183,12 @@ jQuery(".showInfo").tipTip({
|
||||
</tr>
|
||||
<tr class="property not-light">
|
||||
<td>
|
||||
{'Annotation'|@translate}
|
||||
{'Annotation'|translate}
|
||||
</td>
|
||||
<td>
|
||||
<label><input type="radio" name="google[annotation]" value="none" {if $google.annotation=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br>
|
||||
<label><input type="radio" name="google[annotation]" value="bubble" {if $google.annotation=='bubble'}checked="checked"{/if}/> {'Bubble'|@translate}</label><br>
|
||||
<label><input type="radio" name="google[annotation]" value="inline" {if $google.annotation=='inline'}checked="checked"{/if}/> {'Inline text'|@translate}</label>
|
||||
<label><input type="radio" name="google[annotation]" value="none" {if $google.annotation=='none'}checked="checked"{/if}/> {'None'|translate}</label><br>
|
||||
<label><input type="radio" name="google[annotation]" value="bubble" {if $google.annotation=='bubble'}checked="checked"{/if}/> {'Bubble'|translate}</label><br>
|
||||
<label><input type="radio" name="google[annotation]" value="inline" {if $google.annotation=='inline'}checked="checked"{/if}/> {'Inline text'|translate}</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -202,92 +201,52 @@ jQuery(".showInfo").tipTip({
|
||||
<table>
|
||||
<thead>
|
||||
<tr><td colspan="2">
|
||||
<label title="{if $facebook.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
|
||||
<label title="{if $facebook.enabled}{'Disable'|translate}{else}{'Enable'|translate}{/if}">
|
||||
<img src="{$SOCIALBUTT_PATH}template/images/facebook_logo.png"/>
|
||||
<input class="enable" style="display:none;" type="checkbox" name="facebook[enabled]" {if $facebook.enabled}checked="checked"{/if}/>
|
||||
</label>
|
||||
</td></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="property">
|
||||
<td>
|
||||
{'Button type'|@translate}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="button">
|
||||
<td><label>
|
||||
<img src="{$SOCIALBUTT_PATH}template/images/facebook_light.png"/>
|
||||
<input type="radio" name="facebook[color]" value="light" {if $facebook.color=='light'}checked="checked"{/if}/>
|
||||
</label></td>
|
||||
<td><label>
|
||||
<input type="radio" name="facebook[color]" value="dark" {if $facebook.color=='dark'}checked="checked"{/if}/>
|
||||
<img src="{$SOCIALBUTT_PATH}template/images/facebook_dark.png"/>
|
||||
</label></td>
|
||||
</tr>
|
||||
<tr class="property not-light">
|
||||
<td>
|
||||
{'Annotation'|@translate}
|
||||
{'Annotation'|translate}
|
||||
</td>
|
||||
<td>
|
||||
<!-- <label><input type="radio" name="facebook[layout]" value="none" {if $facebook.layout=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br> -->
|
||||
<label><input type="radio" name="facebook[layout]" value="button_count" {if $facebook.layout=='button_count'}checked="checked"{/if}/> {'Right bubble'|@translate}</label><br>
|
||||
<label><input type="radio" name="facebook[layout]" value="box_count" {if $facebook.layout=='box_count'}checked="checked"{/if}/> {'Top bubble'|@translate}</label><br>
|
||||
<label><input type="radio" name="facebook[layout]" value="standard" {if $facebook.layout=='standard'}checked="checked"{/if}/> {'Inline text'|@translate}</label>
|
||||
<!-- <label><input type="radio" name="facebook[layout]" value="none" {if $facebook.layout=='none'}checked="checked"{/if}/> {'None'|translate}</label><br> -->
|
||||
<label><input type="radio" name="facebook[layout]" value="button_count" {if $facebook.layout=='button_count'}checked="checked"{/if}/> {'Right bubble'|translate}</label><br>
|
||||
<label><input type="radio" name="facebook[layout]" value="box_count" {if $facebook.layout=='box_count'}checked="checked"{/if}/> {'Top bubble'|translate}</label><br>
|
||||
<label><input type="radio" name="facebook[layout]" value="standard" {if $facebook.layout=='standard'}checked="checked"{/if}/> {'Inline text'|translate}</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> {* <!-- facebook --> *}
|
||||
|
||||
<div class="socialbutt {if not $reddit.enabled}disabled{else}enabled{/if}"> {* <!-- reddit --> *}
|
||||
<div class="socialbutt {if not $pinterest.enabled}disabled{else}enabled{/if}"> {* <!-- pinterest --> *}
|
||||
<table>
|
||||
<thead>
|
||||
<tr><td colspan="2">
|
||||
<label title="{if $reddit.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
|
||||
<img src="{$SOCIALBUTT_PATH}template/images/reddit_logo.png"/>
|
||||
<input class="enable" style="display:none;" type="checkbox" name="reddit[enabled]" {if $reddit.enabled}checked="checked"{/if}/>
|
||||
<label title="{if $pinterest.enabled}{'Disable'|translate}{else}{'Enable'|translate}{/if}">
|
||||
<img src="{$SOCIALBUTT_PATH}template/images/pinterest_logo.png"/>
|
||||
<input class="enable" style="display:none;" type="checkbox" name="pinterest[enabled]" {if $pinterest.enabled}checked="checked"{/if}/>
|
||||
</label>
|
||||
</td></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="property">
|
||||
<tr class="property not-light">
|
||||
<td>
|
||||
{'Button type'|@translate}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="button">
|
||||
<td><label>
|
||||
<img src="http://fr.reddit.com/static/spreddit7.gif"/>
|
||||
<input type="radio" name="reddit[type]" value="spreddit7" {if $reddit.type=='spreddit7'}checked="checked"{/if}/>
|
||||
</label></td>
|
||||
<td><label>
|
||||
<input type="radio" name="reddit[type]" value="spreddit6" {if $reddit.type=='spreddit6'}checked="checked"{/if}/>
|
||||
<img src="http://fr.reddit.com/static/spreddit6.gif"/>
|
||||
</label></td>
|
||||
</tr>
|
||||
<tr class="button">
|
||||
<td><label>
|
||||
<img src="http://fr.reddit.com/static/spreddit1.gif"/>
|
||||
<input type="radio" name="reddit[type]" value="spreddit1" {if $reddit.type=='spreddit1'}checked="checked"{/if}/>
|
||||
</label></td>
|
||||
<td><label>
|
||||
<input type="radio" name="reddit[type]" value="interactive" {if $reddit.type=='interactive'}checked="checked"{/if}/>
|
||||
<img src="{$SOCIALBUTT_PATH}template/images/reddit_interactive.png"/>
|
||||
</label></td>
|
||||
</tr>
|
||||
<tr class="property">
|
||||
<td>
|
||||
<label for="reddit_community">{'Community'|@translate}</label>
|
||||
{'Annotation'|translate}
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id="reddit_community" name="reddit[community]" value="{$reddit.community}"/>
|
||||
<label><input type="radio" name="pinterest[layout]" value="none" {if $pinterest.layout=='none'}checked="checked"{/if}/> {'None'|translate}</label><br>
|
||||
<label><input type="radio" name="pinterest[layout]" value="horizontal" {if $pinterest.layout=='horizontal'}checked="checked"{/if}/> {'Right bubble'|translate}</label><br>
|
||||
<label><input type="radio" name="pinterest[layout]" value="vertical" {if $pinterest.layout=='vertical'}checked="checked"{/if}/> {'Top bubble'|translate}</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> {* <!-- reddit --> *}
|
||||
</div> {* <!-- pinterest --> *}
|
||||
|
||||
<br>
|
||||
|
||||
@@ -295,7 +254,7 @@ jQuery(".showInfo").tipTip({
|
||||
<table>
|
||||
<thead>
|
||||
<tr><td colspan="2">
|
||||
<label title="{if $tumblr.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
|
||||
<label title="{if $tumblr.enabled}{'Disable'|translate}{else}{'Enable'|translate}{/if}">
|
||||
<img src="{$SOCIALBUTT_PATH}template/images/tumblr_logo.png"/>
|
||||
<input class="enable" style="display:none;" type="checkbox" name="tumblr[enabled]" {if $tumblr.enabled}checked="checked"{/if}/>
|
||||
</label>
|
||||
@@ -304,7 +263,7 @@ jQuery(".showInfo").tipTip({
|
||||
<tbody>
|
||||
<tr class="property">
|
||||
<td>
|
||||
{'Button type'|@translate}
|
||||
{'Button type'|translate}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@@ -352,36 +311,60 @@ jQuery(".showInfo").tipTip({
|
||||
</table>
|
||||
</div> {* <!-- tumblr --> *}
|
||||
|
||||
<div class="socialbutt {if not $pinterest.enabled}disabled{else}enabled{/if}"> {* <!-- pinterest --> *}
|
||||
<div class="socialbutt {if not $reddit.enabled}disabled{else}enabled{/if}"> {* <!-- reddit --> *}
|
||||
<table>
|
||||
<thead>
|
||||
<tr><td colspan="2">
|
||||
<label title="{if $pinterest.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
|
||||
<img src="{$SOCIALBUTT_PATH}template/images/pinterest_logo.png"/>
|
||||
<input class="enable" style="display:none;" type="checkbox" name="pinterest[enabled]" {if $pinterest.enabled}checked="checked"{/if}/>
|
||||
<label title="{if $reddit.enabled}{'Disable'|translate}{else}{'Enable'|translate}{/if}">
|
||||
<img src="{$SOCIALBUTT_PATH}template/images/reddit_logo.png"/>
|
||||
<input class="enable" style="display:none;" type="checkbox" name="reddit[enabled]" {if $reddit.enabled}checked="checked"{/if}/>
|
||||
</label>
|
||||
</td></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="property not-light">
|
||||
<tr class="property">
|
||||
<td>
|
||||
{'Annotation'|@translate}
|
||||
{'Button type'|translate}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="button">
|
||||
<td><label>
|
||||
<img src="http://fr.reddit.com/static/spreddit7.gif"/>
|
||||
<input type="radio" name="reddit[type]" value="spreddit7" {if $reddit.type=='spreddit7'}checked="checked"{/if}/>
|
||||
</label></td>
|
||||
<td><label>
|
||||
<input type="radio" name="reddit[type]" value="spreddit6" {if $reddit.type=='spreddit6'}checked="checked"{/if}/>
|
||||
<img src="http://fr.reddit.com/static/spreddit6.gif"/>
|
||||
</label></td>
|
||||
</tr>
|
||||
<tr class="button">
|
||||
<td><label>
|
||||
<img src="http://fr.reddit.com/static/spreddit1.gif"/>
|
||||
<input type="radio" name="reddit[type]" value="spreddit1" {if $reddit.type=='spreddit1'}checked="checked"{/if}/>
|
||||
</label></td>
|
||||
<td><label>
|
||||
<input type="radio" name="reddit[type]" value="interactive" {if $reddit.type=='interactive'}checked="checked"{/if}/>
|
||||
<img src="{$SOCIALBUTT_PATH}template/images/reddit_interactive.png"/>
|
||||
</label></td>
|
||||
</tr>
|
||||
<tr class="property">
|
||||
<td>
|
||||
<label for="reddit_community">{'Community'|translate}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label><input type="radio" name="pinterest[layout]" value="none" {if $pinterest.layout=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br>
|
||||
<label><input type="radio" name="pinterest[layout]" value="horizontal" {if $pinterest.layout=='horizontal'}checked="checked"{/if}/> {'Right bubble'|@translate}</label><br>
|
||||
<label><input type="radio" name="pinterest[layout]" value="vertical" {if $pinterest.layout=='vertical'}checked="checked"{/if}/> {'Top bubble'|@translate}</label>
|
||||
<input type="text" id="reddit_community" name="reddit[community]" value="{$reddit.community}"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> {* <!-- pinterest --> *}
|
||||
</div> {* <!-- reddit --> *}
|
||||
|
||||
<div class="socialbutt {if not $linkedin.enabled}disabled{else}enabled{/if}"> {* <!-- linkedin --> *}
|
||||
<table>
|
||||
<thead>
|
||||
<tr><td colspan="2">
|
||||
<label title="{if $linkedin.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}">
|
||||
<label title="{if $linkedin.enabled}{'Disable'|translate}{else}{'Enable'|translate}{/if}">
|
||||
<img src="{$SOCIALBUTT_PATH}template/images/linkedin_logo.png"/>
|
||||
<input class="enable" style="display:none;" type="checkbox" name="linkedin[enabled]" {if $linkedin.enabled}checked="checked"{/if}/>
|
||||
</label>
|
||||
@@ -390,12 +373,12 @@ jQuery(".showInfo").tipTip({
|
||||
<tbody>
|
||||
<tr class="property not-light">
|
||||
<td>
|
||||
{'Annotation'|@translate}
|
||||
{'Annotation'|translate}
|
||||
</td>
|
||||
<td>
|
||||
<label><input type="radio" name="linkedin[counter]" value="none" {if $linkedin.counter=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br>
|
||||
<label><input type="radio" name="linkedin[counter]" value="right" {if $linkedin.counter=='right'}checked="checked"{/if}/> {'Right bubble'|@translate}</label><br>
|
||||
<label><input type="radio" name="linkedin[counter]" value="top" {if $linkedin.counter=='top'}checked="checked"{/if}/> {'Top bubble'|@translate}</label>
|
||||
<label><input type="radio" name="linkedin[counter]" value="none" {if $linkedin.counter=='none'}checked="checked"{/if}/> {'None'|translate}</label><br>
|
||||
<label><input type="radio" name="linkedin[counter]" value="right" {if $linkedin.counter=='right'}checked="checked"{/if}/> {'Right bubble'|translate}</label><br>
|
||||
<label><input type="radio" name="linkedin[counter]" value="top" {if $linkedin.counter=='top'}checked="checked"{/if}/> {'Top bubble'|translate}</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -405,7 +388,7 @@ jQuery(".showInfo").tipTip({
|
||||
<br>
|
||||
|
||||
<div class="submit">
|
||||
<input type="submit" value="{'Save Settings'|@translate}" name="submit"/>
|
||||
<input type="submit" value="{'Save Settings'|translate}" name="submit"/>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
@@ -7,11 +7,11 @@
|
||||
&p[summary]={$CONTENT_DESCRIPTION|cat:$SOCIALBUTT.copyright|urlencode}"
|
||||
{/if}
|
||||
onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=500');return false;" target="_blank" rel="nofollow">
|
||||
<img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/facebook_{$SOCIALBUTT.FACEBOOK.color}.png" alt="Facebook"></a>
|
||||
<img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/facebook.png" alt="Facebook"></a>
|
||||
{else}
|
||||
{footer_script}jQuery('body').prepend('<div id="fb-root"></div>');{/footer_script}
|
||||
{footer_script require='jquery'}jQuery('body').prepend('<div id="fb-root"></div>');{/footer_script}
|
||||
{combine_script id='facebook_jssdk' load='footer' path='https://connect.facebook.net/'|cat:$SOCIALBUTT.FACEBOOK.lang|cat:'/all.js#xfbml=1'}
|
||||
<div style="display:inline-block;" class="fb-like" data-send="false" data-show-faces="false"
|
||||
data-href="{$SOCIALBUTT.share_url}" data-layout="{$SOCIALBUTT.FACEBOOK.layout}" data-colorscheme="{$SOCIALBUTT.FACEBOOK.color}"></div>
|
||||
data-href="{$SOCIALBUTT.share_url}" data-layout="{$SOCIALBUTT.FACEBOOK.layout}"></div>
|
||||
{/if}
|
||||
{/strip}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 624 B |
Binary file not shown.
|
Before Width: | Height: | Size: 693 B |
@@ -5,7 +5,7 @@
|
||||
<img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/linkedin.png" alt="LinkedIn"></a>
|
||||
{else}
|
||||
{combine_script id='linkedin_share' load='footer' path='https://platform.linkedin.com/in.js'}
|
||||
<script type="text/javascript">lang: {$SOCIALBUTT.LINKEDIN.lang}</script>
|
||||
<script type="text/javascript">lang: '{$SOCIALBUTT.LINKEDIN.lang}'</script>
|
||||
<script type="IN/Share" data-url="{$SOCIALBUTT.share_url}" data-counter="{$SOCIALBUTT.TWITTER.counter}" data-title="{$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE}"></script>
|
||||
{/if}
|
||||
{/strip}
|
||||
@@ -115,15 +115,4 @@
|
||||
}
|
||||
.socialbutt.enabled thead label:before {
|
||||
content:"\2611";
|
||||
}
|
||||
|
||||
|
||||
.showInfo {
|
||||
position:static;
|
||||
display:inline-block;
|
||||
padding:1px 6px;
|
||||
width:4px;
|
||||
height:14px;
|
||||
line-height:14px;
|
||||
font-size:0.8em;
|
||||
}
|
||||
Reference in New Issue
Block a user