Project Description
This is a package for the popular ASP.NET open source CMS Umbraco, that allows you to display your tweets on your Umbaco website.

How to use the latest version (1.3)

  • Install the Twitter for Umbraco package into your umbraco website from http://our.umbraco.org
  • Insert the XSLT CWS - Twitter macro into your template
  • Fill out the parameters for the macro
    • Twitter Username - Your twitter username. Only use this if you want to display your friends tweets.
    • Twitter Password - Your twitter password. Only use this if you want to display your friends tweets.
    • Number of statuses - The number of statues you want to display. The maximum number you can request/show is 20.
    • Show friends updates? - If you wish to use you must include your twitter username and password as this XML feed is password protected.
    • Show @replies? - Select whether you wish to show @replies in the statuses you show on your website.
  • 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>
            <p>
                <img src="{user/profile_image_url}" />
                <strong>
                    <xsl:value-of select="user/name"/>
                </strong>
                -
                <xsl:value-of select="umbraco.library:FormatDateTime(CWS.Twitter:FormatTwitterDate(created_at), 'ddd d MMM yy @ H:mm')"/>
                <xsl:value-of select="CWS.Twitter:FormatURLS(text)" disable-output-escaping="yes"/>
            </p>
        </div>
    </xsl:template>

If you wish to add further fields to your output I have included below a copy of the XML that twitter returns for each tweet:

        <status>
            <created_at>Mon Aug 10 09:50:38 +0000 2009</created_at>
            <id>3222744166</id>
            <text>@berni_ball errr yeh very useful ;)</text>
            <source>&lt;a href=&quot;http://www.tweetdeck.com/&quot;&gt;TweetDeck&lt;/a&gt;</source>
            <truncated>false</truncated>
            <in_reply_to_status_id>3222511285</in_reply_to_status_id>
            <in_reply_to_user_id>21759178</in_reply_to_user_id>
            <favorited>false</favorited>
            <in_reply_to_screen_name>berni_ball</in_reply_to_screen_name>
            <user>
                <id>9751992</id>
                <name>Warren Buckley</name>
                <screen_name>warrenbuckley</screen_name>
                <location>iPhone: 51.156685,-0.161973</location>
                <description>A web developer who is based in the UK that works for Norwegian Web Agency Xeed - http://www.xeed.no</description>
                <profile_image_url>http://s3.amazonaws.com/twitter_production/profile_images/63253002/warren-buckley_normal.jpg</profile_image_url>

                <url>http://www.creativewebspecialist.co.uk</url>
                <protected>false</protected>
                <followers_count>334</followers_count>
                <profile_background_color>9AE4E8</profile_background_color>
                <profile_text_color>333333</profile_text_color>
                <profile_link_color>0084B4</profile_link_color>

                <profile_sidebar_fill_color>DDFFCC</profile_sidebar_fill_color>
                <profile_sidebar_border_color>BDDCAD</profile_sidebar_border_color>
                <friends_count>194</friends_count>
                <created_at>Sun Oct 28 11:44:59 +0000 2007</created_at>
                <favourites_count>253</favourites_count>
                <utc_offset>0</utc_offset>

                <time_zone>London</time_zone>
                <profile_background_image_url>http://static.twitter.com/images/themes/theme1/bg.gif</profile_background_image_url>
                <profile_background_tile>false</profile_background_tile>
                <statuses_count>3923</statuses_count>
                <notifications>false</notifications>
                <verified>false</verified>

                <following>false</following>
            </user>
        </status>
Last edited Aug 10 at 12:55 PM by warrenbuckley, version 5

 

Want to leave feedback?
Please use Discussions or Reviews instead.

Updating...
© 2006-2009 Microsoft | About CodePlex | Privacy Statement | Terms of Use | Code of Conduct | Advertise With Us | Version 2009.10.27.15987