Jump to Content
Kimili
  • Journal
  • Portfolio
  • Projects
  • About
  • Contact

Kimili Twitter Timeline

Kimili Twitter Timeline is a plugin that pulls in the latest tweets from your public Twitter timeline and displays them on your site. It’s super-easy to set up—both what gets displayed as well as how it gets displayed is highly configurable.

What Systems Does It Work With?

Kimili Twitter Timeline currently comes in just one version:

  • KTT for Textpattern

What’s New

Current Version: 1.4
Release Date: May 5, 2010

Version 1.4 of Kimili Twitter Timeline is a maintenance release. Twitter recently updated its API in a way that broke how the plugin pulls data, and this release fixes the issue. I recommend that all users upgrade.

Previous Version Changes

1.3 Released December 11, 2009

  • Added the ability to hide replies.
  • More flexible HTML customization.
  • Fixed an issue that occurred when using Textile.
  • More flexible boolean handling on attribute values (can now be true/false, 1/0 and yes/no).
  • Fixed a problem with how tweet IDs were being handled on some servers. (thanks to Christopher Horrell)
  • Replaced deprecated PHP functions.
  • Improved parsing of URLs in tweet text.

1.2 Released February 17, 2009

  • Private account authentication.
  • Any Textile formatting in tweet text can now be parsed as Textile.
  • Customizable footer link text.
  • Changed feed request method from fopen to curl.

1.1 Released January 7, 2009

  • Added the option to display your avatar.
  • Added permlink and conversation options to displayorder attribute, as well as permlink_text attribute.
  • Now allows for a blank value in the breaktag which will omit the tag.
  • Made a tweettext_class variable.
  • Parses hashtags in tweets and creates links to search.twitter.com

1.0.1 Released December 29, 2008

  • Fixed a bug where displayfooter wasn’t working.

1.0 Released October 6, 2008

  • Initial public release.

Basic Usage

For installation and basic usage instructions, refer to the Kimili Twitter Timeline for Textpattern page.

Available Attributes

All tag attributes should be lowercase and double quoted. Where applicable, possible values in parenthesis.

Attributes for <txp:kml_twitter />

There are no required attributes for the KTT tag. All of the plugin’s available attributes follow:

AVATAR_CLASS
The classname applied to your avatar, if you choose to display it using the displayavatar attribute. Default is twitterAvatar.

AVATAR_SIZE
The height and width, in pixels, of your avatar image, if you choose to display it using the display_avatar attribute. Default is 48.

BREAKTAG
The HTML tag used to wrap individual tweets. Default is li. Setting value to blank (”“) will omit a breaktag.

BREAKTAG_CLASS
The classname applied to your breaktag. Ignored if you use br for your wrap tag. Default is tweet

CACHE_LIFE
Time, in seconds, to display cached tweets before checking twitter.com for updates. You don’t want to set this too low, as Twitter only allows 100 checks per hour from a single app. Default is 600

CONVERSATION_CLASS
The classname applied to a tweet’s conversation link (in reply to…), should you choose to display it using the displayorder attribute. Default is conversation.

COUNT
The number of tweets to display. Note that Twitter will return a maximum of 200 tweets. Default is 1

DISPLAYAVATAR
(true|false) Whether or not you want your avatar image displayed. Default is false

DISPLAYFOOTER
(true|false) Whether or not you want to display “See more at Twitter” after your tweets. Default is true

DISPLAYORDER
(tweet-time-conversation-permlink, in any order) Determines whether you want to display the following elements of a tweet:

  • tweet text (tweet)
  • tweet time (time)
  • “in reply to” link, if they exist (conversation)
  • a permlink to the tweet (permlink)

The value of this attribute also determines which order these element appear in. The value of this attribute can be any combination of time, tweet, conversation and permlink delimited by hyphens. Omitting time, conversation or permlink from this value will hide those respective components. If you choose to use permlink, a link to the tweet will be created around the permlink text. If you omit permlink and use time, a link to the tweet will be created around the time text. Tweet text will always be displayed. Default is tweet-time

DISPLAYTITLE
(true|false) Whether or not you want to display the header before your tweets. Default is true

ERROR
The error message to be displayed when the plugin can’t get new tweets from Twitter. Default is There was a problem retrieving data from Twitter.

ERROR_CLASS as of 1.3
The classname applied to the error message when it is displayed. Default is error.

ERRORTAG as of 1.3
The HTML element used to wrap the error message when it is displayed. Default is p.

