Changeset 16049 for extensions


Ignore:
Timestamp:
Jun 26, 2012, 10:55:51 AM (12 years ago)
Author:
mistic100
Message:

force data-url because twitter seems to fail generating it (note that Twitter can't fetch localhost urls)

File:
1 edited

Legend:

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

    r15122 r16049  
    3737  {
    3838    $template->assign('TWEET_POSITON', $conf['TweetThis']['position']);
     39    $template->assign('TWEET_URL', get_absolute_root_url().duplicate_picture_url());
    3940    $template->set_prefilter('picture', 'tweet_add_button_prefilter');
    4041  }
     
    4243  {
    4344    $template->assign('TWEET_POSITON', 'index');
     45    $template->assign('TWEET_URL', get_absolute_root_url().duplicate_index_url());
    4446    $template->set_prefilter('index', 'tweet_add_button_prefilter');
    4547  }
     
    6567 
    6668  $replace = '{combine_script id=\'twitter_widgets\' path=\'http://platform.twitter.com/widgets.js}
    67   <a href="https://twitter.com/share" class="twitter-share-button" data-lang="{$TWEET_LANG}" {if not empty($TWEET_VIA)}data-via="{$TWEET_VIA}"{/if} {if $TWEET_SIZE=="large"}data-size="large"{/if} {if not $TWEET_COUNT}data-count="none"{/if}>Tweet</a>';
    68  
     69  <a href="https://twitter.com/share" class="twitter-share-button"
     70    data-url="{$TWEET_URL}" data-lang="{$TWEET_LANG}" {if not empty($TWEET_VIA)}data-via="{$TWEET_VIA}"{/if}
     71    {if $TWEET_SIZE=="large"}data-size="large"{/if} {if not $TWEET_COUNT}data-count="none"{/if}>Tweet</a>';
    6972  switch ($template->get_template_vars('TWEET_POSITON'))
    7073  {
Note: See TracChangeset for help on using the changeset viewer.