<?php   defined('C5_EXECUTE') or die("Access Denied.");

$urlHelper = Core::make('helper/concrete/urls');
$blockType = BlockType::getByHandle('customizable_twitter_feed');
$localPath = $urlHelper->getBlockTypeAssetsURL($blockType);

?>



<div id="twitter-feed-container">
    <?php  if ($feedTitle) { ?>
    <h2><?php  echo $feedTitle; ?></h2>
    <?php  } ?>
    <div id="twitter-feed"></div>
    <?php if ($twitterFeedLink){ ?>
    <a href="https://twitter.com/<?php echo $twitterFeedLink ?>" class='twitter-link'>Join us on Twitter</a> 
	<?php  } ?>
</div>

<script src="/concrete/workflow24/js/twitterFetcher_min.js"></script>
<script>
    var config1 = {
        "id":'<?php  if ($widgetID) { echo $widgetID; } ?>',
        "domId":'twitter-feed',
        "maxTweets":<?php  if ($maxTweets) { echo $maxTweets; } ?>,
        "enableLinks":<?php  if ($enableLinks) { echo $enableLinks; } ?>,
        "showUser":<?php  if ($showUser) { echo $showUser; } ?>,
        "showTime":<?php  if ($showTime) { echo $showTime; } ?>,
        "showRetweet":<?php  if ($showRetweet) { echo $showRetweet; } ?>,
        "showInteraction":<?php  if ($showInteraction) { echo $showInteraction; } ?>,
        "showImages":<?php  if ($showImages) { echo $showImages; } ?>,
        "linksInNewWindow":<?php  if ($linksInNewWindow) { echo $linksInNewWindow; } ?>,
    };
    twitterFetcher.fetch(config1);
</script>