FOOTERTAG as of 1.3
The HTML element used to wrap the footer, should you choose to display it. Default is p.

FOOTER_CLASS as of 1.3
The classname applied to the footer when it is displayed. Default is my_twitter.

FOOTER_TEXT
The text for the link to your Twitter page which appears in the footer. Defaults to See more at Twitter

FOOTER_TEXT_LINK_TITLE
The text for your Twitter page link’s title attribute . Defaults to See all of my tweets

PASSWORD
If your Twitter account is protected, you can use this attribute to authenticate your account and display your tweets.

PERMLINK_CLASS as of 1.3
The classname applied tto the permlink. Ignored if you omit “permlink” from the displayorder value. Default is tweet_permlink.

PERMLINK_TEXT
The text displayed in a tweet’s permlink. Ignored if you omit “permlink” from the displayorder value. Default is View Tweet.

TITLE
The title text to be displayed before your tweets. Note that this is ignored if displaytitle is set to false. Default is Twitter

TITLETAG
The HTML element used for the title. Default is h3

TWEETTEXT_CLASS
The classname applied to the text of an individual tweet. Default is tweet_text.

TWEETTIMETAG as of 1.3
The HTML element used for an individual tweet’s timestamp if you choose not to use tweet permlinks. Ignored if you omit “time” from or include “permlink” in the displayorder value. Default is span.

TWEETTIME_CLASS as of 1.3
The classname applied to an individual tweet’s timestamp. Ignored if you omit “time” from the displayorder value. Default is tweet_time.

TWEETTEXTTAG as of 1.3
The HTML element used to wrap an individual tweet’s text. Default is span.

SEPARATOR
The string that separates your tweet from your tweet date. Default is a single space

SHOW_REPLIES as of 1.3
(true|false) Whether or not you want to display replies in your timeline. Default is true

USETEXTILE
Parses any Textile syntax you have in a tweet. Note that when using this option, <p> elements get stripped from the result. Default is true.

USER
Your Twitter user name. Default is kimili

WRAPTAG
The tag that wraps the tweets. Default is ul

WRAPTAG_CLASS
The classname applied to your wraptag. Default is empty.

License

Kimili Twitter Timeline is distributed under the terms and conditions of the BSD License. This basically means that you can do almost whatever you please with the code, so long as you retain the copyright notice. The only stipulation to that is if you want to use this code to endorse or promote another product, contact me first.

Support

Support for Kimili Twitter is neither expressed nor implied. This is, after all, a free product.

If you do find any genuine bugs or have any suggestions that could improve future versions of Kimili Twitter Timeline, by all means, contact me.

Donate

If you enjoy using Kimili Twitter Timeline and find it useful, please consider making a donation. Your donation will help encourage the plugin’s continued development so new features can be implemented and you can be sure it always works with ever newer versions of Textpattern. Besides, when you donate, you will be repaid tenfold in good karma.

  • Donate Now

Flickr

  • Fame
  • Hydrant
  • Mesh on Brick
  • The Bay State
  • Skylines
  • SESD • 1971 :: in the Round
  • After The Rain

See more at Flickr

Recent Listening

  1. Celso Fonseca - Rive Gauche Rio
  2. Latin Playboys - Latin Playboys
  3. Orchestra Baobab - Specialist in all Styles
  4. Anoushka Shankar - Rise
  5. Miles Davis - Kind Of Blue
  6. Amadou & Mariam – Welcome To Mali
  7. Charlie Parker - Bird's Best Bop on Verve
  8. Charlie Parker - Best of The Complete Savoy & Dial Studio Recordings
  9. Björk - Homogenic

See more at Last.fm

Tweet, Tweet

  • I don’t know about this new Twitter for iPad. Feels cluttered and over-baked. 5 days ago
  • Cracking open homepage_FINAL_v9.psd.

    ::rolls eyes::
    Aug 30th
  • My Coffee Conundrum: when I’m most in need of coffee—like on this Monday morning—I invariably forget to put water in the coffee maker. Aug 30th
  • Went for a walk in the Salem Woods, where we saw a Garter snake hunt, catch and eat a frog. It was like the Discovery Channel Unplugged. Aug 29th
  • So @joshuadavis is skating on the half-pipe in his backyard between layer tennis rounds. http://live.joshuadavis.com/ #lyt Aug 27th

See more at Twitter

©MMII—MMX Michael Bester