Pappmaskin.no

How to make the Get The Image WordPress plugin to work with TimThumb

I’ve been using the wordpress plugin ‘Get the Image‘ by developer Justin Tadlock for a while. ‘Get the image’ does a fantastic job at 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.

Read the rest of this entry »

Farmville is the shit!

If you are on Facebook you have probably seen the annoying messages from your friends who’ve just found a deer in their cabbage patch. Actually, chances are high that you ARE that friend, because according to this screenshot, Farmville is played by over 82 million users.

I have only one thing to say about that: What the fuck!

Found: Internet Archaeologists Find Ruins Of 'Friendster' Civilization

My first successful bread!

Delicious.com + Thumbalizr screenshots + caching

I’m playing with my Delicious Snapcasa code this weekend to see if I can replace Snapcasa with the thumbalizr.com screenshot-service. Snapcasa was great because it gave me plenty of free captures each month, but it has some serious problems capturing some of the sites I throw at it, and was behaving rather randomly, so it has to go.

I’ve looked at several screen shot services, and tested many, and so far it is thumbalizer.com that seem to be the fastest and most stable, and the free version is able to take screenshots of webpages deeper into the site, not just the front page. As far as I can see I can’t find any limit on the api, but the free version does have a watermark on each thumb. I’m too cheap to spring for a paid account, but you do have that option.

The result so far

Demo: http://pappmaskin.no/opensource/delicious_snapcasa/delicious_thumbalizr.php?tag=art&count=100
Shows: The last 100 bookmarks tagged with “art” on delicious.com by me.

Caching

Thumbalizr.com provides a .gz with some php for caching the thumbnails their API provides, but I wasn’t able to get it to work last night. Luckily Anton Lindquist has branched the code on GitHub and made some improvements, and after a little headscratching (aka googleing) and some helpful tips from Anton himself, I am now running a version that grabs the images from Thumbalizer and stores them locally on my server, speeding up the pages quite a lot, easing the stress on thumbalizer, and most importantly, preventing already grabbed pages from being queued again and again.

New default queue image

Thumbalizr provides an OK queue-image while their services works on grabbing a screen shot of the page you request but with some help from Anton I’m not using my own custom image, currently a picture of my son holding a fish (just to make him smile :). It’s nice to have a little more control over what is displayed on the page until the image is ready for use, especially when you do like me and fire off a grid of many screen shots on the same page.

Possible uses

I’ve rewritten my original Snapcasa script into a WordPress plugin which I use on several of my blogposts right now. I’ve also made a standalone page for my sons, a start page with kid friendly games and YouTube-videos etc. They can’t read yet, so it’s nice to have an automated start page with pictures.

The code

I promised to update this post with the code I use for working with the Thumbalizr api and caching images locally. As I said I use this caching script instead of the code provided by Thumbalizr. It comes with an example index.php, that I’ve expanded on a little. Right now it looks like this.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 'api_key',
	'local_cache_expire' => (!$config['local_cache_expire']) ? 3600 : $config['local_cache_expire'],
 
);
$image = new thumbalizrRequest($config);
 
$image->request($imageurl);
 
//$image->request('http://www.thumbalizr.com/');
 
if($image->headers['Status'] == 'OK' || $image->headers['Status'] == 'LOCAL') {
	$image->output();
} else {
	//print_r($image->headers); //debug
//http://pappmaskin.no/wp-content/2010/03/noah-2624545080_417ba06836_m.jpg
 
$filename = 'http://pappmaskin.no/wp-content/2010/03/noah-2624545080_417ba06836_m.jpg';
$size = getimagesize($filename);
$fp = fopen($filename, "rb");
if ($size && $fp) {
    header("Content-type: {$size['mime']}");
    fpassthru($fp);
    exit;
} else {
    // error
}
 
}
 
?>

Read the rest of this entry »

Homage to TED.com

Hello, my name is Morten, and I’m a TED.com addict. (“-Hello Morten”).

TED is definitely my favorite source for inspiration and ideas. I’ve spent countless hours watching and listening to all those facinating talks over the years. So what better place to look for inspiration for my new header?

The original: Ideas worth spreading


