Instead of using rss to retrieve data from a wordpress site I wanted to try out the Jetpack JSON API, aka WordPress Rest api. I came across some smallish challenges, so just wanted to write a quick post with the solution for those getting stuck on the same. (mer…)
I’ve been using the wordpress plugin ‘Get the Image‘ by developer Justin Tadlock for a while. ‘Get the image’ does a fantastic job searching through posts looking for images, so you don’t have to add thumbnails manually, but it always bothered me that it downscaled images in the html instead of scaling and cropping them properly. I also use the lovely timThumb script on my blog, to scale, scrop and cache images on the fly, and I wanted to find a way to combine the two scripts into one.
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /customers/7/5/b/pappmaskin.no/httpd.www/wp-content/plugins/delicious_screenshots/wp_delicious_sceenshots.php on line 75
Warning: file_get_contents(http://feeds.del.icio.us/v2/json/mskogly/art?Fcount=6): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /customers/7/5/b/pappmaskin.no/httpd.www/wp-content/plugins/delicious_screenshots/wp_delicious_sceenshots.php on line 75
Warning: Invalid argument supplied for foreach() in /customers/7/5/b/pappmaskin.no/httpd.www/wp-content/plugins/delicious_screenshots/wp_delicious_sceenshots.php on line 79
If this works there should be about 6 thumbnails on this page, showing links bookmarked using Delicious, and tagged with «art».
First off I just want to say that I think this is probably NOT a very good idea, but I downloaded the Timelope extension for firefox today, that basically publishes every single webpage you visit to timelope.com and as an rss.
Smart? No, maybe not, but kind of fun!
Some people would probably say that publishing every singe page you visit on the web as kind of overkill, and also a sliiiiight security nightmare, and both are probably correct, but is just so darn cool to have!
On a more serious note: It is also a good reminder of just how much information you leave behind while surfing. Perhaps you can even change some habits? Think: If it aint safe to show on the web for all to see, then perhaps it’s not very good for your brain eighter!
Good control over what to display
Timelope has a lot of options to make it easy to control what people see:
You can choose to make everything private, and just use it as a log for yourself.
By default localhost and all visits to urls starting with https:// is hidden (that means online banking and alle secure logons)
You can create a whitelist consisting of sites you want to display.
You can create a blacklist with all the sites or parts of websites you don’t want to show (like the link to phpmyadmin, wp-admin, or just any boring site you don’t want to bother people with telling about.
There is a convenient checkbox to hide any porn sites you visit.
There is a small button in Firefox where you easily can turn off all publishing.
And lastly, you can manually delete stuff that you feel clutter up your lovely stream, and you can at the same time choose hide all later visits to knitting.com or other embarrasing sites automatically.
This plugin only supports RSS 2.0, and timelope has chosen to deliver an atomfeed, so you have to fetch your timelope stream and reformat it with for instance feedburner. Log on to feedburner.com and create a new feed, paste in your feedurl from timelope (http://timelope.com/mskogly/feed), when you are done with the wizard you must turn off Smartfeed and then look for Convert Format Burner. Choose Rss 2.0 and then activate.
Then you can go into wordpress admin and insert the feed into Rss Stream, and you are set for some serious information overload fun for all.
Your lifestream will suddenly be flooded with lovely stuff like this:
Update: 26th of april 2009: Decided to turn off Timelope, because it took to much time to administrate and weed out the sites I didn’t want to show.
I downloaded my first copy of Processing (Processing.org) a few years ago, but I have never gotten past the initial few demos and small tutorials. I’ve been interested in generative computer art for many years, ever since I first saw the work of Marius Watz in the mid nineties and had a stint reading dadaist poetry and cutups, but I’ve never had the time to play with this stuff myself. Or the brains to handle the math, hehe. But then I came across this tutorial in Computer Arts #149 (The June 2008 issue), where there are a few really interesting tutorials, which basically gives you enough info to understand the key consepts that you need to create some very interesting apps, like the one below (slightly modified of course, I added random colors among other things).
(java applets no longer functions in Google Chrome). Nothing you can do about that.)
Oh, and I had quite a hard time finding out how to embed my app in my wordpress blog. I kept getting some heavy errors when I tried to post the html the Processing software generates straight into WordPress, but I eventually got it to work. Since I couldn’t find any tutorials on how to do this, I decided to write my own. So here it is:
How to embed a processing java application in wordpress:
First, you have to turn off the Visual editor for your user, if you don’t, wordpress will 100% garanteed screw up your code. And remember, if you turn the Visual editor back on after finishing editing your post, then DON’T open the post for editing again. When I did this wordpress replaced my embed code for java with a flash embed code!!! Luckily I had saved this article as a Google Docs document, and could simply copypaste it in here again.
(* Update: This might also be related to Adblock plus, but needs to be verified)
Second, paste in this code (just remember to replace the variables with where you’ve put your own .jar file etc. You get all the info you need when you choose File and Export in Processing, and open up the resulting index.html file in an editor of your choice. Note: the applet tag is slightly depricated, so I guess I have to figure out to do this with a «proper» object + embed.