Ignore:
Timestamp:
Jun 14, 2013, 12:43:50 PM (11 years ago)
Author:
mistic100
Message:

remove "no caption" option for facebook (buggy)
fix urls
fix pinterest javascript

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/SocialButtons/main.inc.php

    r21232 r23201  
    9797 
    9898  $basename = script_basename();
     99  set_make_full_url();
    99100  $root_url = get_absolute_root_url();
    100101 
    101102  if ($basename == 'picture')
    102103  {
    103     $share_url = $root_url.ltrim(duplicate_picture_url(), './');
     104    // global $picture;
     105   
     106    // if ($picture['current']['level'] > 0) return;
     107   
     108    $share_url = duplicate_picture_url();
    104109  }
    105110  else if ($basename == 'index' and $conf['SocialButtons']['on_index'])
    106111  {
    107112    $conf['SocialButtons']['position'] = 'index';
    108     $share_url = $root_url.ltrim(duplicate_index_url(array(), array('start')), './');
     113    $share_url = duplicate_index_url(array(), array('start'));
    109114  }
    110115  else
     
    118123    'share_url' => $share_url,
    119124    'position' => $conf['SocialButtons']['position'],
    120     'copyright' => ' (from <a href="'.$share_url.'">'.$conf['gallery_title'].'</a>)',
     125    'copyright' => '(from <a href="'.$share_url.'">'.$conf['gallery_title'].'</a>)',
    121126    );
    122127  $buttons = array();
     
    148153    socialbutt_pinterest($basename, $root_url, $tpl_vars, $buttons);
    149154  }
     155 
     156  unset_make_full_url();
    150157 
    151158  if (empty($buttons))
Note: See TracChangeset for help on using the changeset viewer.