Social Buttons instead.'; } function tweet_add_button() { global $conf, $template, $user; $conf['TweetThis'] = unserialize($conf['TweetThis']); $conf['TweetThis']['lang'] = array( 'no','de','zh-cn','en','pl','sv','zh-tw','tr','es','th','fa','hu','pt','it','ar','he', 'ko','id','ru','ja','da','fi','hi','ur','fr','nl', ); // urls and position if (script_basename() == 'picture') { $template->assign('TWEET_URL', get_absolute_root_url().ltrim(duplicate_picture_url(), './')); } else if (script_basename() == 'index') { $conf['TweetThis']['position'] = 'index'; $template->assign('TWEET_URL', get_absolute_root_url().ltrim(duplicate_index_url(array(), array('start')), './')); } else { return; } // 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('