Skip to content

Do you like the internets? Do you want the internets on your home page? Then tmifeeds is the internets solution you have been waiting for.

Notifications You must be signed in to change notification settings

jpfinley/tmifeeds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TMI is a library for rendering JSON feeds on your internets. It includes 
Prototype 1.6, available from http://prototypejs.org. It's really not much more
than a simple factoring out of feed rendering idioms into an extendable JS
class, making use of the emerging standard for JSON resources to provide a 
callback parameter.

I found much of the code needed to create this tool/toy at the following URLS 
and wish to express my sincere thanks to the authors for doing all the boring 
parts of the work for me.

http://www.drunkenfist.com/304/2007/08/12/json-feeds-for-fun-and-profit-part-2-callbacks-with-twitter/ (Rob Larsen)
http://www.simonwhatley.co.uk/parsing-twitter-usernames-hashtags-and-urls-with-javascript (Simon Whatley)
http://twitter.pbwiki.com/RelativeTimeScripts (Mike Demers)

Usage: 

Include the following scripts in your page's header:

<script type="text/javascript" src="js/prototype-1.6.0.3.js" charset="utf-8"></script>
<script type="text/javascript" src="js/tmi.js" charset="utf-8"></script>
<link rel="stylesheet" href="css/tmiFeeds.css" type="text/css" media="screen" title="no title" charset="utf-8">

Code:

TMIFeed is a Prototype 1.6 "Class" that encapsulates the common functionality 
used by the singleton implementations. I've implemented three instances which 
can be configured to fetch feeds from Twitter, Google Reader and Flickr (via the 
FriendFeed API). You just supply the ID of the element you wish to render into,
your account credentials, and the number of items to render for each provider
like so:

tweets.init('tweets', 'stringbot', 10);
greader.init('greader', '01250286733713903147', 10);
flickr.init('flickr', 'stringbot', 10);


Adjust the tmiFeeds.css stylesheet to style the feed items however you please.

SUBMODULES ALERT:

If you want to run the Shudder tests, you'll need to have spidermonkey installed 
with the non-standard File object compiled in (see Shudder docs for more detail).
Shudder is included as a submodule. You'll need to run the following commands to
use it:

$ git submodule init
$ git submodule update

Shudder has its own submodule dependency as well, Erzatz, so you'll want to
run the same init and update commands in ./vendor/shudder/ as well.

- Josh 2/13/2009

About

Do you like the internets? Do you want the internets on your home page? Then tmifeeds is the internets solution you have been waiting for.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages