FRANK

meet Frank, your new social feed streaming friend

Adding Feeds to Frank

Frankly can easily and quickly digest RSS and Atom feeds. Frank is powered by SimplePie, a PHP script that can read, cache, and display feeds in an orderly format. Frank can display one feed or twenty. When you first upload Frank in his default form, you'll find four feeds already added. In /php/frank.php on line 8, you'll find this array:

$feed->set_feed_url(array(
	'http://twitter.com/statuses/user_timeline/20116892.rss',
	'http://api.flickr.com/services/feeds/photos_public.gne?id=12602590@N06&lang=en-us&format=rss_200',
	'http://feeds.feedburner.com/Clarklab',
	'http://vimeo.com/clarklab/videos/rss'
));

To replace the feeds with your own content, simply collect the feed URLs you want Frank to pull and paste them into this array. Just remember, each URL should be contained in single quotes and they should all be seperated by commas (except the last entry). For example, an array for 6 URLs would look like this:

$feed->set_feed_url(array(
	'http://domain.com/rss1',
	'http://domain.com/rss2',
	'http://domain.com/rss3',
	'http://domain.com/rss4',
	'http://domain.com/rss5',
	'http://domain.com/rss6'
));

If you'd like just Frank to just display a single feed, like in our YouTube Demo, simply enter one URL and get rid of the comma, like this:

$feed->set_feed_url(array(
	'http://gdata.youtube.com/feeds/base/users/androidandme/uploads?alt=rss&v=2&orderby=published'
));

What feeds will Frank display?

Frank and SimplePie will let you combine all sorts of feeds into all kinds of interesting configurations, but it is possible that some feeds won't play nice together. Most major services are very good about keeping feed data organized and well labeled, but occasionally you'll find a feed that doesn't want to behave. Services like WordPress, Flickr, Vimeo, and the like all work great. In fact, almost any RSS or Atom feed will work with Frank. Still, Frank is at the mercy of the original feed formatting, so if a certain feed has a problem, like isn't including timestamps, the items in a multifeed list might not load in the correct order. While Frank should be able to handle most RSS and Atom feeds with ease, I can't guarantee that EVERY single feed will work perfectly.

One interesting problem I ran into was the feed formatting from Twitter. The Twitter feeds display the exact same content for the title and the post, which just looked silly. The other items in the stream would display a unique title and unique content while Twitter items were displaying all content in double. I really wanted to make sure Twitter feeds were fully supported, so I've included a PHP regular expression that parses the Twitter item title and replaces it with the cleaner "clarklab tweets" (figure 1). Included in the script you can even change the verb used, so "clarklab tweets" could become "clarklab says" or "clarklab hollered".

I realized that while there will surely be people that need these Twitter options, some people will want them completely removed. When you open the template files, you'll find /frank (which supports multiple feeds, including Twitter and it's special formatting), along with a folder called /examples (that will be filled with other versions of Frank). There you'll find a Twitter-less example, our YouTube Demo, our Tuts Feed Lite Demo, and our AskAndy Demo. Note: The default template with the special Twitter considerations works just fine even if you don't add a Twitter feed. The fact that there is an example without the Twitter extras doesn't mean you need to use it. I just thought someone might want it.