Jump to content

Adding Twitter feed to the Footer File?


astewart

Recommended Posts

Hey guys,

I'm relatively new here to WHMCS but I must say that I love the software!

 

I am trying to get the 'built-in' twitter feed to display in one of the footer columns rather then on the 'homepage.tpl'.

 

I have tried taking the following code from the homepage template file and added it to the footer template file but it doesn't load the tweets.

{if $twitterusername}
<h3>{$LANG.twitterlatesttweets}</h3>
<div id="twitterfeed">
 <p><img src="images/loading.gif"></p>
</div>
{literal}<script language="javascript">
jQuery(document).ready(function(){
 jQuery.post("announcements.php", { action: "twitterfeed", numtweets: 3 },
   function(data){
     jQuery("#twitterfeed").html(data);
   });
});
</script>{/literal}

 

I took a look at the actual twitterfeed.tpl file as well which only consists of the following code:

<ul>
{foreach from=$tweets item=tweet key=num}
{if $num < $numtweets}
 <li><b>{$tweet.date}</b> - {$tweet.tweet}</li>
{/if}
{/foreach}
</ul>
<p>{$LANG.twitterfollowus} @ <a href="http://twitter.com/{$twitterusername}" target="_blank">www.twitter.com/{$twitterusername}</a> {$LANG.twitterfollowuswhy}</p>

 

but I still cannot get the tweets to load like it does on the homepage template.

Do only certain smarty template variables load in certain template files?

 

I'm hoping someone can help me out here because i can't seem to figure this out, as it shouldn't be that difficult but I am obviously missing something here. :(

 

Any help would be great, thanks guys.

 

Regards,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated