You are not logged in.
A friend of mine has had a Textpattern weblog for a few years and posts sporadically. She discovered Tumblr and has been using it to spit out quick thoughts more regularly. But now everyone needs to subscribe to another site. So I suggested we pull in the Tumblr posts so she could keep using Tumblr but her audience could stay to one location.
As opposed to asv_tumblelog this polls the API and pulls in the new posts. Amit’s plugin effectively recreates Tumblr within Textpattern. Though his plugin did help me get started and I repurposed some of his functions for things like setting preferences.
The install is straightforward. Copy the code into Textpattern like any other plugin and activate it. The settings tab will appear in the Extensions parent tab. Set the mandatory settings of your Tumbr username and the default user to import into Textpattern. More info is in the help file.
I hope others get some use out of this plugin! :-)
0.9.6 – Checks to see if Tumblr site is responding.
0.9.7 – Moved some things around and added cURL support.
0.9.8 – Recently moved to a new host and noticed that get_headers isn’t supported. Added cURL alternative.
0.9.8.1 – Changed MySQL column for “tumblr_ID” to BIGINT.
0.9.8.2 – Added a simple check to upgrade “tumblr_ID” to BIGINT on the fly.
0.9.8.5 – Added an option in the config for picking the section articles are imported to.
Last edited by vagari (Yesterday 23:51:11)
So I just installed it and played with it. My server doesn’t allow file get content of a url, so I have to use a curl operation. I would recommend that you check to see if curl is enabled first, and use that. If not then you can fall back to file_get_content
I’ll take a look into Curl (I’m currently traveling). It seemed a bit overkill just to snag some XML. I imagine fopen wrappers is disabled for you. It says that needs to be turned on for remote connections.
I did just add in a check for the 200 status header since I got a couple “warning” messages in my inbox from CRON that the Tumblr service was unavailable.
Guess with curl I’ll have to redo that whole status section too. Time to do some research. ;-)
Here’s a question for everyone… I believe the first round of this will be PHP5 only. Should I work everything in the future to be backwards compatible?
Also Amit, does file_get_contents work for local files? From what I’ve seen it sounds like just the remote calls would be blocked. Thanks!
Well they released the last update for php4, but you know that people will probably still stay on php4 for at least another couple years. I moved all my servers to php5 and am going to build future plugins with php 5.2+ support.
And file_get_contents will work on local files (given you have the right permissions) even if the url_access is disabled.
Thanks Amit. I added cURL support and moved some things around. Since I am using a bunch of other functions that are PHP5 only, like simplexml_load_string, it makes sense to just make it mandatory.
Guess I better add that to the documentation. ;-)
Everything is still functional. Thinking about adding in a new backend piece for doing a full import. Right now the plugin can only grab the latest posts… Not very helpful if you’ve been posting on Tumblr for years.
Does your post mean we can remove the [ORPHAN] flag in the topic title?
Sure, I’m still around. Hoping to do a bit of updating. Thanks.