开发者

jQuery Tweet plugin custom template not working

开发者 https://www.devze.com 2023-03-29 00:01 出处:网络
I\'m using the Tweet plugin by SeaofClouds (can be found at http://tweet.seaofclouds.com/) The code is simple:

I'm using the Tweet plugin by SeaofClouds (can be found at http://tweet.seaofclouds.com/)

The code is simple:

$(document).ready(function(){
    $('#twitter_feed_chad').tweet({
        avatar_size: 24,
        count: 1,
        username: "<? echo $settings['twitter'][0]?>",
        template: "{text} » {retweet_action}"
    });
    $('#twitter_feed_ian').tweet({
        avatar_size: 24,
        count: 1,
        username: "<? echo $settings['twitter'][1]?>",
        template: "{text} » {retweet_action}"
    });
});

And the HTML is straight forward..

<h4>Chad's Tweets</h4> 
<div class="grid_6 alpha omega footer_twitter_feed" id="twitter_feed_chad"> 
</div> 
<h4>Ian's Tweets</h4> 
<div class="grid_6 alpha omega footer_twitter_feed" id="twitter_feed_ian"> 
</div> 

However I cannot get the template to change - it stays at its default where it displays the ti开发者_StackOverflow社区me of tweet first (about an hour ago etc.) followed by the tweet text, and no retweet link at all.

The site in question is located at http://www.moveinottawa.com/


Staying at it's default could be indicative that something could be wrong with the data you are grabbing from your server and something is wrong with the PHP portion of the code. Try writing out the whole tag and see if anything changes, I.E <?php echo $settings['twitter'][0];?> because it could be that your PHP settings are disabling short tags. And see if you can successfully echo those variables after $(document).ready(function(){

0

精彩评论

暂无评论...
验证码 换一张
取 消