View Rotten Tomatoes Scores for Current Movies in Status Board by Panic

Using PHP and the Rotten Tomatoes API, I’ve created an HTML widget for use in Status Board. It features a scrollable list of movies currently in theaters, including the critics rating for each, the tomato icon (Fresh, Rotten, Certified Fresh) and a link to that movie’s page. Unfortunately, links within DIY widgets open a new page within the iframe, so I cannot link to the Rotten Tomatoes page in Safari. But I found that URL schemes “escape” Status Board, so I’m linking to the movie’s page in the Flixster for iPad app. (The URL scheme for a movie’s page is flixster://?action=movieDetails&movieId=<movieId>.)

Consider this widget “beta.” I’m still tweaking the design. And note that I haven’t run this widget by the folks at Flixster — it will only work as long as I have a working API key. However, it’s noncompetitive and links to their app, so I’m assuming everything’s kosher.

You can add a DIY widget and enter this URL: http://imissmymac.com/status-board/in-theaters/ or, if you’re currently on your iPad, click on this link to automatically install it in Status Board. It looks best 5 tiles wide.

How to Add Your WordPress Stats to Panic’s Status Board

I’ve been digging Panic’s Status Board and follow the @StatusBoardInfo feed for new sources. Oliver Schwarten — @Osch_ — shares on his blog how to display your WordPress stats. Unfortunately, his post is in German, but with the help of Google Translate and some googling to help with command line functions, I figured out how to make this work for me. Nothing I am sharing here is original, but it took me several tries to figure out the /path_to/ address for the csv file I needed to write to my server, so I thought I’d share my process.

Get Your WordPress API

If you have WordPress stats in your dashboard, then you will have had to sign up for an API key. If you are signed in with your wordpress.com account, you can get your key here.

Use the Stats API to Output a CSV File

You need a csv file to create a chart in Status Board.

The following outputs in the browser a csv file displaying the views on your blog for the last five days:

http://stats.wordpress.com/csv.php?api_key=YOUR_API_KEY&blog_uri=YOUR_BLOG_URL&table=views&days=5&limit=-1

Run a Cron Job on Your Server

To the best of my understanding, Schwarten states that this is a static file, so you need to update it at regular intervals. He uses cron and cURL to do this.

I don’t work in Terminal, but if your blog runs on a server that has cPanel installed, you can go to the cron jobs page, create a cron job, and enter something like the following:

curl -s "http://stats.wordpress.com/csv.php?api_key=YOUR_API_KEY&blog_uri=YOUR_BLOG_URL&table=views&days=5&limit=-1" > /home/USERNAME/public_html/wordpress.csv

and set some time interval at which you will run this command.

The path to which I was writing the csv file tripped me up, but I figured out that /home/USERNAME/public_html/wordpress.csv works for me. USERNAME is the name that you use, for example, to log in to FTP for your account, or whatever shows up after the ~ following your site’s IP address.

Display Your Stats

In Status Board, tap on the table icon, and add YOUR_BLOG_URL/wordpress.csv. It will show a chart showing your blog’s recent views. For example, here’s the csv file for one of my blogs.

Other Stats You Can Show

This page shows other variables you can use for the API. For example, you can create a table showing referrers or search terms, and write to a different URL, and enter that in Table view in Status Board.

See How Many Facebook Fans You Have on Panic’s Status Board

Inspired by this Stack Overflow discussion, I have written some PHP that allows you to add a “Do It Yourself (HTML)” widget to Panic’s Status Board app for the iPad.

This works well for a 4×1 grid (which is the smallest size panel).

To get your Facebook business page’s ID, you need to go to click on “Edit Settings” and grab the number in the address bar (e.g, https://www.facebook.com/pages/edit/?id=0123456789&sk=permissions)

Save this as something like fans.php. Unfortunately, you cannot run PHP scripts in a public Dropbox folder, so you will have to upload it to your own server. Then, in Status Board, tap on the < > icon and add the URL for this script (e.g., http://yourdomain.com/fans.php).