More Weblog Features

There wasn't much publishing going on here since I switched from Drupal to python-based Kukkaisvoima. On one hand that was because of a new job situation. Just didn't have the time to write alot. On the other hand I still wasn't satisfied by the security (anti-spam) mechanisms offered by the minimalistic software. So, during the holidays I started enhancing this thing a little with a sweet anti-spam mechanism based on respectively mimetex (I hope you like math! :)).
Today I finished the second feature which you can see on the right: the microblog badge. It fetches my identi.ca statuses via status.net api using the command line microblogging client pyTwerp written in Python. Since it is developed for output to stdout no HTML is generated. Hence no hyperlinks to users, tags, groups and other locations are formatted. So, I had to refresh my regular expression skills to make the hyperlinks show up. To integrate the script into the blog layout I used the example code snippet of Michael Gangolf's PHP-based laconi.ca badge. Two into one... badge done!
I guess from now on there aren't any more serious reasons to excuse the low frequent blog post situation here... poor me!

Kategorien: Software, Weblog
Datum: 2010-01-09 19:51:57

Photoblog

Finally I started my own photoblog at gelbersprudel.de after having found this neat software named "pixelpost".
I'm gonna publish the best shots I took over a longer period. I still consider myself as a bloody beginner concerning photography so I'm looking forward to constructive criticism. Check it out every once in a while. :)

Kategorien: Software, Weblog
Datum: 2009-09-29 12:49:19

Weightloss... the Python Style - New Blog Software

It's done! My weblog is completely ported to the new blog software.
Under the hood a minimalistic lightning-fast python script with the tongue twisting name Kukkaisvoima is doing a fantastic job now.
While my former choice Drupal came with about 500 files in the default installation Kukkaisvoima consists of just one file. Yes right.. just ONE! And believe me, it isn't packed with 2 millions lines of code (roughly 1000 lines after my modifications!). I wasn't happy with Drupal anymore since it usually took a whole while until some html code was rendered in the browser. It just felt too sluggish for a simple weblog like mine. Though Wordpress wasn't an option in my opinion. Since everybody uses it the effort put into hacking that software is humongous and I already did my experiences concerning hacked root servers misused as bot drones.
I'm happy with the new minimalism so I'm writing this article in my favorite text editor Kate saving it as a simple text file and uploading it to the scripts data directory. Done! No database, no HTML form editor.
Anyway, the original software was a little too minimalistic for my taste. So I modified the python sourcecode to make it meet my demands. I wanted to have the opportunity to create static sites that don't show up in the article and category list. In addition to that I tried to port the beautiful Wordpress Theme Misty Look which worked not that bad. Though I had to modify the script again since functionality and layout isn't seperated that well. Not even talking of the CSS work that had to be done (I kinda hate that). After some code cosmetics I'm gonna publish the modified source code and the Misty Look Stylesheet file on this site. So be patient.

Oh, and as you may have figured out at this point I'm partly writing english from now on. Similar to my decision to micro-blog bilingual I'm gonna do that here as well. Germany-related topics are still gonna be posted in german though as well as some more complex ones that are just too tough (for me) to translate into english.

Kategorien: Software, Weblog
Datum: 2009-09-25 15:34:33

Neues Gewand

Habe dem Blog mal ein minimalistischeres Äußeres verpasst. Zuviel Design liegt einfach zu schwer auf der Netzhaut.
Hmmm... das hätte jetzt eigentlich auch in einen dent gepasst. Verdammt, Microblogging prägt die Informationsaufbereitung mehr, als man denkt. =)
Kategorien: Netzkultur, Weblog
Datum: 2009-08-23 13:03:08

Drupal Kategorien mit Anzahl enthaltener Artikel als Liste ausgeben

Weblogs bestehen für gewöhnlich, unabhängig von ihrem durch verschiendenste Templates angepassten Layout, aus folgenden grundlegenden Komponenten: Einem Hauptmenü mit der groben Struktur des Weblogs (Home, Impressum, Kontakt etc.), der Kategorienliste, dem Archiv, eventuell einer Tag-Cloud und natürlich dem Hauptbereich, in dem die Artikel gelistet werden. Bei expliziter Blog-Software wie Wordpress oder Serendipity muß man sich um das Vorhandensein bzw. die Darstellung dieser Komponenten in der Regel keine Sorgen machen.

Drupal ist jedoch ein ausgewachsenes Content Management System (CMS), mit einer ganz eigenen Philosophie bezüglich der Strukturierung und Organisation. Das sogenannte Taxonomie-System ist ein mächtiges, zentrales Konstrukt, das schier unbegrenzte Flexibilität gewährleistet. Auch ein Weblog lässt sich mit Drupal relativ einfach durch das Aktivieren eines Moduls realisieren. Jedoch fehlt zunächst die Möglichkeit, mit einem Klick einen Block ins Layout zu zaubern, der die definierten Kategorien ausgibt. Hierzu liefert aber das Taxonomie-System die nötige Funktionalität.

Mit Hilfe des Mini-Tutorials von Tobias Bähr, habe ich mir zunächst eine Liste meines Kategorien-Vokabulars erstellen lassen. Da ich noch die Anzahl der mit der jeweiligen Kategorie verknüpften Artikel ausgeben lassen wollte, habe ich Tobias' Code-Snippet noch um die Funktion taxonomy_term_count_nodes($tid) ergänzt:

<?php
$vid = 2; /* <---- hier kommt die Vokabular-ID hin */
$terms = taxonomy_get_tree($vid);
print "<ul>";
foreach ( $terms as $term ) {
  print "<li>".l($term->name,'taxonomy/term/'.$term->tid, array('title' => $term->name))." (".taxonomy_term_count_nodes($term->tid).")</li>";
} /* end foreach */
print "</ul>";
?>

Fertig ist die Kategorienliste mit Artikelanzahl.


Kategorien: Code, Software, Weblog
Datum: 2008-10-18 13:03:08