<?php

/**
 *
 * @copyright  2010-2016 izend.org
 * @version    10
 * @link       http://www.izend.org
 */
?>
<?php switch ($mode): ?>
<?php case 'lite': ?>
<a href="https://twitter.com/home?status=<?php if (!empty($tweet_text)): ?><?php echo htmlentities($tweet_text, ENT_QUOTES, 'UTF-8'); ?> - <?php endif; ?><?php echo urlencode($base_url . '/' . $request_path); ?>" target="_blank" title="Partager sur Twitter"><span class="social-facebook">Twitter</span></a>
<?php break; ?>
<?php case 'awesome': ?>
<a href="https://twitter.com/home?status=<?php if (!empty($tweet_text)): ?><?php echo htmlentities($tweet_text, ENT_QUOTES, 'UTF-8'); ?> - <?php endif; ?><?php echo urlencode($base_url . '/' . $request_path); ?>" target="_blank" title="Partager sur Twitter"><i class="fa fa-twitter"></i></a>
<?php break; ?>
<?php default: ?>
<?php head('javascript', 'https://platform.twitter.com/widgets.js'); ?>
<?php $id = uniqid('id'); ?>
<div id="<?php echo $id; ?>"></div>
<script type="text/javascript">
//<![CDATA[
<?php switch ($mode): ?>
<?php case 'bar': ?>
$('#<?php echo $id; ?>').replaceWith('<a href="https://twitter.com/share" class="twitter-share-button"<?php if (!empty($tweet_text)): ?> data-text="<?php echo htmlentities($tweet_text, ENT_QUOTES, 'UTF-8'); ?>"<?php endif; ?> data-url="<?php echo $base_url; ?>/<?php echo $request_path; ?>" data-count="vertical" data-lang="fr"></a>');
<?php break; ?>
<?php case 'inline': ?>
<?php default: ?>
$('#<?php echo $id; ?>').replaceWith('<a href="https://twitter.com/share" class="twitter-share-button"<?php if (!empty($tweet_text)): ?> data-text="<?php echo htmlentities($tweet_text, ENT_QUOTES, 'UTF-8'); ?>"<?php endif; ?> data-url="<?php echo $base_url; ?>/<?php echo $request_path; ?>" data-count="horizontal" data-lang="fr"></a>');
<?php break; ?>
<?php endswitch; ?>
//]]>
</script>
<?php break; ?>
<?php endswitch; ?>