I’ve been testing out a few colors for my header the last few days, and one if the things I’ve tried is using a warm orange, or stronger red on the logo and when hovering over the main navigation. The TED logo must have been lingering in the back of my mind, because today I suddenly realized that what I was working on was basically a TED lookalike. So I simply decided to go all out, and create as complete a duplicate to the TED logo as I could, with my own little twist on their lovely slogan “Ideas worth spreading”. Pappmaskin.no is also all about spreading ideas (what other reason for running a website?), but it is also about making things, and making things happen.

My version – Things worth making

I have a feeling that I won’t be running this particular header for long, but I think it is a nice way to pay tribute to the most important website in the world. And please don’t tell TED about this, as I’ve probably spent at least 15 minutes in GIMP making this. If their lawyers comes after me for plagiarism all that time would have been wasted. And yes, that was a joke :)

Colors

The red TED color has the HEX #FF2B06, and the grey looks like #595959.

Fonts

Helvetica Neue LT Std Heavy Expanded and Helvetica Neue LT Std Light. The TED logo doesn’t quite match Helvetica, at least not Heavy Expanded, and I believe it is hand made, but Helvetica is what they recomment TEDx organizers to use, and it looks pretty nice as well, though not identical.

TED.com
Color by COLOURlovers

Ted.com
Color by COLOURlovers

Read the rest of this entry »

Read this: Planetwalker – 22 Years of Walking. 17 Years of Silence, by John Francis

I saw John Francis talk at ted.com a few months ago, and I was facinated with his story.

After witnessing the devastation caused by a 1971 oil spill in San Francisco Bay, he stopped riding in motorized vehicles, a vow which lasted 22 years from 1972 until 1994. From 1973 until 1990, he also spent 17 years voluntarily silent. During this time he earned a Ph.D. in land management and traveled extensively, walking across the entire width of the lower 48 states of the USA as well as walking to South America.

I heartily recommend this book to everyone who loves our earth, and who loves building communities.

I bought mine as a Kindle edition from the Amazon bookstore, and read it on my iPhone.

PS: There is one thing that bothers me about Johns story, something I would like to ask him if I get the chance. When he gives in and starts riding in cars again it is because he realizes that he will be a more effective communicator of his environmentally friendly ideas if he uses motorized transportation. But that is the same argument the rest of the world uses for riding in cars, it makes us more effective in what we need to achieve. But that doesn’t mean it’s good for the environment.

John Francis at Ted.com

Boing boing!

What a nice day! Boing Boing (the fifth most popular blog in the world) blogged about my Picturetweeting bathroom scale today, and I’m enjoying a lovely spike in traffic on my little DIY-site. Thank you Mark, much appreciated!

Nice spike

By the way, things you probably didn’t know about Boing Boing co-founder Mark Frauenfelder :)

Filmpolitiet 2010 – Metadataeksempler

Skisse P3 Navigasjon

Sjekker ut hvordan det blir med ikoner på alle hovedpunktene i navigasjonen.

Min kommentar til den hvite versjonen:
Det er ikke alle helveticonsene som tåler å bli skalert ned, så dersom
vi skal ha det slik må vi jobbe litt med pixlene for å få det pent,
evt ta ned kontrasten litt. Ellers liker jeg det litt egentlig. Litt
klumpete font muligens (12px verdana bold) men ekstremt lesbart, som
er pri en for nav. Er usikkert på om ikonene tilfører tydelighet eller
om de bare ødelegger roen. Navigasjonen skriker for mye om
oppmerksomhet? Navigasjon er noe folk generelt ignorerer uansett helt
til de er stukk eller vil ha en ny quick fix, så fint om den ikke gjør
for mye ut av seg.

Har også laget en kjapp invertert versjon, altså med sort
bakgrunnsfarge og hvite ikoner.

Min kommentar til den: Hm, interessant! Men det kommer veldig an på
hvordan headeren over blir seende ut tror jeg. Hvitt og lyst blender
bedre inn i bakgrunnen på sida for øvrig, mens sort og den blå fargen
bak p3.no til venstre spiller godt sammen med fargene i Nå på P3
under. Den sorte varianten rammer på en måte inn det innholdet som
kommer under. Men samtidig slåss den litt med NRK sine heavy toppmeny
(som var grunnen til at jeg ville gå motsatt vei på p3 sin nav, altså
lyst, for å slippe rad på rad på rad med horisontale sterke linjer.

m.

See and download the full gallery on posterous

Posted via email from mskogly’s preposterous