assign('TWEET_URL', get_absolute_root_url().duplicate_picture_url()); } else if (script_basename() == 'index') { $conf['TweetThis']['position'] = 'index'; $template->assign('TWEET_URL', get_absolute_root_url().duplicate_index_url()); } // config $template->assign(array( 'TWEET_POSITION' => $conf['TweetThis']['position'], 'TWEET_SIZE' => $conf['TweetThis']['size'], 'TWEET_COUNT' => $conf['TweetThis']['count'], 'TWEET_VIA' => $conf['TweetThis']['via'], )); // button language if ( in_array(str_replace('_','-',strtolower($user['language'])), $conf['TweetThis']['lang']) ) { $template->assign('TWEET_LANG', str_replace('_','-',strtolower($user['language']))); } if ( in_array(substr($user['language'],0,2), $conf['TweetThis']['lang']) ) { $template->assign('TWEET_LANG', substr($user['language'],0,2)); } else { $template->assign('TWEET_LANG', 'en'); } $template->set_filename('tweet_button', dirname(__FILE__).'/button.tpl'); $button = $template->parse('tweet_button', true); switch ($conf['TweetThis']['position']) { case 'index': // $template->add_index_button('