Index: /extensions/SocialButtons/admin.php
===================================================================
--- /extensions/SocialButtons/admin.php	(revision 25177)
+++ /extensions/SocialButtons/admin.php	(revision 25178)
@@ -43,4 +43,8 @@
       'community' => $_POST['reddit']['community'],
       ),
+    'linkedin' => array(
+      'enabled' => isset($_POST['linkedin']['enabled']),
+      'counter' => $_POST['linkedin']['counter'],
+      ),
     );
   
Index: /extensions/SocialButtons/include/install.inc.php
===================================================================
--- /extensions/SocialButtons/include/install.inc.php	(revision 25177)
+++ /extensions/SocialButtons/include/install.inc.php	(revision 25178)
@@ -41,4 +41,8 @@
         'type' => 'interactive',
         'community' => null,
+        ),
+      'linkedin' => array(
+        'enabled' => true,
+        'counter' => 'right',
         ),
       );
@@ -88,4 +92,12 @@
     }
     
+    if (empty($new_conf['linkedin']))
+    {
+      $new_conf['linkedin'] = array(
+        'enabled' => false,
+        'counter' => 'right',
+        );
+    }
+    
     if (!isset($new_conf['on_index']))
     {
Index: /extensions/SocialButtons/include/linkedin.inc.php
===================================================================
--- /extensions/SocialButtons/include/linkedin.inc.php	(revision 25178)
+++ /extensions/SocialButtons/include/linkedin.inc.php	(revision 25178)
@@ -0,0 +1,42 @@
+<?php
+defined('SOCIALBUTT_PATH') or die('Hacking attempt!');
+
+function socialbutt_linkedin($basename, $root_url, &$tpl_vars, &$buttons) 
+{
+  global $conf, $template, $user;
+  
+  $linkedin_langs = array(
+    'en_US','fr_FR','es_ES','ru_RU','de_DE','it_IT','pt_BR','ro_RO','tr_TR','ja_JP',
+    'in_ID','ms_MY','ko_KR','sv_SE','cs_CZ','nl_NL','pl_PL','no_NO','da_DK'
+    );
+  
+  
+  // if the link is in the toolbar, we must use smaller buttons
+  if ($conf['SocialButtons']['position'] == 'index' or $conf['SocialButtons']['position'] == 'toolbar')
+  {
+    if ($conf['SocialButtons']['linkedin']['counter'] == 'top')
+    {
+      $conf['SocialButtons']['linkedin']['counter'] = 'right';
+    }
+  }
+  
+  
+  // config
+  $tpl_vars['LINKEDIN'] = $conf['SocialButtons']['linkedin'];
+  
+  // button language
+  if ( in_array($user['language'], $linkedin_langs) )
+  {
+    $tpl_vars['LINKEDIN']['lang'] = $user['language'];
+  }
+  else
+  {
+    $tpl_vars['LINKEDIN']['lang'] = 'en_US';
+  }
+  
+  
+  $template->set_filename('linkedin_button', realpath(SOCIALBUTT_PATH .'template/linkedin.tpl'));
+  $buttons[] = 'linkedin_button';
+}
+
+?>
Index: /extensions/SocialButtons/main.inc.php
===================================================================
--- /extensions/SocialButtons/main.inc.php	(revision 25177)
+++ /extensions/SocialButtons/main.inc.php	(revision 25178)
@@ -172,4 +172,9 @@
     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();
Index: /extensions/SocialButtons/template/admin.tpl
===================================================================
--- /extensions/SocialButtons/template/admin.tpl	(revision 25177)
+++ /extensions/SocialButtons/template/admin.tpl	(revision 25178)
@@ -378,4 +378,29 @@
 </div> {* <!-- pinterest --> *}
 
+<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}">
+        <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>
+    </td></tr>
+  </thead>
+  <tbody>
+    <tr class="property not-light">
+      <td>
+        {'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>
+      </td>
+    </tr>
+  </tbody>
+</table>
+</div> {* <!-- linkedin --> *}
+
 <br>
 
Index: /extensions/SocialButtons/template/facebook.tpl
===================================================================
--- /extensions/SocialButtons/template/facebook.tpl	(revision 25177)
+++ /extensions/SocialButtons/template/facebook.tpl	(revision 25178)
@@ -1,11 +1,12 @@
 {strip}
 {if $SOCIALBUTT.light}
+  <a title="Share on Facebook" href="http://www.facebook.com/sharer.php?s=100&p[url]={$SOCIALBUTT.share_url|urlencode}&p[title]={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}
   {if $SOCIALBUTT.basename=='picture'}
-    <a href="http://www.facebook.com/sharer.php?s=100&p[url]={$SOCIALBUTT.share_url|urlencode}&p[title]={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}&p[summary]={$COMMENT_IMG|cat:$SOCIALBUTT.copyright|urlencode}&p[images][0]={$SOCIALBUTT.source|urlencode}"
+    &p[summary]={$COMMENT_IMG|cat:$SOCIALBUTT.copyright|urlencode}&p[images][0]={$SOCIALBUTT.source|urlencode}"
   {else}
-    <a href="http://www.facebook.com/sharer.php?s=100&p[url]={$SOCIALBUTT.share_url|urlencode}&p[title]={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}&p[summary]={$CONTENT_DESCRIPTION|cat:$SOCIALBUTT.copyright|urlencode}"
+    &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="Share on Facebook"></a>
+    <img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/facebook_{$SOCIALBUTT.FACEBOOK.color}.png" alt="Facebook"></a>
 {else}
   {footer_script}jQuery('body').prepend('<div id="fb-root"></div>');{/footer_script}
Index: /extensions/SocialButtons/template/google.tpl
===================================================================
--- /extensions/SocialButtons/template/google.tpl	(revision 25177)
+++ /extensions/SocialButtons/template/google.tpl	(revision 25178)
@@ -1,7 +1,7 @@
 {strip}
 {if $SOCIALBUTT.light}
-  <a title="Google +" href="https://plus.google.com/share?url={$SOCIALBUTT.share_url|urlencode}&hl={$SOCIALBUTT.GOOGLE.lang}" rel="nofollow" 
-    onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=390,width=480');return false;" target="_blank">
-    <img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/google_{$SOCIALBUTT.GOOGLE.size}.png" alt="Share on Google+"></a>
+  <a title="Share on Google +" href="https://plus.google.com/share?url={$SOCIALBUTT.share_url|urlencode}&hl={$SOCIALBUTT.GOOGLE.lang}" 
+    onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=390,width=480');return false;" target="_blank" rel="nofollow">
+    <img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/google_{$SOCIALBUTT.GOOGLE.size}.png" alt="Google+"></a>
 {else}
   {combine_script id='google_plusone' load='footer' path='https://apis.google.com/js/plusone.js'}
Index: /extensions/SocialButtons/template/linkedin.tpl
===================================================================
--- /extensions/SocialButtons/template/linkedin.tpl	(revision 25178)
+++ /extensions/SocialButtons/template/linkedin.tpl	(revision 25178)
@@ -0,0 +1,11 @@
+{strip}
+{if $SOCIALBUTT.light}
+  <a title="Share on LinkedIn" href="https://www.linkedin.com/shareArticle?url={$SOCIALBUTT.share_url|urlencode}&title={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE}"
+    onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=390,width=480');return false;" target="_blank" rel="nofollow">
+    <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="IN/Share" data-url="{$SOCIALBUTT.share_url}" data-counter="{$SOCIALBUTT.TWITTER.counter}" data-title="{$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE}"></script>
+{/if}
+{/strip}
Index: /extensions/SocialButtons/template/pinterest.tpl
===================================================================
--- /extensions/SocialButtons/template/pinterest.tpl	(revision 25177)
+++ /extensions/SocialButtons/template/pinterest.tpl	(revision 25178)
@@ -1,8 +1,8 @@
 {strip}
-<a href="http://pinterest.com/pin/create/button/?url={$SOCIALBUTT.share_url|urlencode}&media={$SOCIALBUTT.source|urlencode}&description={$PAGE_TITLE|cat:' '|cat:$SOCIALBUTT.copyright|urlencode}" rel="nofollow"
+<a title="Share on Pinterest" href="http://pinterest.com/pin/create/button/?url={$SOCIALBUTT.share_url|urlencode}&media={$SOCIALBUTT.source|urlencode}&description={$PAGE_TITLE|cat:' '|cat:$SOCIALBUTT.copyright|urlencode}"
 {if $SOCIALBUTT.light}
-  onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=470,width=600');return false;" target="_blank"
+  onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=470,width=600');return false;" target="_blank" rel="nofollow"
 {else}
-  class="pin-it-button" count-layout="{$SOCIALBUTT.PINTEREST.layout}"
+  class="pin-it-button" count-layout="{$SOCIALBUTT.PINTEREST.layout}" rel="nofollow"
   {combine_script id='pinterest_pinit' load='footer' path='https://assets.pinterest.com/js/pinit.js'}
 {/if}
Index: /extensions/SocialButtons/template/reddit.tpl
===================================================================
--- /extensions/SocialButtons/template/reddit.tpl	(revision 25177)
+++ /extensions/SocialButtons/template/reddit.tpl	(revision 25178)
@@ -9,6 +9,6 @@
   <script type="text/javascript" src="http://{$SOCIALBUTT.REDDIT.lang}.reddit.com/static/button/button1.js"></script>
 {else}
-  <a href="http://{$SOCIALBUTT.REDDIT.lang}.reddit.com/submit?url={$SOCIALBUTT.share_url|urlencode}&title={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}&target={$SOCIALBUTT.REDDIT.community|urlencode}" rel="nofollow" target="_blank">
-    <img src="http://www.reddit.com/static/{$SOCIALBUTT.REDDIT.type}.gif" alt="Submit to reddit"></a>
+  <a title="Share on reddit" href="http://{$SOCIALBUTT.REDDIT.lang}.reddit.com/submit?url={$SOCIALBUTT.share_url|urlencode}&title={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}&target={$SOCIALBUTT.REDDIT.community|urlencode}" rel="nofollow" target="_blank">
+    <img src="http://www.reddit.com/static/{$SOCIALBUTT.REDDIT.type}.gif" alt="reddit"></a>
 {/if}
 {/strip}
Index: /extensions/SocialButtons/template/tumblr.tpl
===================================================================
--- /extensions/SocialButtons/template/tumblr.tpl	(revision 25177)
+++ /extensions/SocialButtons/template/tumblr.tpl	(revision 25178)
@@ -2,7 +2,7 @@
 {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}
-  <a href="http://www.tumblr.com/share/photo?source={$SOCIALBUTT.source|urlencode}&caption={$PAGE_TITLE|cat:' '|cat:$SOCIALBUTT.copyright|urlencode}&clickthru={$SOCIALBUTT.share_url|urlencode}&tags={$inline_tags|urlencode}"
+  <a title="Share on tumblr" href="http://www.tumblr.com/share/photo?source={$SOCIALBUTT.source|urlencode}&caption={$PAGE_TITLE|cat:' '|cat:$SOCIALBUTT.copyright|urlencode}&clickthru={$SOCIALBUTT.share_url|urlencode}&tags={$inline_tags|urlencode}"
 {else}
-  <a href="http://www.tumblr.com/share/link?url={$SOCIALBUTT.share_url|urlencode}&name={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}&description={$CONTENT_DESCRIPTION|cat:$SOCIALBUTT.copyright|urlencode}"
+  <a title="Share on tumblr" href="http://www.tumblr.com/share/link?url={$SOCIALBUTT.share_url|urlencode}&name={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}&description={$CONTENT_DESCRIPTION|cat:$SOCIALBUTT.copyright|urlencode}"
 {/if}
 {if $SOCIALBUTT.light}
@@ -11,4 +11,4 @@
   {combine_script id='tumblr_share' load='footer' path='http://platform.tumblr.com/v1/share.js'}
 {/if}
-><img src="http://platform.tumblr.com/v1/{$SOCIALBUTT.TUMBLR.type}.png" alt="Share on Tumblr"></a>
+><img src="http://platform.tumblr.com/v1/{$SOCIALBUTT.TUMBLR.type}.png" alt="Tumblr"></a>
 {/strip}
Index: /extensions/SocialButtons/template/twitter.tpl
===================================================================
--- /extensions/SocialButtons/template/twitter.tpl	(revision 25177)
+++ /extensions/SocialButtons/template/twitter.tpl	(revision 25178)
@@ -1,11 +1,11 @@
 {strip}
-<a href="https://twitter.com/share?url={$SOCIALBUTT.share_url|urlencode}&text={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}{if $SOCIALBUTT.TWITTER.via}&via={$SOCIALBUTT.TWITTER.via}{/if}" rel="nofollow"
+<a title="Share on Twitter" href="https://twitter.com/share?url={$SOCIALBUTT.share_url|urlencode}&text={$PAGE_TITLE|cat:' | '|cat:$GALLERY_TITLE|urlencode}{if $SOCIALBUTT.TWITTER.via}&via={$SOCIALBUTT.TWITTER.via}{/if}"
 {if $SOCIALBUTT.light}
-  onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=470,width=600');return false;" target="_blank"
+  onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=470,width=600');return false;" target="_blank" rel="nofollow"
 {else}
   data-url="{$SOCIALBUTT.share_url}" data-lang="{$SOCIALBUTT.TWITTER.lang}" data-via="{$SOCIALBUTT.TWITTER.via}"
-  data-size="{$SOCIALBUTT.TWITTER.size}" data-count="{$SOCIALBUTT.TWITTER.count}" class="twitter-share-button"
+  data-size="{$SOCIALBUTT.TWITTER.size}" data-count="{$SOCIALBUTT.TWITTER.count}" class="twitter-share-button" rel="nofollow"
   {combine_script id='twitter_widgets' load='footer' path='https://platform.twitter.com/widgets.js'}
 {/if}
-><img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/twitter_{$SOCIALBUTT.TWITTER.size}.png" alt="Share on Twitter"></a>
+><img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/twitter_{$SOCIALBUTT.TWITTER.size}.png" alt="Twitter"></a>
 {/strip}
