Project Description
This is a package for the popular ASP.NET open source CMS Umbraco, that allows you to display your tweets on your Umbraco website.
New in version 1.6
- Use the NEW twitter API
- Support to enable/disable displaying native RTs in the stream
Download Twitter for Umbraco 1.6
You can download the package zip file from the project page on the
http://our.umbraco.org website
Twitter for Umbraco 1.6 on Our.Umbraco.org
How to use this version (1.6)
- Install the Twitter for Umbraco package
- Insert the XSLT CWS - Twitter macro into your template
- Fill out the parameters for the macro
- Twitter Username - Your twitter username of the account you wish to display tweets from
- Number of Statuses - The number of statuses you want to display (Upto 200)
- Display @ Replies? - If you wish to show tweets where you are replying to a user
- Display Native RTs? - If you wish to show Native RTs
- Display Google Maps? - If you wish to display google maps for geo encoded tweets
- Google Maps - Zoom Level - Zoom level of the map
- Google Maps - Map Size - Size of the map in pixels (eg: 500x500)
- Google Maps - Map Type - The type of map (roadmap, satellite, hybrid ,terrain)
- Edit the XSLT file - CWS_twitter.xslt to customise your markup and output for the tweets you wish to show.
Editing the XSLT file
Open up
CWS_twitter.xslt and edit only the markup inside this template:
<xsl:template match="status" mode="tweet">
<!-- Change the XHTML here for how you want each tweet to be displayed -->
<div class="tweet">
<p>
<!-- Your Profile Image -->
<img src="{user/profile_image_url}" />
<!-- Your real name (not profile name) -->
<strong>
<xsl:value-of select="user/name"/>
</strong>
-
<!-- Date of tweet -->
<span>
<xsl:value-of select="umbraco.library:FormatDateTime(CWS.Twitter:FormatTwitterDate(created_at), 'ddd d MMM yy @ H:mm')"/>
</span>
<!-- Tweet content-->
<xsl:value-of select="CWS.Twitter:FormatUrls(text)" disable-output-escaping="yes"/>
</p>
<!-- Show Map of Tweet - IF value in XML is there & user enabled maps -->
<xsl:if test="geo/georss:point != '' and $displayMaps = 1">
<p>
<!-- Pass coordinates to map template-->
<xsl:call-template name="map">
<!-- Google wants coordinates as comma seperated so replace (space) with comma -->
<xsl:with-param name="coordinates" select="umbraco.library:Replace(geo/georss:point,' ',',')" />
</xsl:call-template>
</p>
</xsl:if>
</div>
</xsl:template>
Twitter XML format
Here is the
tweet XML that twitter returns, so you can customise your tweet markup even further.