diff --git a/admin.php b/admin.php index 8c559a0..80042f2 100644 --- a/admin.php +++ b/admin.php @@ -42,6 +42,10 @@ if (isset($_POST['submit'])) 'type' => $_POST['reddit']['type'], 'community' => $_POST['reddit']['community'], ), + 'linkedin' => array( + 'enabled' => isset($_POST['linkedin']['enabled']), + 'counter' => $_POST['linkedin']['counter'], + ), ); conf_update_param('SocialButtons', serialize($conf['SocialButtons'])); diff --git a/include/install.inc.php b/include/install.inc.php index fde72fa..113b462 100644 --- a/include/install.inc.php +++ b/include/install.inc.php @@ -41,6 +41,10 @@ function socialbutt_install() 'type' => 'interactive', 'community' => null, ), + 'linkedin' => array( + 'enabled' => true, + 'counter' => 'right', + ), ); if (isset($conf['TumblrShare'])) @@ -87,6 +91,14 @@ function socialbutt_install() ); } + if (empty($new_conf['linkedin'])) + { + $new_conf['linkedin'] = array( + 'enabled' => false, + 'counter' => 'right', + ); + } + if (!isset($new_conf['on_index'])) { $new_conf['on_index'] = true; diff --git a/include/linkedin.inc.php b/include/linkedin.inc.php new file mode 100644 index 0000000..ef580e2 --- /dev/null +++ b/include/linkedin.inc.php @@ -0,0 +1,42 @@ +set_filename('linkedin_button', realpath(SOCIALBUTT_PATH .'template/linkedin.tpl')); + $buttons[] = 'linkedin_button'; +} + +?> \ No newline at end of file diff --git a/main.inc.php b/main.inc.php index e13618e..c290a63 100644 --- a/main.inc.php +++ b/main.inc.php @@ -171,6 +171,11 @@ function socialbutt_add_button() include_once(SOCIALBUTT_PATH . 'include/reddit.inc.php'); socialbutt_reddit($basename, $root_url, $tpl_vars, $buttons); } + if ($conf['SocialButtons']['linkedin']['enabled']) + { + include_once(SOCIALBUTT_PATH . 'include/linkedin.inc.php'); + socialbutt_linkedin($basename, $root_url, $tpl_vars, $buttons); + } unset_make_full_url(); diff --git a/template/admin.tpl b/template/admin.tpl index 3488add..aa54ad9 100644 --- a/template/admin.tpl +++ b/template/admin.tpl @@ -377,6 +377,31 @@ jQuery(".showInfo").tipTip({ {* *} +
{* *} + + + + + + + + + + +
+ +
+ {'Annotation'|@translate} + +
+
+ +
+
{* *} +
diff --git a/template/facebook.tpl b/template/facebook.tpl index 9b4125b..0fcf0a8 100644 --- a/template/facebook.tpl +++ b/template/facebook.tpl @@ -1,12 +1,13 @@ {strip} {if $SOCIALBUTT.light} + - Share on Facebook + Facebook {else} {footer_script}jQuery('body').prepend('
');{/footer_script} {combine_script id='facebook_jssdk' load='footer' path='https://connect.facebook.net/'|cat:$SOCIALBUTT.FACEBOOK.lang|cat:'/all.js#xfbml=1'} diff --git a/template/google.tpl b/template/google.tpl index b9f6bd6..635c74f 100644 --- a/template/google.tpl +++ b/template/google.tpl @@ -1,8 +1,8 @@ {strip} {if $SOCIALBUTT.light} - - Share on Google+ + + Google+ {else} {combine_script id='google_plusone' load='footer' path='https://apis.google.com/js/plusone.js'} diff --git a/template/images/linkedin.png b/template/images/linkedin.png new file mode 100644 index 0000000..8e51f07 Binary files /dev/null and b/template/images/linkedin.png differ diff --git a/template/images/linkedin_logo.png b/template/images/linkedin_logo.png new file mode 100644 index 0000000..0c39685 Binary files /dev/null and b/template/images/linkedin_logo.png differ diff --git a/template/linkedin.tpl b/template/linkedin.tpl new file mode 100644 index 0000000..336c61a --- /dev/null +++ b/template/linkedin.tpl @@ -0,0 +1,11 @@ +{strip} +{if $SOCIALBUTT.light} + + LinkedIn +{else} + {combine_script id='linkedin_share' load='footer' path='https://platform.linkedin.com/in.js'} + + +{/if} +{/strip} \ No newline at end of file diff --git a/template/pinterest.tpl b/template/pinterest.tpl index 941f018..7ae5504 100644 --- a/template/pinterest.tpl +++ b/template/pinterest.tpl @@ -1,9 +1,9 @@ {strip} - diff --git a/template/reddit.tpl b/template/reddit.tpl index d4ecf8d..d279c94 100644 --- a/template/reddit.tpl +++ b/template/reddit.tpl @@ -8,7 +8,7 @@ {else} - - Submit to reddit + + reddit {/if} {/strip} \ No newline at end of file diff --git a/template/tumblr.tpl b/template/tumblr.tpl index 9b292fe..b44f7d6 100644 --- a/template/tumblr.tpl +++ b/template/tumblr.tpl @@ -1,14 +1,14 @@ {strip} {if $SOCIALBUTT.basename=='picture'} {capture assign="inline_tags"}{foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first},{/if}{$tag.name}{/foreach}{/capture} - Share on Tumblr +>Tumblr {/strip} \ No newline at end of file diff --git a/template/twitter.tpl b/template/twitter.tpl index 3a36e75..eb5c05d 100644 --- a/template/twitter.tpl +++ b/template/twitter.tpl @@ -1,11 +1,11 @@ {strip} -Share on Twitter +>Twitter {/strip} \ No newline at end of file