Post-Theory

tumblr tools & development notes

by felix b

questions & support RSS

bumblebee theme by felix b
  • Blog
  • About
  • Tagged
  • Tumblr Stuff
    • Basic Tag Cloud Script
    • Pretty Tag Cloud Maker

Re: Ivogeorgiev on Undocumented Features

10 notes Apr 17th, 2012

ivogeorgiev:

felix-bonkoski:

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.

Interesting. I discovered a similar thing, but at the end, ended up including the iframe for each single post, setting opacity: 0, and aligning/scaling it so that it matches my button positions. Does the desired effect, only until I realized I cannot highlight my heart button when the post is liked, because I don’t and can’t know if the post is liked. After some research, I found out that there IS a way to do it, only I don’t know how.

Edit: no, there seems to be no way. At least nobody has done it.

Right. The “reblog” is easy.  The “Like” button is tricky — not to “make it work” but to show whether or not the Post is already “Liked” or not.

Reading the contents of Tumblr’s own iframe to determine, say, which image they are using couldgive the result, but most browsers today prohibit inspecting the embedded iframe’s HTML with JavaScript for security reasons. Similarly, you cannot load the iframe’s content with AJAX because of security restrictions.  Perhaps with JSONP? I don’t know, haven’t tried to hack it out further.  And then yes, any “solution” would still be an ugly hack, likely to break whenever Tumblr’s whimsy programmers decided to mix things up a bit.

What really needs to happen is to just incorporate these functions into the Tumblr Theme Engine. It would probably be like, a few hours work for some Tumblr employee to implement this.

I also thought about scanning the notes of every post to check if you have liked it. Terribly inefficient, but it should happen fast enough for posts with 0-20 notes. It would have to be disabled for posts with more than 100 notes (or at least scan only the first 100 ones). Also, it would put a lot of queries on the Tumblr servers.

Yes, this is not a very robust technique.  And Tumblr doesn’t look kindly on “page scraping” in general.  Nor is there a way in the Tumblr API to fetch more than the most recent 50 notes for a post — at all!

But who cares, if they don’t want this they better improve their support - I have never heard a story of a theme designer who got in touch with the tumblr programmers. 

Oh — well I have at least tried to get in touch with the Tumblr folks, on several occaisons.

And at least on the Tumblr API Google Group, there is one Tumblr Employee (John Bunting) who monitors the discussion in the group and is able to provide some feedback. However, he seems fairly powerless in the overall Tumblr structure to get any *real* changes made, although he has been helpful in fixing some bugs, etc. (The Tumblr Theme Google Group seems to be completely unmoderated by any Tumblr employees).

I’ve also sent emails to the Tumblr staff a several times about bugs in the API and Theme engine, and requests for features, etc.  I usually get what looks to be a “real response from a real human” back — but nobody ever follows through to fix any of the problems I mention.

On the whole, Tumblr seriously needs to improve their support for developers. This is means listening to feedback, answering questions, fixing bugs and problems quickly and promptly.

For now - it’s really a giant headache.

Tagged: #tumblr criticisms #tumblr themes #tumblr is lame