Ignore:
Timestamp:
Oct 6, 2013, 9:05:18 PM (11 years ago)
Author:
mistic100
Message:

improve facebook light link and clean code & conf

File:
1 edited

Legend:

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

    r23202 r24788  
    99  $tpl_vars['TUMBLR'] = $conf['SocialButtons']['tumblr'];
    1010 
    11   // button on piture page
    12   if ($basename == 'picture')
    13   {
    14     global $picture;
    15    
    16     $tpl_vars['TUMBLR']['mode'] = 'photo';
    17     $tpl_vars['TUMBLR']['title'] = $picture['current']['TITLE'];
    18    
    19     if ($conf['SocialButtons']['tumblr']['img_size'] == 'Original')
    20     {
    21       $tpl_vars['TUMBLR']['source'] = $picture['current']['src_image']->get_url();
    22     }
    23     else
    24     {
    25       $tpl_vars['TUMBLR']['source'] = DerivativeImage::url($conf['SocialButtons']['tumblr']['img_size'], $picture['current']['src_image']);
    26     }
    27   }
    28   // button on other pages
    29   else if ($basename == 'index')
    30   {
    31     global $page;
    32    
    33     $tpl_vars['TUMBLR']['mode'] = 'link';
    34     $tpl_vars['TUMBLR']['title'] = strip_tags($page['title']);
    35   }
    36  
    37  
    3811  $template->set_filename('tumblr_button', realpath(SOCIALBUTT_PATH .'template/tumblr.tpl'));
    3912  $buttons[] = 'tumblr_button';
Note: See TracChangeset for help on using the changeset viewer.