Ignore:
Timestamp:
Jan 25, 2013, 4:51:02 PM (11 years ago)
Author:
mistic100
Message:

add pinterest, option to hide counter on facebook button

Location:
extensions/SocialButtons/include
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/SocialButtons/include/facebook.inc.php

    r20358 r20374  
    22defined('SOCIALBUTT_PATH') or die('Hacking attempt!');
    33
    4 function socialbutt_facebook($basename, $root_url, &$tpl_vars)
     4function socialbutt_facebook($basename, $root_url, &$tpl_vars, &$buttons)
    55{
    66  global $conf, $template, $user;
     
    4242 
    4343  $template->set_filename('facebook_button', realpath(SOCIALBUTT_PATH .'template/facebook.tpl'));
    44   return 'facebook_button';
     44  $buttons[] = 'facebook_button';
    4545}
    4646
  • extensions/SocialButtons/include/google.inc.php

    r20358 r20374  
    22defined('SOCIALBUTT_PATH') or die('Hacking attempt!');
    33
    4 function socialbutt_google($basename, $root_url, &$tpl_vars)
     4function socialbutt_google($basename, $root_url, &$tpl_vars, &$buttons)
    55{
    66  global $conf, $template, $user;
     
    4343 
    4444  $template->set_filename('google_button', realpath(SOCIALBUTT_PATH .'template/google.tpl'));
    45   return 'google_button';
     45  $buttons[] = 'google_button';
    4646}
    4747
  • extensions/SocialButtons/include/install.inc.php

    r20358 r20374  
    3131        'layout' => 'button_count',
    3232        ),
     33      'pinterest' => array(
     34        'enabled' => true,
     35        'layout' => 'horizontal',
     36        'img_size' => 'Original',
     37        ),
    3338      );
    3439   
     
    5358    }
    5459   
    55    
    5660    $conf['SocialButtons'] = serialize($default_config);
    5761    conf_update_param('SocialButtons', $conf['SocialButtons']);
     62  }
     63  else
     64  {
     65    $new_conf = unserialize($conf['SocialButtons']);
     66    if (empty($new_conf['pinterest']))
     67    {
     68      $new_conf['pinterest'] = array(
     69        'enabled' => true,
     70        'layout' => 'horizontal',
     71        'img_size' => 'Original',
     72        );
     73      $conf['SocialButtons'] = serialize($new_conf);
     74      conf_update_param('SocialButtons', $conf['SocialButtons']);
     75    }
    5876  }
    5977}
  • extensions/SocialButtons/include/tumblr.inc.php

    r20358 r20374  
    22defined('SOCIALBUTT_PATH') or die('Hacking attempt!');
    33
    4 function socialbutt_tumblr($basename, $root_url, &$tpl_vars)
     4function socialbutt_tumblr($basename, $root_url, &$tpl_vars, &$buttons)
    55{
    6   global $conf, $template, $user;
     6  global $conf, $template;
    77 
    88  $tumblr_css = array(
     
    5151 
    5252  $template->set_filename('tumblr_button', realpath(SOCIALBUTT_PATH .'template/tumblr.tpl'));
    53   return 'tumblr_button';
     53  $buttons[] = 'tumblr_button';
    5454}
    5555
  • extensions/SocialButtons/include/twitter.inc.php

    r20358 r20374  
    22defined('SOCIALBUTT_PATH') or die('Hacking attempt!');
    33
    4 function socialbutt_twitter($basename, $root_url, &$tpl_vars)
     4function socialbutt_twitter($basename, $root_url, &$tpl_vars, &$buttons)
    55{
    66  global $conf, $template, $user;
     
    3131 
    3232  $template->set_filename('twitter_button', realpath(SOCIALBUTT_PATH .'template/twitter.tpl'));
    33   return 'twitter_button';
     33  $buttons[] = 'twitter_button';
    3434}
    3535
Note: See TracChangeset for help on using the changeset viewer.