Changeset 25178


Ignore:
Timestamp:
10/27/13 15:34:59 (6 years ago)
Author:
mistic100
Message:

add linkedin

Location:
extensions/SocialButtons
Files:
4 added
10 edited

Legend:

Unmodified
Added
Removed
  • extensions/SocialButtons/admin.php

    r24788 r25178  
    4343      'community' => $_POST['reddit']['community'], 
    4444      ), 
     45    'linkedin' => array( 
     46      'enabled' => isset($_POST['linkedin']['enabled']), 
     47      'counter' => $_POST['linkedin']['counter'], 
     48      ), 
    4549    ); 
    4650   
  • extensions/SocialButtons/include/install.inc.php

    r24788 r25178  
    4141        'type' => 'interactive', 
    4242        'community' => null, 
     43        ), 
     44      'linkedin' => array( 
     45        'enabled' => true, 
     46        'counter' => 'right', 
    4347        ), 
    4448      ); 
     
    8892    } 
    8993     
     94    if (empty($new_conf['linkedin'])) 
     95    { 
     96      $new_conf['linkedin'] = array( 
     97        'enabled' => false, 
     98        'counter' => 'right', 
     99        ); 
     100    } 
     101     
    90102    if (!isset($new_conf['on_index'])) 
    91103    { 
  • extensions/SocialButtons/main.inc.php

    r24788 r25178  
    172172    socialbutt_reddit($basename, $root_url, $tpl_vars, $buttons); 
    173173  } 
     174  if ($conf['SocialButtons']['linkedin']['enabled']) 
     175  { 
     176    include_once(SOCIALBUTT_PATH . 'include/linkedin.inc.php'); 
     177    socialbutt_linkedin($basename, $root_url, $tpl_vars, $buttons); 
     178  } 
    174179   
    175180  unset_make_full_url(); 
  • extensions/SocialButtons/template/admin.tpl

    r24788 r25178  
    378378</div> {* <!-- pinterest --> *} 
    379379 
     380<div class="socialbutt {if not $linkedin.enabled}disabled{else}enabled{/if}"> {* <!-- linkedin --> *} 
     381<table> 
     382  <thead> 
     383    <tr><td colspan="2"> 
     384      <label title="{if $linkedin.enabled}{'Disable'|@translate}{else}{'Enable'|@translate}{/if}"> 
     385        <img src="{$SOCIALBUTT_PATH}template/images/linkedin_logo.png"/> 
     386        <input class="enable" style="display:none;" type="checkbox" name="linkedin[enabled]" {if $linkedin.enabled}checked="checked"{/if}/> 
     387      </label> 
     388    </td></tr> 
     389  </thead> 
     390  <tbody> 
     391    <tr class="property not-light"> 
     392      <td> 
     393        {'Annotation'|@translate} 
     394      </td> 
     395      <td> 
     396        <label><input type="radio" name="linkedin[counter]" value="none" {if $linkedin.counter=='none'}checked="checked"{/if}/> {'None'|@translate}</label><br> 
     397        <label><input type="radio" name="linkedin[counter]" value="right" {if $linkedin.counter=='right'}checked="checked"{/if}/> {'Right bubble'|@translate}</label><br> 
     398        <label><input type="radio" name="linkedin[counter]" value="top" {if $linkedin.counter=='top'}checked="checked"{/if}/> {'Top bubble'|@translate}</label> 
     399      </td> 
     400    </tr> 
     401  </tbody> 
     402</table> 
     403</div> {* <!-- linkedin --> *} 
     404 
    380405<br> 
    381406 
  • extensions/SocialButtons/template/facebook.tpl

    r24878 r25178  
    11{strip} 
    22{if $SOCIALBUTT.light} 
     3  <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} 
    34  {if $SOCIALBUTT.basename=='picture'} 
    4     <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}" 
     5    &p[summary]={$COMMENT_IMG|cat:$SOCIALBUTT.copyright|urlencode}&p[images][0]={$SOCIALBUTT.source|urlencode}" 
    56  {else} 
    6     <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}" 
     7    &p[summary]={$CONTENT_DESCRIPTION|cat:$SOCIALBUTT.copyright|urlencode}" 
    78  {/if} 
    89    onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=500');return false;" target="_blank" rel="nofollow"> 
    9     <img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/facebook_{$SOCIALBUTT.FACEBOOK.color}.png" alt="Share on Facebook"></a> 
     10    <img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/facebook_{$SOCIALBUTT.FACEBOOK.color}.png" alt="Facebook"></a> 
    1011{else} 
    1112  {footer_script}jQuery('body').prepend('<div id="fb-root"></div>');{/footer_script} 
  • extensions/SocialButtons/template/google.tpl

    r24878 r25178  
    11{strip} 
    22{if $SOCIALBUTT.light} 
    3   <a title="Google +" href="https://plus.google.com/share?url={$SOCIALBUTT.share_url|urlencode}&hl={$SOCIALBUTT.GOOGLE.lang}" rel="nofollow"  
    4     onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=390,width=480');return false;" target="_blank"> 
    5     <img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/google_{$SOCIALBUTT.GOOGLE.size}.png" alt="Share on Google+"></a> 
     3  <a title="Share on Google +" href="https://plus.google.com/share?url={$SOCIALBUTT.share_url|urlencode}&hl={$SOCIALBUTT.GOOGLE.lang}"  
     4    onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=390,width=480');return false;" target="_blank" rel="nofollow"> 
     5    <img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/google_{$SOCIALBUTT.GOOGLE.size}.png" alt="Google+"></a> 
    66{else} 
    77  {combine_script id='google_plusone' load='footer' path='https://apis.google.com/js/plusone.js'} 
  • extensions/SocialButtons/template/pinterest.tpl

    r24878 r25178  
    11{strip} 
    2 <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" 
     2<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}" 
    33{if $SOCIALBUTT.light} 
    4   onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=470,width=600');return false;" target="_blank" 
     4  onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=470,width=600');return false;" target="_blank" rel="nofollow" 
    55{else} 
    6   class="pin-it-button" count-layout="{$SOCIALBUTT.PINTEREST.layout}" 
     6  class="pin-it-button" count-layout="{$SOCIALBUTT.PINTEREST.layout}" rel="nofollow" 
    77  {combine_script id='pinterest_pinit' load='footer' path='https://assets.pinterest.com/js/pinit.js'} 
    88{/if} 
  • extensions/SocialButtons/template/reddit.tpl

    r24788 r25178  
    99  <script type="text/javascript" src="http://{$SOCIALBUTT.REDDIT.lang}.reddit.com/static/button/button1.js"></script> 
    1010{else} 
    11   <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"> 
    12     <img src="http://www.reddit.com/static/{$SOCIALBUTT.REDDIT.type}.gif" alt="Submit to reddit"></a> 
     11  <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"> 
     12    <img src="http://www.reddit.com/static/{$SOCIALBUTT.REDDIT.type}.gif" alt="reddit"></a> 
    1313{/if} 
    1414{/strip} 
  • extensions/SocialButtons/template/tumblr.tpl

    r24878 r25178  
    22{if $SOCIALBUTT.basename=='picture'} 
    33  {capture assign="inline_tags"}{foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first},{/if}{$tag.name}{/foreach}{/capture} 
    4   <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}" 
     4  <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}" 
    55{else} 
    6   <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}" 
     6  <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}" 
    77{/if} 
    88{if $SOCIALBUTT.light} 
     
    1111  {combine_script id='tumblr_share' load='footer' path='http://platform.tumblr.com/v1/share.js'} 
    1212{/if} 
    13 ><img src="http://platform.tumblr.com/v1/{$SOCIALBUTT.TUMBLR.type}.png" alt="Share on Tumblr"></a> 
     13><img src="http://platform.tumblr.com/v1/{$SOCIALBUTT.TUMBLR.type}.png" alt="Tumblr"></a> 
    1414{/strip} 
  • extensions/SocialButtons/template/twitter.tpl

    r24878 r25178  
    11{strip} 
    2 <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" 
     2<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}" 
    33{if $SOCIALBUTT.light} 
    4   onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=470,width=600');return false;" target="_blank" 
     4  onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=470,width=600');return false;" target="_blank" rel="nofollow" 
    55{else} 
    66  data-url="{$SOCIALBUTT.share_url}" data-lang="{$SOCIALBUTT.TWITTER.lang}" data-via="{$SOCIALBUTT.TWITTER.via}" 
    7   data-size="{$SOCIALBUTT.TWITTER.size}" data-count="{$SOCIALBUTT.TWITTER.count}" class="twitter-share-button" 
     7  data-size="{$SOCIALBUTT.TWITTER.size}" data-count="{$SOCIALBUTT.TWITTER.count}" class="twitter-share-button" rel="nofollow" 
    88  {combine_script id='twitter_widgets' load='footer' path='https://platform.twitter.com/widgets.js'} 
    99{/if} 
    10 ><img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/twitter_{$SOCIALBUTT.TWITTER.size}.png" alt="Share on Twitter"></a> 
     10><img src="{$ROOT_PATH}{$SOCIALBUTT_PATH}template/images/twitter_{$SOCIALBUTT.TWITTER.size}.png" alt="Twitter"></a> 
    1111{/strip} 
Note: See TracChangeset for help on using the changeset viewer.