Leaflet.js-Macher Vladimir Agafonkin: „hey front-end guy! make a map“

Zur Zeit findet die FOSS4G statt: Ein Treffen von Leuten, die mit Karten und Geoinformationssystemen auf Open Source Basis arbeiten:

The annual FOSS4G conference is the largest global gathering focused on open source geospatial software. FOSS4G brings together developers, users, decision-makers and observers from a broad spectrum of organizations and fields of operation.

Gestern hat dort Vladimir Agafonkin, der Entwickler von Leaflet.js einen Vortrag gehalten. Der Titel: „How Simplicity Will Save GIS„.

Er erzählt darin, wie er als 22-Jähriger ohne viel Ahnung von Geoinformationssystemen, kurz GIS, mit Leaflet angefangen hat: „Born as a protest against bloat, clutter and complexity.“

Ab der Hälfte der Folien, bekommt man den Eindruck, dass Agafonkin eine Motivationsrede gehalten haben musste. Ein schlauer Spruch nach dem anderen, aber nicht uninteressant.

Heute und morgen gibt es Livestreams von FOSS4G, gegen 17 Uhr deutscher Zeit geht’s los.

Gibt es einen Unterschied zwischen simplicity und minimalism?

Although I sometimes use the terms ‘minimal’ and ‘simple’ as if they were interchangeable, by definition, minimalism actually refers to the paring down of elements to get to the essence of a thing. This doesn’t mean you practise minimalist design simply by removing ornamentation; it means you ensure that every part of the design works together to the point where nothing else can be added or removed to improve it. It’s not easy to do well

Aus: Five killer ways to use minimalism

WordPress: How to Add Thumbnails to Google Analytics Popular Post Plugin

Google Analytics Popular Plugin is a great and widely used way to present the most read articles on a website. In its default version it shows the results as an unordered list in the widgets area. Unfortunately adding thumbnails is not included. But there is a workaround.

It takes only a few steps:

1) Open google-analytics-popular-posts.php

2) Look for the code in line 378 – 384 and replace it with the following lines of code:

$titleStr = get_the_title($getPostID);
$post = get_post($getPostID);
$thumb = get_the_post_thumbnail($getPostID);
$dateStr = mysql2date('Y-m-d', $post->post_date);
$contentStr = strip_tags(mb_substr($post->post_content, 0, 60));
$output .= '<ul>'."n";
$output .= '<li>'."n";
$output .= '<div class="popular_post"><a href='.$postPagepath.'>'.$thumb.$titleStr.'</a><br/>'."n";

Explanation: You add a new variable called $thumb by using the get_the_post_thumbnail WordPress function for the specific post via $getPostID. In the $output-variable you call the $thumb variable.

Now you are using the default thumbnail size. If you want to change the size, please look at step 3.

3) To change the thumbnail size, you need to add a new variable that is called $newthumb in this example. $newthumb is equal to the thumbnail size you added via functions.php. Then you have to call $newthumbsize in $thumb.

$titleStr = get_the_title($getPostID);
$post = get_post($getPostID);
$newthumbsize = 'thumbnail-big';
$thumb = get_the_post_thumbnail($getPostID, $newthumbsize);
$dateStr = mysql2date('Y-m-d', $post->post_date);
$contentStr = strip_tags(mb_substr($post->post_content, 0, 60));
$output .= '<ul>'."n";
$output .= '<li>'."n";
$output .= '<div><a href='.$postPagepath.'>'.$thumb.$titleStr.'</a><br />'."n";

Voilá!

(This code is a modified version of a suggestion in the support area of Google Analytics Popular Posts plugin. The piece of code didn’t work for me).