Changeset 29781


Ignore:
Timestamp:
Sep 25, 2014, 6:52:23 PM (10 years ago)
Author:
mistic100
Message:

fix maintain class + facebook url

Location:
extensions/SocialButtons
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • extensions/SocialButtons/admin.php

    r28850 r29781  
    11<?php
    2 if (!defined('SOCIALBUTT_PATH')) die('Hacking attempt!');
     2defined('SOCIALBUTT_PATH') or die('Hacking attempt!');
    33
    44global $conf, $template, $page;
  • extensions/SocialButtons/include/facebook.inc.php

    r23202 r29781  
    4444  $buttons[] = 'facebook_button';
    4545}
    46 
    47 ?>
  • extensions/SocialButtons/include/google.inc.php

    r23202 r29781  
    4545  $buttons[] = 'google_button';
    4646}
    47 
    48 ?>
  • extensions/SocialButtons/include/linkedin.inc.php

    r25178 r29781  
    3939  $buttons[] = 'linkedin_button';
    4040}
    41 
    42 ?>
  • extensions/SocialButtons/include/pinterest.inc.php

    r24788 r29781  
    1818  $buttons[] = 'pinterest_button';
    1919}
    20 
    21 ?>
  • extensions/SocialButtons/include/reddit.inc.php

    r24788 r29781  
    4242  $buttons[] = 'reddit_button';
    4343}
    44 
    45 ?>
  • extensions/SocialButtons/include/tumblr.inc.php

    r24788 r29781  
    1212  $buttons[] = 'tumblr_button';
    1313}
    14 
    15 ?>
  • extensions/SocialButtons/include/twitter.inc.php

    r24757 r29781  
    3333  $buttons[] = 'twitter_button';
    3434}
    35 
    36 ?>
  • extensions/SocialButtons/maintain.class.php

    r28850 r29781  
    4646  function install($plugin_version, &$errors=array())
    4747  {
     48    global $conf;
     49
    4850    if (empty($conf['SocialButtons']))
    4951    {
     
    6769        if (!empty($temp['annotation']))  $this->default_config['google']['annotation'] = $temp['annotation'];
    6870      }
    69      
     71
    7072      conf_update_param('SocialButtons', $this->default_config, true);
    7173    }
     
    7375    {
    7476      $new_conf = safe_unserialize($conf['SocialButtons']);
    75      
     77
    7678      if (empty($new_conf['pinterest']))
    7779      {
     
    8183          );
    8284      }
    83      
     85
    8486      if (empty($new_conf['reddit']))
    8587      {
     
    9092          );
    9193      }
    92      
     94
    9395      if (empty($new_conf['linkedin']))
    9496      {
     
    98100          );
    99101      }
    100      
     102
    101103      if (!isset($new_conf['on_index']))
    102104      {
    103105        $new_conf['on_index'] = true;
    104106      }
    105      
     107
    106108      if ($new_conf['facebook']['layout'] == 'none')
    107109      {
    108110        $new_conf['facebook']['layout'] = 'button_count';
    109111      }
    110      
     112
    111113      if (!isset($new_conf['light']))
    112114      {
    113115        $new_conf['light'] = false;
    114116      }
    115      
     117
    116118      if (!isset($new_conf['img_size']))
    117119      {
     
    119121        unset($new_conf['tumblr']['img_size'], $new_conf['pinterest']['img_size']);
    120122      }
    121      
     123
    122124      conf_update_param('SocialButtons', $new_conf, true);
    123125    }
  • extensions/SocialButtons/template/facebook.tpl

    r27274 r29781  
    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}
    4   {if $SOCIALBUTT.basename=='picture'}
    5     &p[summary]={$COMMENT_IMG|cat:$SOCIALBUTT.copyright|urlencode}&p[images][0]={$SOCIALBUTT.source|urlencode}"
    6   {else}
    7     &p[summary]={$CONTENT_DESCRIPTION|cat:$SOCIALBUTT.copyright|urlencode}"
    8   {/if}
     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}{if $SOCIALBUTT.basename=='picture'}&p[summary]={$COMMENT_IMG|cat:$SOCIALBUTT.copyright|urlencode}&p[images][0]={$SOCIALBUTT.source|urlencode}"{else}&p[summary]={$CONTENT_DESCRIPTION|cat:$SOCIALBUTT.copyright|urlencode}"{/if}
    94    onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=500');return false;" target="_blank" rel="nofollow">
    105    <img src="{$ROOT_URL}{$SOCIALBUTT_PATH}template/images/facebook.png" alt="Facebook"></a>
Note: See TracChangeset for help on using the changeset viewer.