Twitter for Umbraco 1.5

Rating: No reviews yet
Downloads: 0
Change Set: 54973
Released: Jul 15, 2010
Updated: Jul 20, 2010 by warrenbuckley
Dev status: Stable Help Icon

Available Downloads

There are no downloads associated with this release.

Release Notes

New in version 1.5

  • General tidy up of XSLT file
    • Google Static Maps API no longer needs an API key so this macro parameter has been removed
    • Better commenting of XSLT file
    • Few tiny tweaks to markup
    • Verified to work with Umbraco version 4.5
    • Fixed bug - When showing only your tweets and limiting to a specific number. Where before if your last 5 tweets were @replies nothing would be displayed.

Download Twitter for Umbraco 1.5

You can download the package zip file from the project page on the http://our.umbraco.org website
Twitter for Umbraco 1.5 on Our.Umbraco.org

How to use this version (1.5)

  • 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 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.

Reviews for this release

No reviews yet for this release.