Undocumented Features are (not)Cool
So, in writing my theme, I wanted a way to put a "Reblog" and "Like" link on each post on the main page of the blog without users having to "click-through" to the "/post" page, and use Tumblr's silly <iframe> in the upper right corner.
Well. I investigated the contents of that <iframe> on the Post page, and found it was pretty simple, as long as you had a little value called "rk=xxxxxxxx" (or the "reblog key")
<iframe src="http://assets.tumblr.com/iframe.html?10&src=http%3A%2F%2Fblog.post-theory.com%2Fpost%2F18132446503l&pid=18132446503&rk=xA660hqO&lang=en_US ...
Naturally, this value is not included in the {Posts} blocks by Tumblr's theme template engine.
Easy, I thought: I'll just secretly load the "Post" page for each post in the background with an AJAX call, and steal the "rk=xxxxxxx" value from the src attribute of the <iframe> !
Well, that was working just fine! Super-duper!
And then I read that there is an undocumented Theme operator: {ReblogURL}
Seriously? Undocumented features! Super cool! Lame. C'mon Tumblr. Really? Features should be documented. How long would it take you to just fix your documentation?
{ReblogURL} looks something like this:
http://www.tumblr.com/reblog/18132446503/xA660hqO
Where the big integer is the PostID, and those 8 alpha-num characters at the end are the same as that elusive "rk=xxxxxxxx" reblog key.
Oh well, so much for all my cool background AJAX calls :P