mrGTB
Well-known member
I was reading this site earlier about adding tweets on your own site: http://remysharp.com/2007/05/18/add-twitter-to-your-blog-step-by-step/
So after a few hours messing around I now have a custom page showing tweets, test the code out for yourself below and if you can improve upon it. Fire away with your tips! That site above does list other variables that can be used to expand this further pulling in more information with tweets e.t.c.
Create a page and use this below:
Replace mrgtbtweeting in 2 places with your twitter username.
You can: see it working here.
So after a few hours messing around I now have a custom page showing tweets, test the code out for yourself below and if you can improve upon it. Fire away with your tips! That site above does list other variables that can be used to expand this further pulling in more information with tweets e.t.c.
Create a page and use this below:
Replace mrgtbtweeting in 2 places with your twitter username.
You can: see it working here.
Code:
<script src="http://twitterjs.googlecode.com/svn/trunk/src/twitter.min.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">
getTwitters('tweet', {
id: 'mrgtbtweeting',
count: 10,
enableLinks: true,
ignoreReplies: true,
clearContents: true,
template: '<div class="primaryContent">%text%<br /><a href="http://twitter.com/%mrgtbtweeting%/statuses/%id_str%/">%time%</a></div>'
});
</script>
<div class="section sectionMain">
<div class="heading">
Twitter Feeds
</div>
<div class="subHeading">
Read last 10 tweets made.
</div>
<div id="tweet">
<a href="http://twitter.com/mrgtbtweeting"></a>
</div>
</div>
<xen:sidebar>
<div class="section">
<div class="secondaryContent">
<h3>Custom Block</h3>
Custom Block
</div>
</div>
<div class="section">
<div class="secondaryContent">
<h3>Custom Block</h3>
Custom Block
</div>
</div>
<div class="section">
<div class="secondaryContent">
<h3>Custom Block</h3>
Custom Block
</div>
</div>
<div class="section">
<div class="secondaryContent">
<h3>Custom Block</h3>
Custom Block
</div>
</div>
</xen:sidebar>