2. Februar 2006 To display a random image from my coppermine gallery inside my blog, I found Brad Guilford’s plugin CoppermineSC 0.4.3.
The installation was easy and everything seemed to be working.
But then I noticed that some thumbnails were broken. Although the link to the image was working.
I managed to track the error down to “special” characters in the filepath, like the german Umlaute (öäüß), which I used for the album and category names.
The fix was simple:
I replaced the original code in line 717
$uri = $config[0].$separatorslash.$config[1].$image->filepath;
with
$tmpfilepaths = explode("/", $image->filepath);
$cleanfilepaths = array();
foreach($tmpfilepaths as $val) {
$cleanfilepaths[] = rawurlencode($val);
}
$newfilepath = implode ("/", $cleanfilepaths);
$uri = $config[0].$separatorslash.$config[1].$newfilepath;
As you can see, it is a simple fix. Take the filepath, split it up. Encode each part and join the parts back together.
This patch is just working for the thumbnail display! There are more places like this inside the plugin-code.
But as I am lazy and only need a working thumbnail display, I didn’t do more changes to the code 
Schlagworte:CoppermineSC, plugin, Wordpress
Veröffentlicht in Plugins, Wordpress | 4 Kommentare »
25. Januar 2006 Ein paar kleine Änderungen im Blog:
- Die “Abonnieren” Ecke stark erweitert
Ich habe zwar keine Ahnung, ob überhaupt irgendjemand mein Blog abonniert hat, aber vielleicht nützt es dem einen oder anderen User. Auf die Buttons der Dienste oder die verbreiteten 80×15 Buttons habe ich zu Gunsten der Ladezeit verzichtet. - Im Kommentar Meta-Block ist jetzt ein del.ici.ous Link enthalten.
- Feeds laufen wieder über Feedburner.
- In der rechten Navigation ein zufälliges Thumbnail eingebunden
Die Thumbnails werden über ein Plugin zufällig aus der Bildergallerie auf meiner Homepage ausgewählt. Das Bildchen soll die Seite ein wenig auflockern, denn es ist doch eine ziemliche Textwüste. - Externe Links sind jetzt durch ein Icon gekennzeichnet.
Schlagworte:Intern, Layout
Veröffentlicht in Intern | Keine Kommentare »
15. Januar 2006 Note: This is a translation of my post WordPress Themes lokalisieren. Thanks to Ainslie Johnson for reviewing my translation.
A few days ago the WP-Andreas09 theme for wordpress became available. This is based on a design by Andreas Viklund, Ainslie Johnson did a very good job of converting it for wordpress.
Unfortunately the language used inside the templates was English, as it is for most themes available. To make a translation you need to go through each template file, find the English words and translate one by one.
In wordpress itself, localization is done by .po/.mo files. Hence there are localization files for a number of languages already. All you have to do, is to copy this file to your directory, change a parameter and wordpress can speak a new language.
So, why not use this mechanism for themes? There are very few existing themes working this way. More precisely, I only know of two Giraffe and NIkynik Blue. Even then, I was unable to find detailed documentation on how these themes were built.
Theme localization is very easy to do, when you manage to understand how wordpress and gettext work together.
Weiterlesen »
Schlagworte:localization, Themes, Wordpress
Veröffentlicht in Themes, Wordpress | 20 Kommentare »
9. Januar 2006 Das Theme hat nun eine eigene Seite.
Das Theme wp-andreas09 kann ich euch nun in deutscher Sprache zur Verfügung stellen.
Ihr bekommt es hier: wp-andreas09-l10n.zip
Einige Anmerkungen dazu:
- Das Theme basiert auf dem Original von Ainslie Johnson.
- Es wurden von mir keine Layout Änderungen vorgenommen, aber umfangreiche Änderungen “unter der Haube”.
- Sämtliche sichtbaren Texte wurden von mir mit den WordPress Lokalisierungsfunktionen ( __() und _e() ) versehen und das Theme somit leicht übersetzbar gemacht.
- Ein .pot File für weitere Übersetzungen ist im Theme Paket enthalten
- Eine deutsche Übersetzung in Form eines .mo Files ist natürlich auch mit im Paket
Solltet ihr Übersetzungen in weiteren Sprachen erstellen, dann werde ich sie gerne hier zusammen mit dem Theme anbieten.
Schlagworte:Andreas09, localization, Themes, Wordpress
Veröffentlicht in Themes, Wordpress | 7 Kommentare »
9. Januar 2006 Das Theme hat nun eine eigene Seite.
Schlagworte:Andreas09, localization, Themes, Wordpress
Veröffentlicht in Themes, Wordpress | 17 Kommentare »